Beispiel #1
0
        public AlertEventProcessor(IAlertingConfiguration config, IActionStore dal)
        {
            this.dal      = dal;
            configuration = config;
            var factory = new ConnectionFactory()
            {
                HostName = configuration.MessageQueueHost, UserName = configuration.MessageQueueUserName, Password = configuration.MessageQueuePassword
            };

            connection = factory.CreateConnection();
            channel    = connection.CreateModel();

            channel.QueueDeclare(queue: config.EventListenerQueueName,
                                 durable: true,
                                 exclusive: false,
                                 autoDelete: false,
                                 arguments: null);

            channel.BasicQos(prefetchSize: 0, prefetchCount: 1, global: false);

            var consumer = new EventingBasicConsumer(channel);

            consumer.Received += (source, ea) => {
                OnRequestReceived(ea);
            };

            channel.BasicConsume(queue: config.EventListenerQueueName,
                                 autoAck: false,
                                 consumer: consumer);
        }
 public GroupController(
     IUserSessions users,
     UserToGroupIndex userToGroupIndex,
     GroupsIndex groupsIndex,
     ILogger logger,
     IConfiguration config,
     IActionStore actionStore)
 {
     _users            = users;
     _logger           = logger;
     _userToGroupIndex = userToGroupIndex;
     _groupsIndex      = groupsIndex;
     _config           = config;
 }
        public CommandProcessor(IAlertingConfiguration configuration, IActionStore dal)
        {
            if (configuration == null)
            {
                throw new ArgumentNullException("configuration");
            }

            if (dal == null)
            {
                throw new ArgumentNullException("dal");
            }

            this.configuration = configuration;
            this.dal           = dal;
        }
        private TelemetryClient(
            IApplicationConfiguration applicationConfiguration,
            IPlatformProxy platformProxy,
            IErrorStore errorStore,
            IUploader uploader,
            IActionStore actionStore,
            IScenarioStore scenarioStore,
            ContextStore contextStore,
            bool isScenarioUploadDisabled)
        {
            TelemetryManager = new TelemetryManager(applicationConfiguration, platformProxy, ProcessTelemetryCallback);

            _errorStore               = errorStore;
            _uploader                 = uploader;
            _actionStore              = actionStore;
            _scenarioStore            = scenarioStore;
            _contextStore             = contextStore;
            _isScenarioUploadDisabled = isScenarioUploadDisabled;
        }
Beispiel #5
0
 /// <summary>
 /// 스토어에 식별자를 부여하여 관리되는 스토어를 생성합니다.
 /// </summary>
 /// <param name="store">스토어 객체</param>
 /// <param name="subscriberId">부여할 식별자</param>
 public DisposableStore(IActionStore <TActionBinderSet> store, string subscriberId)
 {
     this.Store        = store;
     this.subscriberId = subscriberId;
 }