本文整理汇总了C#中PropertyGetterEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# PropertyGetterEventArgs类的具体用法?C# PropertyGetterEventArgs怎么用?C# PropertyGetterEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PropertyGetterEventArgs类属于命名空间,在下文中一共展示了PropertyGetterEventArgs类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: get_CodeTemplate
public static void get_CodeTemplate(Property obj, PropertyGetterEventArgs<string> e)
{
StringBuilder sb = new StringBuilder();
string type = obj.ObjectClass != null ? obj.ObjectClass.Name : "<<TYPE>>";
string propType = obj.GetPropertyTypeString();
sb.AppendFormat("[Invocation]\npublic static void {0}_{1}({2} obj, {3}<{4}> e)\n{{\n}}\n\n", "get", obj.Name, type, "PropertyGetterEventArgs", propType);
sb.AppendFormat("[Invocation]\npublic static void {0}_{1}({2} obj, {3}<{4}> e)\n{{\n}}\n\n", "preSet", obj.Name, type, "PropertyPreSetterEventArgs", propType);
sb.AppendFormat("[Invocation]\npublic static void {0}_{1}({2} obj, {3}<{4}> e)\n{{\n}}\n\n", "postSet", obj.Name, type, "PropertyPostSetterEventArgs", propType);
sb.AppendFormat("[Invocation]\npublic static void {0}_{1}({2} obj, {3} e)\n{{\n\te.IsValid = obj.{1} == ...;\n\te.Error = e.IsValid ? string.Empty : \"<Error>\";\n}}\n\n", "isValid", obj.Name, type, "PropertyIsValidEventArgs");
e.Result = sb.ToString();
}
开发者ID:jrgcubano,项目名称:zetbox,代码行数:14,代码来源:PropertyActions.cs
示例2: get_CodeTemplate
public static void get_CodeTemplate(ObjectClass obj, PropertyGetterEventArgs<string> e)
{
StringBuilder sb = new StringBuilder();
string type = obj.Name;
sb.AppendFormat("[Invocation]\npublic static void ToString({0} obj, MethodReturnEventArgs<string> e)\n{{\n}}\n\n", type);
sb.AppendFormat("[Invocation]\npublic static void NotifyPreSave({0} obj)\n{{\n}}\n\n", type);
sb.AppendFormat("[Invocation]\npublic static void NotifyPostSave({0} obj)\n{{\n}}\n\n", type);
sb.AppendFormat("[Invocation]\npublic static void NotifyCreated({0} obj)\n{{\n}}\n\n", type);
sb.AppendFormat("[Invocation]\npublic static void NotifyDeleting({0} obj)\n{{\n}}\n\n", type);
sb.AppendFormat("[Invocation]\npublic static void ObjectIsValid({0} obj, ObjectIsValidEventArgs e)\n{{\n}}\n\n", type);
e.Result = sb.ToString();
}
开发者ID:jrgcubano,项目名称:zetbox,代码行数:15,代码来源:ObjectClassActions.cs
示例3: get_CodeTemplate
public static void get_CodeTemplate(Method obj, PropertyGetterEventArgs<string> e)
{
StringBuilder sb = new StringBuilder();
string objParameter;
if (obj.ObjectClass != null)
{
objParameter = string.Format("{0} obj", obj.ObjectClass.Name);
}
else
{
objParameter = "<<TYPE>> obj";
}
sb.AppendFormat("[Invocation]\npublic static void {0}({1}", obj.Name, objParameter);
var returnParam = obj.GetReturnParameter();
if (returnParam != null)
{
sb.AppendFormat(", MethodReturnEventArgs<{0}> e", returnParam.GetParameterTypeString());
}
foreach (var param in obj.Parameter.Where(p => !p.IsReturnParameter))
{
sb.AppendFormat(", {0} {1}",
param.GetParameterTypeString(),
param.Name);
}
sb.AppendLine(")\n{\n}");
sb.AppendLine();
sb.AppendFormat("[Invocation]\npublic static void {0}CanExec({1}, MethodReturnEventArgs<bool> e)\n{{\n}}\n", obj.Name, objParameter);
sb.AppendLine();
sb.AppendFormat("[Invocation]\npublic static void {0}CanExecReason({1}, MethodReturnEventArgs<string> e)\n{{\n}}\n", obj.Name, objParameter);
e.Result = sb.ToString();
}
开发者ID:jrgcubano,项目名称:zetbox,代码行数:39,代码来源:MethodActions.cs
示例4: get_Description
public static void get_Description(AccessControl obj, PropertyGetterEventArgs<string> e)
{
if (obj is GroupMembership)
{
var grp = (GroupMembership)obj;
e.Result = string.Format("Group {0} has {1} rights", grp.Group != null ? grp.Group.Name : "<null>", obj.Rights);
}
else if (obj is RoleMembership)
{
var role = (RoleMembership)obj;
var navigators = new List<string>();
ObjectClass nextType = obj.ObjectClass;
foreach (var rel in role.Relations)
{
if (rel == null)
{
// Only during dehydration - fix this call!
continue;
}
if (rel.A != null && rel.A.Type == nextType)
{
navigators.Add(rel.A.Navigator != null ? rel.A.Navigator.Name : "<?>");
nextType = rel.B.Type;
}
else if (rel.B != null && rel.B.Type == nextType)
{
navigators.Add(rel.B.Navigator != null ? rel.B.Navigator.Name : "<?>");
nextType = rel.A.Type;
}
else
{
navigators.Add("<?>");
}
}
e.Result = string.Format("{0} has {1} rights", string.Join(".", navigators), obj.Rights);
}
}
开发者ID:daszat,项目名称:zetbox,代码行数:37,代码来源:AccessControlActions.cs
示例5: TriggerFetchBaseWorkScheduleAsync
public Zetbox.API.Async.ZbTask<Zetbox.App.Calendar.WorkSchedule> TriggerFetchBaseWorkScheduleAsync()
{
if (_triggerFetchBaseWorkScheduleTask != null) return _triggerFetchBaseWorkScheduleTask;
if (_fk_BaseWorkSchedule.HasValue)
_triggerFetchBaseWorkScheduleTask = Context.FindAsync<Zetbox.App.Calendar.WorkSchedule>(_fk_BaseWorkSchedule.Value);
else
_triggerFetchBaseWorkScheduleTask = new Zetbox.API.Async.ZbTask<Zetbox.App.Calendar.WorkSchedule>(Zetbox.API.Async.ZbTask.Synchron, () => null);
_triggerFetchBaseWorkScheduleTask.OnResult(t =>
{
if (OnBaseWorkSchedule_Getter != null)
{
var e = new PropertyGetterEventArgs<Zetbox.App.Calendar.WorkSchedule>(t.Result);
OnBaseWorkSchedule_Getter(this, e);
t.Result = e.Result;
}
});
return _triggerFetchBaseWorkScheduleTask;
}
开发者ID:daszat,项目名称:zetbox,代码行数:21,代码来源:WorkSchedule.Memory.Designer.cs
示例6: get_AufwandGes
public static void get_AufwandGes(Projekt obj, PropertyGetterEventArgs<double?> e)
{
e.Result = obj.Tasks.Sum(t => t.Aufwand);
}
开发者ID:jrgcubano,项目名称:zetbox,代码行数:4,代码来源:ProjektActions.cs
示例7: TriggerFetchTestCustomObjects_One_NavAsync
public Zetbox.API.Async.ZbTask<Zetbox.App.Test.TestCustomObject> TriggerFetchTestCustomObjects_One_NavAsync()
{
if (_triggerFetchTestCustomObjects_One_NavTask != null) return _triggerFetchTestCustomObjects_One_NavTask;
if (_fk_TestCustomObjects_One_Nav.HasValue)
_triggerFetchTestCustomObjects_One_NavTask = Context.FindAsync<Zetbox.App.Test.TestCustomObject>(_fk_TestCustomObjects_One_Nav.Value);
else
_triggerFetchTestCustomObjects_One_NavTask = new Zetbox.API.Async.ZbTask<Zetbox.App.Test.TestCustomObject>(Zetbox.API.Async.ZbTask.Synchron, () => null);
_triggerFetchTestCustomObjects_One_NavTask.OnResult(t =>
{
if (OnTestCustomObjects_One_Nav_Getter != null)
{
var e = new PropertyGetterEventArgs<Zetbox.App.Test.TestCustomObject>(t.Result);
OnTestCustomObjects_One_Nav_Getter(this, e);
t.Result = e.Result;
}
});
return _triggerFetchTestCustomObjects_One_NavTask;
}
开发者ID:daszat,项目名称:zetbox,代码行数:21,代码来源:Muhblah.Memory.Designer.cs
示例8: get_Parent
public static void get_Parent(RelationEnd relEnd, PropertyGetterEventArgs<Relation> e)
{
e.Result = relEnd.AParent ?? relEnd.BParent;
}
开发者ID:jrgcubano,项目名称:zetbox,代码行数:4,代码来源:RelationEndActions.cs
示例9: TriggerFetchExcerptAsync
public Zetbox.API.Async.ZbTask<at.dasz.DocumentManagement.Excerpt> TriggerFetchExcerptAsync()
{
if (_triggerFetchExcerptTask != null) return _triggerFetchExcerptTask;
if (_fk_Excerpt.HasValue)
_triggerFetchExcerptTask = Context.FindAsync<at.dasz.DocumentManagement.Excerpt>(_fk_Excerpt.Value);
else
_triggerFetchExcerptTask = new Zetbox.API.Async.ZbTask<at.dasz.DocumentManagement.Excerpt>(Zetbox.API.Async.ZbTask.Synchron, () => null);
_triggerFetchExcerptTask.OnResult(t =>
{
if (OnExcerpt_Getter != null)
{
var e = new PropertyGetterEventArgs<at.dasz.DocumentManagement.Excerpt>(t.Result);
OnExcerpt_Getter(this, e);
t.Result = e.Result;
}
});
return _triggerFetchExcerptTask;
}
开发者ID:daszat,项目名称:zetbox,代码行数:21,代码来源:File.Memory.Designer.cs
示例10: TriggerFetchCompoundObjectDefinitionAsync
public Zetbox.API.Async.ZbTask<Zetbox.App.Base.CompoundObject> TriggerFetchCompoundObjectDefinitionAsync()
{
if (_triggerFetchCompoundObjectDefinitionTask != null) return _triggerFetchCompoundObjectDefinitionTask;
if (_fk_CompoundObjectDefinition.HasValue)
_triggerFetchCompoundObjectDefinitionTask = Context.FindAsync<Zetbox.App.Base.CompoundObject>(_fk_CompoundObjectDefinition.Value);
else
_triggerFetchCompoundObjectDefinitionTask = new Zetbox.API.Async.ZbTask<Zetbox.App.Base.CompoundObject>(Zetbox.API.Async.ZbTask.Synchron, () => null);
_triggerFetchCompoundObjectDefinitionTask.OnResult(t =>
{
if (OnCompoundObjectDefinition_Getter != null)
{
var e = new PropertyGetterEventArgs<Zetbox.App.Base.CompoundObject>(t.Result);
OnCompoundObjectDefinition_Getter(this, e);
t.Result = e.Result;
}
});
return _triggerFetchCompoundObjectDefinitionTask;
}
开发者ID:daszat,项目名称:zetbox,代码行数:21,代码来源:CompoundObjectProperty.Memory.Designer.cs
示例11: TriggerFetchAParentAsync
public Zetbox.API.Async.ZbTask<Zetbox.App.Base.Relation> TriggerFetchAParentAsync()
{
if (_triggerFetchAParentTask != null) return _triggerFetchAParentTask;
if (_fk_AParent.HasValue)
_triggerFetchAParentTask = Context.FindAsync<Zetbox.App.Base.Relation>(_fk_AParent.Value);
else
_triggerFetchAParentTask = new Zetbox.API.Async.ZbTask<Zetbox.App.Base.Relation>(Zetbox.API.Async.ZbTask.Synchron, () => null);
_triggerFetchAParentTask.OnResult(t =>
{
if (OnAParent_Getter != null)
{
var e = new PropertyGetterEventArgs<Zetbox.App.Base.Relation>(t.Result);
OnAParent_Getter(this, e);
t.Result = e.Result;
}
});
return _triggerFetchAParentTask;
}
开发者ID:daszat,项目名称:zetbox,代码行数:21,代码来源:RelationEnd.Memory.Designer.cs
示例12: TriggerFetchTypeAsync
public Zetbox.API.Async.ZbTask<Zetbox.App.Base.ObjectClass> TriggerFetchTypeAsync()
{
if (_triggerFetchTypeTask != null) return _triggerFetchTypeTask;
if (_fk_Type.HasValue)
_triggerFetchTypeTask = Context.FindAsync<Zetbox.App.Base.ObjectClass>(_fk_Type.Value);
else
_triggerFetchTypeTask = new Zetbox.API.Async.ZbTask<Zetbox.App.Base.ObjectClass>(Zetbox.API.Async.ZbTask.Synchron, () => null);
_triggerFetchTypeTask.OnResult(t =>
{
if (OnType_Getter != null)
{
var e = new PropertyGetterEventArgs<Zetbox.App.Base.ObjectClass>(t.Result);
OnType_Getter(this, e);
t.Result = e.Result;
}
});
return _triggerFetchTypeTask;
}
开发者ID:daszat,项目名称:zetbox,代码行数:21,代码来源:RelationEnd.Memory.Designer.cs
示例13: TriggerFetchViewModelDescriptorAsync
public Zetbox.API.Async.ZbTask<Zetbox.App.GUI.ViewModelDescriptor> TriggerFetchViewModelDescriptorAsync()
{
if (_triggerFetchViewModelDescriptorTask != null) return _triggerFetchViewModelDescriptorTask;
if (_fk_ViewModelDescriptor.HasValue)
_triggerFetchViewModelDescriptorTask = Context.FindAsync<Zetbox.App.GUI.ViewModelDescriptor>(_fk_ViewModelDescriptor.Value);
else
_triggerFetchViewModelDescriptorTask = new Zetbox.API.Async.ZbTask<Zetbox.App.GUI.ViewModelDescriptor>(Zetbox.API.Async.ZbTask.Synchron, () => null);
_triggerFetchViewModelDescriptorTask.OnResult(t =>
{
if (OnViewModelDescriptor_Getter != null)
{
var e = new PropertyGetterEventArgs<Zetbox.App.GUI.ViewModelDescriptor>(t.Result);
OnViewModelDescriptor_Getter(this, e);
t.Result = e.Result;
}
});
return _triggerFetchViewModelDescriptorTask;
}
开发者ID:daszat,项目名称:zetbox,代码行数:21,代码来源:NavigationEntry.Memory.Designer.cs
示例14: TriggerFetchConstrainedAsync
public Zetbox.API.Async.ZbTask<Zetbox.App.Base.DataType> TriggerFetchConstrainedAsync()
{
if (_triggerFetchConstrainedTask != null) return _triggerFetchConstrainedTask;
if (_fk_Constrained.HasValue)
_triggerFetchConstrainedTask = Context.FindAsync<Zetbox.App.Base.DataType>(_fk_Constrained.Value);
else
_triggerFetchConstrainedTask = new Zetbox.API.Async.ZbTask<Zetbox.App.Base.DataType>(Zetbox.API.Async.ZbTask.Synchron, () => null);
_triggerFetchConstrainedTask.OnResult(t =>
{
if (OnConstrained_Getter != null)
{
var e = new PropertyGetterEventArgs<Zetbox.App.Base.DataType>(t.Result);
OnConstrained_Getter(this, e);
t.Result = e.Result;
}
});
return _triggerFetchConstrainedTask;
}
开发者ID:daszat,项目名称:zetbox,代码行数:21,代码来源:InstanceConstraint.Memory.Designer.cs
示例15: TriggerFetchMitarbeiterAsync
public Zetbox.API.Async.ZbTask<Zetbox.App.Projekte.Mitarbeiter> TriggerFetchMitarbeiterAsync()
{
if (_triggerFetchMitarbeiterTask != null) return _triggerFetchMitarbeiterTask;
if (_fk_Mitarbeiter.HasValue)
_triggerFetchMitarbeiterTask = Context.FindAsync<Zetbox.App.Projekte.Mitarbeiter>(_fk_Mitarbeiter.Value);
else
_triggerFetchMitarbeiterTask = new Zetbox.API.Async.ZbTask<Zetbox.App.Projekte.Mitarbeiter>(Zetbox.API.Async.ZbTask.Synchron, () => null);
_triggerFetchMitarbeiterTask.OnResult(t =>
{
if (OnMitarbeiter_Getter != null)
{
var e = new PropertyGetterEventArgs<Zetbox.App.Projekte.Mitarbeiter>(t.Result);
OnMitarbeiter_Getter(this, e);
t.Result = e.Result;
}
});
return _triggerFetchMitarbeiterTask;
}
开发者ID:daszat,项目名称:zetbox,代码行数:21,代码来源:Auftrag.Memory.Designer.cs
示例16: TriggerFetchRootScreenAsync
public Zetbox.API.Async.ZbTask<Zetbox.App.GUI.NavigationScreen> TriggerFetchRootScreenAsync()
{
if (_triggerFetchRootScreenTask != null) return _triggerFetchRootScreenTask;
if (_fk_RootScreen.HasValue)
_triggerFetchRootScreenTask = Context.FindAsync<Zetbox.App.GUI.NavigationScreen>(_fk_RootScreen.Value);
else
_triggerFetchRootScreenTask = new Zetbox.API.Async.ZbTask<Zetbox.App.GUI.NavigationScreen>(Zetbox.API.Async.ZbTask.Synchron, () => null);
_triggerFetchRootScreenTask.OnResult(t =>
{
if (OnRootScreen_Getter != null)
{
var e = new PropertyGetterEventArgs<Zetbox.App.GUI.NavigationScreen>(t.Result);
OnRootScreen_Getter(this, e);
t.Result = e.Result;
}
});
return _triggerFetchRootScreenTask;
}
开发者ID:daszat,项目名称:zetbox,代码行数:21,代码来源:Application.Memory.Designer.cs
示例17: get_CalculatedEnumeration
public static void get_CalculatedEnumeration(TestObjClass obj, PropertyGetterEventArgs<TestEnum> e)
{
e.Result = obj.ID % 2 == 0
? TestEnum.First
: TestEnum.Second;
}
开发者ID:daszat,项目名称:zetbox,代码行数:6,代码来源:TestObjClassActions.cs
示例18: TriggerFetchDestinationValueAsync
public Zetbox.API.Async.ZbTask<Zetbox.App.Base.EnumerationEntry> TriggerFetchDestinationValueAsync()
{
if (_triggerFetchDestinationValueTask != null) return _triggerFetchDestinationValueTask;
if (_fk_DestinationValue.HasValue)
_triggerFetchDestinationValueTask = Context.FindAsync<Zetbox.App.Base.EnumerationEntry>(_fk_DestinationValue.Value);
else
_triggerFetchDestinationValueTask = new Zetbox.API.Async.ZbTask<Zetbox.App.Base.EnumerationEntry>(Zetbox.API.Async.ZbTask.Synchron, () => null);
_triggerFetchDestinationValueTask.OnResult(t =>
{
if (OnDestinationValue_Getter != null)
{
var e = new PropertyGetterEventArgs<Zetbox.App.Base.EnumerationEntry>(t.Result);
OnDestinationValue_Getter(this, e);
t.Result = e.Result;
}
});
return _triggerFetchDestinationValueTask;
}
开发者ID:daszat,项目名称:zetbox,代码行数:21,代码来源:SourceEnum.Memory.Designer.cs
示例19: TriggerFetchDataAsync
public Zetbox.API.Async.ZbTask<Zetbox.App.Base.SequenceData> TriggerFetchDataAsync()
{
if (_triggerFetchDataTask != null) return _triggerFetchDataTask;
if (_fk_Data.HasValue)
_triggerFetchDataTask = Context.FindAsync<Zetbox.App.Base.SequenceData>(_fk_Data.Value);
else
_triggerFetchDataTask = new Zetbox.API.Async.ZbTask<Zetbox.App.Base.SequenceData>(Zetbox.API.Async.ZbTask.Synchron, () => null);
_triggerFetchDataTask.OnResult(t =>
{
if (OnData_Getter != null)
{
var e = new PropertyGetterEventArgs<Zetbox.App.Base.SequenceData>(t.Result);
OnData_Getter(this, e);
t.Result = e.Result;
}
});
return _triggerFetchDataTask;
}
开发者ID:daszat,项目名称:zetbox,代码行数:21,代码来源:Sequence.Memory.Designer.cs
示例20: TriggerFetchSourceTableAsync
public Zetbox.API.Async.ZbTask<Zetbox.App.SchemaMigration.SourceTable> TriggerFetchSourceTableAsync()
{
if (_triggerFetchSourceTableTask != null) return _triggerFetchSourceTableTask;
if (_fk_SourceTable.HasValue)
_triggerFetchSourceTableTask = Context.FindAsync<Zetbox.App.SchemaMigration.SourceTable>(_fk_SourceTable.Value);
else
_triggerFetchSourceTableTask = new Zetbox.API.Async.ZbTask<Zetbox.App.SchemaMigration.SourceTable>(Zetbox.API.Async.ZbTask.Synchron, () => null);
_triggerFetchSourceTableTask.OnResult(t =>
{
if (OnSourceTable_Getter != null)
{
var e = new PropertyGetterEventArgs<Zetbox.App.SchemaMigration.SourceTable>(t.Result);
OnSourceTable_Getter(this, e);
t.Result = e.Result;
}
});
return _triggerFetchSourceTableTask;
}
开发者ID:daszat,项目名称:zetbox,代码行数:21,代码来源:SourceColumn.Memory.Designer.cs
注:本文中的PropertyGetterEventArgs类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论