本文整理汇总了C#中System.Property.IsCalculated方法的典型用法代码示例。如果您正苦于以下问题:C# Property.IsCalculated方法的具体用法?C# Property.IsCalculated怎么用?C# Property.IsCalculated使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Property
的用法示例。
在下文中一共展示了Property.IsCalculated方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: NotifyingDataProperty
public NotifyingDataProperty(Arebis.CodeGeneration.IGenerationHost _host, IZetboxContext ctx, Serialization.SerializationMembersList serializationList, Property prop)
: this(_host, ctx, serializationList,
prop.GetElementTypeString(),
prop.Name, prop.Module.Namespace, "_" + prop.Name,
prop.IsCalculated(), prop.DisableExport == true,
prop.ObjectClass.Name, prop.IsNullable(),
prop.DefaultValue != null && !prop.IsCalculated(), // No default value for calculated properties, default values are used then for database migration
prop.ExportGuid)
{
}
示例2: NotifyingDataProperty
public NotifyingDataProperty(Arebis.CodeGeneration.IGenerationHost _host, IZetboxContext ctx, Serialization.SerializationMembersList serializationList, Property prop)
: base(_host, ctx, serializationList, prop.GetElementTypeString(), prop.Name, prop.Module.Namespace, "_" + prop.Name, prop.IsCalculated(), prop.DisableExport == true)
{
_prop = prop;
}
示例3: IsPropAvailable
private bool IsPropAvailable(Property prop)
{
if ((FollowRelationsOne || FollowRelationsMany) && prop is ObjectReferenceProperty)
{
var objRefProp = (ObjectReferenceProperty)prop;
return
(FollowRelationsOne && !objRefProp.GetIsList()) ||
(FollowRelationsMany && objRefProp.GetIsList());
}
else if (prop.IsCalculated() && !ShowCalculated)
{
return false;
}
return true;
}
示例4: ApplyPropertyIsValidEvent
protected virtual void ApplyPropertyIsValidEvent(Property p)
{
if (!p.IsCalculated())
{
this.WriteLine();
this.WriteObjects(" public static event PropertyIsValidHandler<", p.ObjectClass.GetDataTypeString(), "> On", p.Name, "_IsValid;");
this.WriteLine();
}
}
示例5: ApplyPropertyEvents
protected virtual void ApplyPropertyEvents(Property p, bool isReadOnly)
{
Properties.PropertyEvents.Call(Host, ctx, p, isReadOnly || p.IsCalculated());
}
示例6: 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);
if (!obj.IsCalculated())
{
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();
}
示例7: ApplyNotifyingValueProperty
protected override void ApplyNotifyingValueProperty(
Property prop,
Templates.Serialization.SerializationMembersList serList)
{
Properties.ProxyProperty.Call(Host, ctx,
serList, prop.Module.Namespace, prop.GetElementTypeString(), prop.Name, false, true,
prop.DefaultValue != null, prop.ObjectClass.GetDataTypeString(),
prop.GetClassName(),
prop.IsNullable(),
"_is" + prop.Name + "Set",
prop.ExportGuid,
prop.GetElementTypeString(),
"Proxy." + prop.Name,
prop.IsCalculated(),
prop.DisableExport == true);
}