コード例 #1
0
        public AutoPersistenceModel(IAutomappingConfiguration cfg)
        {
            this.cfg   = cfg;
            autoMapper = new AutoMapper(cfg, Conventions, inlineOverrides);

            componentResolvers.Add(new AutomappedComponentResolver(autoMapper, cfg));
        }
コード例 #2
0
        public AutoPersistenceModel()
        {
            expressions = new AutoMappingExpressions();
            cfg         = new ExpressionBasedAutomappingConfiguration(expressions);
            autoMapper  = new AutoMapper(cfg, Conventions, inlineOverrides);

            componentResolvers.Add(new AutomappedComponentResolver(autoMapper, cfg));
        }
コード例 #3
0
 public CustomAutoPersistenceModel(
     Container container,
     IAutomappingConfiguration cfg,
     IEventPublisher eventPublisher,
     global::NHibernate.Cfg.Configuration configuration) : base(cfg)
 {
     _container      = container;
     _eventPublisher = eventPublisher;
     _configuration  = configuration;
 }
コード例 #4
0
ファイル: VersionStep.cs プロジェクト: akhuang/NHibernateTest
 public VersionStep(IAutomappingConfiguration cfg)
 {
     this.cfg = cfg;
 }
コード例 #5
0
 public SimpleTypeCollectionStep(IAutomappingConfiguration cfg)
 {
     this.cfg = cfg;
     keys = new AutoKeyMapper();
 }
コード例 #6
0
 public void FixtureSetUp()
 {
     configuration = new DefaultAutomappingConfiguration();
 }
コード例 #7
0
 public CollectionStep(IAutomappingConfiguration cfg)
 {
     this.cfg = cfg;
     keys = new AutoKeyMapper(cfg);
     collections = new AutoCollectionCreator();
 }
コード例 #8
0
 public ReferenceStep(IAutomappingConfiguration cfg)
 {
     this.cfg = cfg;
 }
コード例 #9
0
 public ReferenceStep(IAutomappingConfiguration cfg)
 {
     this.cfg = cfg;
 }
コード例 #10
0
 public ComponentStep(IAutomappingConfiguration cfg)
 {
     this.cfg = cfg;
 }
コード例 #11
0
 public ComponentStep(IAutomappingConfiguration cfg, AutoMapper mapper)
 {
     this.cfg    = cfg;
     this.mapper = mapper;
 }
コード例 #12
0
 public AutoKeyMapper(IAutomappingConfiguration cfg)
 {
     this.cfg = cfg;
 }
コード例 #13
0
 public AutoKeyMapper(IAutomappingConfiguration cfg)
 {
     this.cfg = cfg;
 }
コード例 #14
0
 public HasManyStep(IAutomappingConfiguration cfg)
 {
     simpleTypeCollectionStepStep = new SimpleTypeCollectionStep(cfg);
     collectionStep = new CollectionStep(cfg);
 }
コード例 #15
0
 public CustomHasManyToManyStep(IAutomappingConfiguration cfg)
 {
     _cfg = cfg;
 }
コード例 #16
0
ファイル: AutoMap.cs プロジェクト: mahara/FluentNHibernate
 /// <summary>
 /// Automatically map classes in the assembly that contains <typeparamref name="T"/>.
 /// </summary>
 /// <typeparam name="T">Class in the assembly you want to map</typeparam>
 /// <param name="cfg">Automapping configuration</param>
 public static AutoPersistenceModel AssemblyOf <T>(IAutomappingConfiguration cfg)
 {
     return(Assembly(typeof(T).Assembly, cfg));
 }
コード例 #17
0
ファイル: AutoMap.cs プロジェクト: mahara/FluentNHibernate
 /// <summary>
 /// Automatically map the classes in each assembly supplied.
 /// </summary>
 /// <param name="cfg">Automapping configuration</param>
 /// <param name="assemblies">Assemblies containing classes to map</param>
 public static AutoPersistenceModel Assemblies(IAutomappingConfiguration cfg, IEnumerable <Assembly> assemblies)
 {
     return(Source(new CombinedAssemblyTypeSource(assemblies.Select(x => new AssemblyTypeSource(x))), cfg));
 }
コード例 #18
0
 public CollectionStep(IAutomappingConfiguration cfg)
 {
     this.cfg = cfg;
     keys     = new AutoKeyMapper();
 }
コード例 #19
0
 public IdentityStep(IAutomappingConfiguration cfg)
 {
     this.cfg = cfg;
 }
コード例 #20
0
 /// <summary>
 /// Automatically map the classes in each assembly supplied.
 /// </summary>
 /// <param name="cfg">Automapping configuration</param>
 /// <param name="assemblies">Assemblies containing classes to map</param>
 public static AutoPersistenceModel Assemblies(IAutomappingConfiguration cfg, params Assembly[] assemblies)
 {
     return(Source(new CombinedAssemblyTypeSource(assemblies), cfg));
 }
 public ExplicitHasManyToManyStep(IAutomappingConfiguration configuration, IAutomappingStep defaultManyToManyStep)
 {
     _configuration = configuration;
     _defaultManyToManyStep = defaultManyToManyStep;
 }
コード例 #22
0
 public CustomHasManyToManyStep(IAutomappingConfiguration configuration, IAutomappingStep defaultManyToManyStep)
 {
     Configuration = configuration;
     DefaultManyToManyStep = defaultManyToManyStep;
 }
コード例 #23
0
 public NHibernateSessionFactory(IAutomappingConfiguration mappingConfiguration, Action<FluentConfiguration> databaseCreation)
 {
     this.mappingConfiguration = mappingConfiguration;
     this.databaseCreation = databaseCreation;
     sessionFactory = CreateSessionFactory();
 }
コード例 #24
0
 public PropertyStep(IConventionFinder conventionFinder, IAutomappingConfiguration cfg)
 {
     this.conventionFinder = conventionFinder;
     this.cfg = cfg;
 }
コード例 #25
0
 public PropertyStep(IConventionFinder conventionFinder, IAutomappingConfiguration cfg)
 {
     this.conventionFinder = conventionFinder;
     this.cfg = cfg;
 }
コード例 #26
0
 public HasManyToManyStep(IAutomappingConfiguration cfg)
 {
     this.cfg = cfg;
 }
コード例 #27
0
 public AutomappedComponentResolver(AutoMapper mapper, IAutomappingConfiguration cfg)
 {
     this.mapper = mapper;
     this.cfg    = cfg;
 }
コード例 #28
0
 public INHibernateBuilder UseAutoMapping(IAutomappingConfiguration configuration)
 {
     AutoMap = true;
     AutoMapConfiguration = configuration;
     return(this);
 }
コード例 #29
0
        public FluentAutoMapperConfigurer AutoMappingConfiguration(IAutomappingConfiguration autoMappingConfiguration)
        {
            this.autoMappingConfiguration = autoMappingConfiguration;

            return(this);
        }
コード例 #30
0
ファイル: CodeListStep.cs プロジェクト: randyammar/CoreSharp
 public CodeListStep(IAutomappingConfiguration cfg)
 {
     _cfg  = cfg;
     _keys = new AutoKeyMapper();
 }
コード例 #31
0
ファイル: HasManyStep.cs プロジェクト: akhuang/NHibernateTest
 public HasManyStep(IAutomappingConfiguration cfg)
 {
     simpleTypeCollectionStepStep = new SimpleTypeCollectionStep(cfg);
     collectionStep = new CollectionStep(cfg);
 }
コード例 #32
0
 public AutoPersistenceModel()
 {
     expressions = new AutoMappingExpressions();
     cfg         = new ExpressionBasedAutomappingConfiguration(expressions);
     autoMapper  = new AutoMapper(cfg, Conventions, inlineOverrides);
 }
コード例 #33
0
ファイル: AutoMap.cs プロジェクト: mahara/FluentNHibernate
 /// <summary>
 /// Automatically map the classes in <paramref name="assembly"/>.
 /// </summary>
 /// <param name="assembly">Assembly containing the classes to map</param>
 /// <param name="cfg">Automapping configuration</param>
 public static AutoPersistenceModel Assembly(Assembly assembly, IAutomappingConfiguration cfg)
 {
     return(Source(new AssemblyTypeSource(assembly), cfg));
 }
コード例 #34
0
 public AutoPersistenceModel(IAutomappingConfiguration cfg)
 {
     this.cfg   = cfg;
     autoMapper = new AutoMapper(cfg, Conventions, inlineOverrides);
 }
コード例 #35
0
ファイル: AutoMap.cs プロジェクト: mahara/FluentNHibernate
 /// <summary>
 /// Automatically map the classes exposed through the supplied <see cref="ITypeSource"/>.
 /// </summary>
 /// <param name="source"><see cref="ITypeSource"/> containing classes to map</param>
 /// <param name="cfg">Automapping configuration</param>
 public static AutoPersistenceModel Source(ITypeSource source, IAutomappingConfiguration cfg)
 {
     return(new AutoPersistenceModel(cfg)
            .AddTypeSource(source));
 }
コード例 #36
0
 public VersionStep(IAutomappingConfiguration cfg)
 {
     this.cfg = cfg;
 }
コード例 #37
0
 public AutoMapper(IAutomappingConfiguration cfg, IConventionFinder conventionFinder, IEnumerable <InlineOverride> inlineOverrides)
 {
     this.cfg = cfg;
     this.conventionFinder = conventionFinder;
     this.inlineOverrides  = inlineOverrides;
 }
コード例 #38
0
 public IdentityStep(IAutomappingConfiguration cfg)
 {
     this.cfg = cfg;
 }
 public void FixtureSetUp()
 {
     configuration = new DefaultAutomappingConfiguration();
 }
コード例 #40
0
 public ComponentStep(IAutomappingConfiguration cfg)
 {
     this.cfg = cfg;
 }
コード例 #41
0
 public SimpleTypeCollectionStep(IAutomappingConfiguration cfg)
 {
     this.cfg    = cfg;
     keys        = new AutoKeyMapper(cfg);
     collections = new AutoCollectionCreator();
 }
コード例 #42
0
 public CustomIdentityStep(IAutomappingConfiguration cfg)
 {
     _cfg = cfg;
 }
コード例 #43
0
 public HasManyToManyStep(IAutomappingConfiguration cfg)
 {
     this.cfg = cfg;
 }
コード例 #44
0
 public ComponentStep(IAutomappingConfiguration cfg, AutoMapper mapper)
 {
     this.cfg = cfg;
     this.mapper = mapper;
 }
コード例 #45
0
ファイル: AutoMapper.cs プロジェクト: akhuang/NHibernateTest
 public AutoMapper(IAutomappingConfiguration cfg, IConventionFinder conventionFinder, IEnumerable<InlineOverride> inlineOverrides)
 {
     this.cfg = cfg;
     this.conventionFinder = conventionFinder;
     this.inlineOverrides = inlineOverrides;
 }
コード例 #46
0
 public NHibernateSessionFactory(IAutomappingConfiguration mappingConfiguration)
     : this(mappingConfiguration, ConnectWithSqlServer2008)
 {
 }