Пример #1
0
        private static void InitializeENode()
        {
            ConfigSettings.Initialize();

            var assemblies = new[]
            {
                Assembly.Load("Conference.Common"),
                Assembly.Load("ConferenceManagement.Domain"),
                Assembly.Load("ConferenceManagement.CommandHandlers"),
                Assembly.Load("ConferenceManagement.MessagePublishers"),
                Assembly.Load("ConferenceManagement.ReadModel"),
                Assembly.Load("ConferenceManagement.Repositories.Dapper"),
                Assembly.Load("ConferenceManagement.ProcessorHost")
            };
            var setting = new ConfigurationSetting
            {
                SqlServerDefaultConnectionString = ConfigSettings.ConferenceENodeConnectionString
            };

            _enodeConfiguration = _ecommonConfiguration
                                  .CreateENode(setting)
                                  .RegisterENodeComponents()
                                  .RegisterBusinessComponents(assemblies)
                                  .RegisterAllTypeCodes()
                                  .UseSqlServerLockService()
                                  .UseSqlServerCommandStore()
                                  .UseSqlServerEventStore()
                                  .UseSqlServerSequenceMessagePublishedVersionStore()
                                  .UseSqlServerMessageHandleRecordStore()
                                  .UseEQueue()
                                  .InitializeBusinessAssemblies(assemblies);
            ObjectContainer.Resolve <ILockService>().AddLockKey(typeof(ConferenceSlugIndex).Name);
            _logger.Info("ENode initialized.");
        }
Пример #2
0
        private static void InitializeENode()
        {
            ConfigSettings.Initialize();

            var assemblies = new[]
            {
                Assembly.Load("Conference.Common"),
                Assembly.Load("Registration.Domain"),
                Assembly.Load("Registration.CommandHandlers"),
                Assembly.Load("Registration.ProcessManagers"),
                Assembly.Load("Registration.ReadModel"),
                Assembly.Load("Registration.ProcessorHost")
            };
            var setting = new ConfigurationSetting
            {
                SqlServerDefaultConnectionString = ConfigSettings.ConferenceENodeConnectionString
            };

            _enodeConfiguration = _ecommonConfiguration
                                  .CreateENode(setting)
                                  .RegisterENodeComponents()
                                  .RegisterBusinessComponents(assemblies)
                                  .RegisterAllTypeCodes()
                                  .UseSqlServerLockService()
                                  .UseSqlServerCommandStore()
                                  .UseSqlServerEventStore()
                                  .UseSqlServerSequenceMessagePublishedVersionStore()
                                  .UseSqlServerMessageHandleRecordStore()
                                  .UseEQueue()
                                  .InitializeBusinessAssemblies(assemblies);
            _logger.Info("ENode initialized.");
        }