本文整理汇总了C#中IPropertyMap.GenerateMemberName方法的典型用法代码示例。如果您正苦于以下问题:C# IPropertyMap.GenerateMemberName方法的具体用法?C# IPropertyMap.GenerateMemberName怎么用?C# IPropertyMap.GenerateMemberName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IPropertyMap
的用法示例。
在下文中一共展示了IPropertyMap.GenerateMemberName方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GenerateDLinqOneToManyFields
/*
private System.Nullable<int> _ReportsTo;
private EntityRef<Employee> _ReportsToEmployee;
* */
public static void GenerateDLinqOneToManyFields(IClassMap classMap, IPropertyMap propertyMap, CodeTypeDeclaration classDecl)
{
foreach (IColumnMap columnMap in propertyMap.GetAllColumnMaps())
{
string fieldName = propertyMap.GenerateMemberName(columnMap.Name);
CodeMemberField fieldMember = new CodeMemberField() ;
fieldMember.Name = fieldName;
//Add code for adding Nullable generics when OM is ported to .NET 2.0
CodeTypeReference typeReference = new CodeTypeReference(columnMap.GetSystemType());
fieldMember.Type = typeReference;
classDecl.Members.Add(fieldMember);
}
}
示例2: GenerateDLinqOneToManyProperties
public static void GenerateDLinqOneToManyProperties(IClassMap classMap, IPropertyMap propertyMap, CodeTypeDeclaration classDecl)
{
foreach (IColumnMap columnMap in propertyMap.GetAllColumnMaps())
{
string fieldName = propertyMap.GenerateMemberName(columnMap.Name);
string typeName = columnMap.GetSystemType().ToString();
CodeMemberProperty propertyMember = GenerateDLinqPrimitiveProperty(propertyMap, columnMap.Name, fieldName, typeName);
classDecl.Members.Add(propertyMember);
}
}