コード例 #1
0
ファイル: DebugLogManager.cs プロジェクト: mcgrady525/Log
        static DebugLogManager()
        {
            //Autofac初始化
            container = LogNewHelper.BuildAutofacContainer();

            using (var scope = container.BeginLifetimeScope())
            {
                _debugLogService = scope.Resolve <ILogsDebugLogService>();
            }
        }
コード例 #2
0
        public MainService()
        {
            tasks       = new List <Task>();
            cancelToken = new CancellationTokenSource();

            //Autofac初始化
            container = LogNewHelper.BuildAutofacContainer();

            //rabbitMQ初始化
            var config = System.Configuration.ConfigurationManager.GetSection("rabbitMQ") as RabbitMQConfigurationSection;

            rabbitMQProxy = new RabbitMQWrapper(new RabbitMQConfig
            {
                Host        = config.HostName,
                VirtualHost = config.VHost,
                HeartBeat   = 60,
                AutomaticRecoveryEnabled = true,
                UserName = config.UserName,
                Password = config.Password
            });
        }