本文整理汇总了C#中Relation.GetRelationFullName方法的典型用法代码示例。如果您正苦于以下问题:C# Relation.GetRelationFullName方法的具体用法?C# Relation.GetRelationFullName怎么用?C# Relation.GetRelationFullName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Relation
的用法示例。
在下文中一共展示了Relation.GetRelationFullName方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Call
public static void Call(Arebis.CodeGeneration.IGenerationHost host,
IZetboxContext ctx,
Templates.Serialization.SerializationMembersList serializationList,
Relation rel, RelationEndRole endRole, string backingCollectionType)
{
if (host == null) { throw new ArgumentNullException("host"); }
if (rel == null) { throw new ArgumentNullException("rel"); }
RelationEnd relEnd = rel.GetEndFromRole(endRole);
RelationEnd otherEnd = rel.GetOtherEnd(relEnd);
string name = relEnd.Navigator.Name;
string exposedCollectionInterface = rel.NeedsPositionStorage(otherEnd.GetRole()) ? "IList" : "ICollection";
string referencedInterface = otherEnd.Type.GetDataTypeString();
string backingName = "_" + name;
string aSideType = rel.A.Type.GetDataTypeString();
string bSideType = rel.B.Type.GetDataTypeString();
string entryType = rel.GetRelationFullName() + host.Settings["extrasuffix"] + Zetbox.API.Helper.ImplementationSuffix;
string providerCollectionType = (rel.NeedsPositionStorage(otherEnd.GetRole()) ? "IList<" : "ICollection<")
+ entryType + ">";
bool eagerLoading = relEnd.Navigator != null && relEnd.Navigator.EagerLoading;
bool serializeRelationEntries = rel.GetRelationType() == RelationType.n_m;
string entryProxyType = entryType + "." + rel.GetRelationClassName() + "Proxy";
string inverseNavigatorName = otherEnd.Navigator != null ? otherEnd.Navigator.Name : null;
Call(host, ctx, serializationList, name, exposedCollectionInterface, referencedInterface, backingName, backingCollectionType, aSideType, bSideType, entryType, providerCollectionType, rel.ExportGuid, endRole, eagerLoading, serializeRelationEntries, entryProxyType, inverseNavigatorName);
}