本文整理汇总了C#中IClassMap.GetSortedEnumValueMaps方法的典型用法代码示例。如果您正苦于以下问题:C# IClassMap.GetSortedEnumValueMaps方法的具体用法?C# IClassMap.GetSortedEnumValueMaps怎么用?C# IClassMap.GetSortedEnumValueMaps使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IClassMap
的用法示例。
在下文中一共展示了IClassMap.GetSortedEnumValueMaps方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: VerifyClassMap
//.........这里部分代码省略.........
else
{
}
if (classMap.InheritanceType != InheritanceType.None)
{
if (classMap.TypeValue.Length < 1)
{
HandleVerifyException(classMap, "Type value must not be empty for class in inheritance hierarchy! (" + GetClassType(classMap) + ": '" + classMap.Name + "', Type value: '" + classMap.TypeValue + "')", "TypeValue"); // do not localize
}
if (checkMappings)
{
if (classMap.GetTypeColumnMap() == null)
{
HandleVerifyException(classMap, "Type column not found! Class in inheritance hierarchy must have a type column! (" + GetClassType(classMap) + ": '" + classMap.Name + "', Type column: '" + classMap.TypeColumn + "')", "TypeColumn"); // do not localize
}
}
}
else
{
}
}
if (classMap.ClassType == ClassType.Enum)
{
if (classMap.InheritsClass.Length > 0)
{
HandleVerifyException(classMap, "Enumerations can not inherit! (Enumeration: '" + classMap.Name + "', Inherits: '" + classMap.InheritsClass + "'", "InheritsClass"); // do not localize
}
if (classMap.PropertyMaps.Count > 0)
{
HandleVerifyException(classMap, "Enumerations can not have properties! (Enumeration: '" + classMap.Name + "'", "PropertyMaps"); // do not localize
}
if (classMap.GetSortedEnumValueMaps(ref failedSorting).Count < 1)
{
HandleVerifyException(classMap, "Enumeration must have at least one enumeration value! (" + GetClassType(classMap) + ": '" + classMap.Name + "')", "PropertyMaps"); // do not localize
}
if (failedSorting)
{
HandleVerifyException(classMap, "Failed sorting enumeration values due to invalid indexes! (" + GetClassType(classMap) + ": '" + classMap.Name + "')", "PropertyMaps"); // do not localize
}
}
else
{
if (classMap.EnumValueMaps.Count > 0)
{
HandleVerifyException(classMap, "Only enumerations can have enumeration values! (" + GetClassType(classMap) + ": '" + classMap.Name + "'", "PropertyMaps"); // do not localize
}
}
if (classMap.ClassType == ClassType.Interface)
{
if (classMap.InheritsClass.Length > 0)
{
IClassMap super = classMap.GetInheritedClassMap() ;
if (super != null)
{
if (super.ClassType != ClassType.Interface)
{
HandleVerifyException(classMap, "Interfaces can only inherit other interfaces! (Interface: '" + classMap.Name + "', Inherits: '" + classMap.InheritsClass + "'", "InheritsClass"); // do not localize
}
}
}
}