当前位置: 首页>>代码示例>>C#>>正文


C# Property.IsCalculated方法代码示例

本文整理汇总了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)
 {
 }
开发者ID:daszat,项目名称:zetbox,代码行数:10,代码来源:NotifyingDataProperty.cs

示例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;
 }
开发者ID:jrgcubano,项目名称:zetbox,代码行数:5,代码来源:NotifyingDataProperty.cs

示例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;
 }
开发者ID:daszat,项目名称:zetbox,代码行数:15,代码来源:PropertySelectionTaskViewModel.cs

示例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();
     }
 }
开发者ID:daszat,项目名称:zetbox,代码行数:9,代码来源:TypeBase.Properties.cs

示例5: ApplyPropertyEvents

 protected virtual void ApplyPropertyEvents(Property p, bool isReadOnly)
 {
     Properties.PropertyEvents.Call(Host, ctx, p, isReadOnly || p.IsCalculated());
 }
开发者ID:daszat,项目名称:zetbox,代码行数:4,代码来源:TypeBase.Properties.cs

示例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();
        }
开发者ID:daszat,项目名称:zetbox,代码行数:17,代码来源:PropertyActions.cs

示例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);
 }
开发者ID:jrgcubano,项目名称:zetbox,代码行数:16,代码来源:Template.cs


注:本文中的System.Property.IsCalculated方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。