static DebugLogManager() { //Autofac初始化 container = LogNewHelper.BuildAutofacContainer(); using (var scope = container.BeginLifetimeScope()) { _debugLogService = scope.Resolve <ILogsDebugLogService>(); } }
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 }); }