本文整理匯總了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);
}