Пример #1
0
        protected override void Load(ContainerBuilder builder)
        {
            builder.RegisterType <InMemoryTransactionsToRebuildRepository>()
            .As <ITransactionsToRebuildRepository>()
            .SingleInstance();

            builder.Register(c => OperationExecutionsRepository.Create(_dbSettings.Nested(x => x.DataConnString), c.Resolve <ILogFactory>()))
            .As <IOperationExecutionsRepository>()
            .SingleInstance();

            builder.Register(c => ActiveTransactionsRepository.Create(_dbSettings.Nested(x => x.DataConnString), c.Resolve <ILogFactory>()))
            .As <IActiveTransactionsRepository>()
            .SingleInstance();

            builder.Register(c => TransactionExecutionsRepository.Create(_dbSettings.Nested(x => x.DataConnString), c.Resolve <ILogFactory>()))
            .As <ITransactionExecutionsRepository>()
            .SingleInstance();

            builder.Register(c => SourceAddressLocksRepository.Create(_dbSettings.Nested(x => x.DataConnString), c.Resolve <ILogFactory>()))
            .As <ISourceAddresLocksRepoistory>()
            .SingleInstance();

            builder.Register(c => CommandHandlerEventRepository.Create(_dbSettings.Nested(x => x.DataConnString),
                                                                       c.Resolve <ILogFactory>(),
                                                                       CommandHandlerEventConfigurer.ConfigureCapturedEvents()))
            .As <ICommandHandlerEventRepository>()
            .SingleInstance();
        }
Пример #2
0
        protected override void Load(ContainerBuilder builder)
        {
            builder.Register(c => TransactionExecutionsRepository.Create(_settingsManager.Nested(x => x.Db.DataConnString), c.Resolve <ILogFactory>()))
            .As <ITransactionExecutionsRepository>()
            .SingleInstance();

            builder.Register(c => DistributedLocker.Create(_settingsManager.Nested(x => x.Db.DataConnString), c.Resolve <ILogFactory>()))
            .As <IDistributedLocker>()
            .SingleInstance();

            builder.Register(c => CommandHandlerEventRepository.Create(_settingsManager.Nested(x => x.Db.DataConnString),
                                                                       c.Resolve <ILogFactory>(),
                                                                       CommandHandlerEventConfigurer.ConfigureCapturedEvents()))
            .As <ICommandHandlerEventRepository>()
            .SingleInstance();
        }