当前位置: 首页>>代码示例>>C#>>正文


C# ClassMappingBase.AddComponent方法代码示例

本文整理汇总了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);
        }
开发者ID:nsreddy1986,项目名称:fluent-nhibernate,代码行数:9,代码来源:ComponentStep.cs

示例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);
        }
开发者ID:erikojebo,项目名称:fluent-nhibernate,代码行数:15,代码来源:ComponentStep.cs

示例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);
        }
开发者ID:sbakshi,项目名称:fluent-nhibernate,代码行数:15,代码来源:AutoMapComponent.cs

示例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);
        }
开发者ID:roelofb,项目名称:fluent-nhibernate,代码行数:19,代码来源:ComponentStep.cs


注:本文中的FluentNHibernate.MappingModel.ClassBased.ClassMappingBase.AddComponent方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。