本文整理汇总了C#中FluentNHibernate.MappingModel.ClassBased.ClassMappingBase.AddComponent方法的典型用法代码示例。如果您正苦于以下问题:C# ClassMappingBase.AddComponent方法的具体用法?C# ClassMappingBase.AddComponent怎么用?C# ClassMappingBase.AddComponent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FluentNHibernate.MappingModel.ClassBased.ClassMappingBase
的用法示例。
在下文中一共展示了ClassMappingBase.AddComponent方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Map
public void Map(ClassMappingBase classMap, Member member)
{
// don't map the component here, mark it as a reference which'll
// allow us to integrate with ComponentMap or automap at a later
// stage
var mapping = new ReferenceComponentMapping(ComponentType.Component, member, member.PropertyType, classMap.Type, cfg.GetComponentColumnPrefix(member));
classMap.AddComponent(mapping);
}
示例2: Map
public void Map(ClassMappingBase classMap, Member property)
{
var mapping = new ComponentMapping(ComponentType.Component)
{
Name = property.Name,
Member = property,
ContainingEntityType = classMap.Type,
Type = property.PropertyType
};
mapper.FlagAsMapped(property.PropertyType);
mapper.MergeMap(property.PropertyType, mapping, new List<Member>());
classMap.AddComponent(mapping);
}
示例3: Map
public void Map(ClassMappingBase classMap, PropertyInfo property)
{
var mapping = new ComponentMapping
{
Name = property.Name,
PropertyInfo = property,
ContainingEntityType = classMap.Type,
Type = property.PropertyType
};
mapper.FlagAsMapped(property.PropertyType);
mapper.MergeMap(property.PropertyType, mapping, new List<string>());
classMap.AddComponent(mapping);
}
示例4: Map
public void Map(ClassMappingBase classMap, Member member)
{
var mapping = new ComponentMapping(ComponentType.Component)
{
Name = member.Name,
Member = member,
ContainingEntityType = classMap.Type,
Type = member.PropertyType,
ColumnPrefix = cfg.GetComponentColumnPrefix(member)
};
if (member.IsProperty && !member.CanWrite)
mapping.Access = cfg.GetAccessStrategyForReadOnlyProperty(member).ToString();
mapper.FlagAsMapped(member.PropertyType);
mapper.MergeMap(member.PropertyType, mapping, new List<Member>());
classMap.AddComponent(mapping);
}