本文整理汇总了C#中System.Property.GetCollectionEntryFullName方法的典型用法代码示例。如果您正苦于以下问题:C# Property.GetCollectionEntryFullName方法的具体用法?C# Property.GetCollectionEntryFullName怎么用?C# Property.GetCollectionEntryFullName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Property
的用法示例。
在下文中一共展示了Property.GetCollectionEntryFullName方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
}
示例2: 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);
}