コード例 #1
0
        private static ILocalBus Intialize()
        {
            IContainerBuilder containerBuilder = new AutofacAdapter();

            containerBuilder.RegisterConfigurationModule(new InMemory());
            Configuration.Initialize(containerBuilder);
            return(Configuration.Bus);
        }
コード例 #2
0
        private static void Intialize()
        {
            ConsoleWindowLogger.MinimumLogLevel = LogLevel.Debug;
            LogFactory.BuildLogger = type => new ConsoleWindowLogger(type);
            IContainerBuilder containerBuilder = new AutofacAdapter();

            containerBuilder.RegisterConfigurationModule(new InMemory());
            Configuration.Initialize(containerBuilder);
            ServiceLocator.Current.SetCurrentLifetimeScope(Configuration.RootContainer);
        }