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


C# Property.GetElementTypeString方法代码示例

本文整理汇总了C#中System.Property.GetElementTypeString方法的典型用法代码示例。如果您正苦于以下问题:C# Property.GetElementTypeString方法的具体用法?C# Property.GetElementTypeString怎么用?C# Property.GetElementTypeString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Property的用法示例。


在下文中一共展示了Property.GetElementTypeString方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Call

        private static void Call(Arebis.CodeGeneration.IGenerationHost host,
            IZetboxContext ctx,
            Serialization.SerializationMembersList serializationList,
            Property prop, bool hasPersistentOrder, bool isList,
            string collectionWrapperClass,
            string listWrapperClass)
        {
            if (prop == null) { throw new ArgumentNullException("prop"); }
            if (!isList) { throw new ArgumentOutOfRangeException("prop", "prop must be a List-valued property"); }

            string name = prop.Name;
            string backingName = "_" + name;
            string backingCollectionType = (hasPersistentOrder ? listWrapperClass : collectionWrapperClass);

            string exposedCollectionInterface = hasPersistentOrder ? "IList" : "ICollection";

            string thisInterface = prop.ObjectClass.Name;
            string referencedType = prop.GetElementTypeString();
            string referencedCollectionEntry = prop.GetCollectionEntryFullName();
            string referencedCollectionEntryImpl = referencedCollectionEntry + host.Settings["extrasuffix"] + Zetbox.API.Helper.ImplementationSuffix;

            string providerCollectionType = "ObservableCollection<" + referencedCollectionEntryImpl + ">";
            string underlyingCollectionName = "_" + name + "Collection";

            string moduleNamespace = prop.Module.Namespace;

            Call(
                host, ctx, serializationList,
                name, backingName, backingCollectionType, exposedCollectionInterface,
                thisInterface, referencedType,
                referencedCollectionEntry, referencedCollectionEntryImpl,
                providerCollectionType, underlyingCollectionName, !hasPersistentOrder,
                moduleNamespace,
                prop.DisableExport == true);
        }
开发者ID:daszat,项目名称:zetbox,代码行数:35,代码来源:ValueCollectionProperty.cs

示例2: 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

示例3: Call

        public static void Call(Arebis.CodeGeneration.IGenerationHost host,
            IZetboxContext ctx,
            Property prop,
            bool isReadOnly)
        {
            if (host == null) { throw new ArgumentNullException("host"); }
            if (prop == null) { throw new ArgumentNullException("prop"); }

            string eventName = "On" + prop.Name;
            string propType = prop.GetElementTypeString();
            string objType = prop.ObjectClass.GetDataTypeString();

            Call(host, ctx, eventName, propType, objType, true, !isReadOnly);
        }
开发者ID:daszat,项目名称:zetbox,代码行数:14,代码来源:PropertyEvents.cs

示例4: Call

        private static void Call(Arebis.CodeGeneration.IGenerationHost host,
            IZetboxContext ctx,
            Templates.Serialization.SerializationMembersList serializationList,
            Property prop, bool hasPersistentOrder, bool isList, bool orderByValue)
        {
            if (prop == null) { throw new ArgumentNullException("prop"); }
            if (!isList) { throw new ArgumentOutOfRangeException("prop", "prop must be a List-valued property"); }

            string name = prop.Name;
            string backingName = "_" + name;
            string exposedCollectionInterface = hasPersistentOrder ? "IList" : "ICollection";

            string thisInterface = prop.ObjectClass.Name;
            string referencedType = prop.GetElementTypeString();
            string referencedCollectionEntry = prop.GetCollectionEntryFullName();
            string referencedCollectionEntryImpl = referencedCollectionEntry + host.Settings["extrasuffix"] + Zetbox.API.Helper.ImplementationSuffix;
            string referencedCollectionEntryProxy = referencedCollectionEntryImpl + "." + prop.GetCollectionEntryClassName() + "Proxy";

            string providerCollectionType = "ICollection<" + referencedCollectionEntryImpl + ">";
            string underlyingCollectionName = name + "Collection";
            string underlyingCollectionBackingName = backingName + "Collection";
            string moduleNamespace = prop.Module.Namespace;

            string backingCollectionType = (hasPersistentOrder ? "ClientValueListWrapper" : "ClientValueCollectionWrapper")
                + String.Format("<{0}, {1}, {2}, {3}, {4}>",
                    thisInterface,
                    referencedType,
                    referencedCollectionEntry,
                    referencedCollectionEntryImpl,
                    providerCollectionType);

            Call(
                host, ctx, serializationList,
                name, backingName, backingCollectionType, exposedCollectionInterface,
                thisInterface, referencedType, referencedCollectionEntry, referencedCollectionEntryImpl, referencedCollectionEntryProxy,
                providerCollectionType, underlyingCollectionName, underlyingCollectionBackingName,
                orderByValue, moduleNamespace, prop.DisableExport == true);
        }
开发者ID:daszat,项目名称:zetbox,代码行数:38,代码来源:ValueCollectionProperty.cs

示例5: 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

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