private static EventsStorage EventsStorage() { var accountKey = Environment.GetEnvironmentVariable("Smartbot_AzureStorage_AccountKey"); var storage = new EventsStorage(accountKey); return(storage); }
public RabbitMQEventBus(IConfiguration configuration, EventsStorage eventsStorage) { this.connection = new RabbitMQConnection(configuration); policy = Policy.Handle <BrokerUnreachableException>() .Or <SocketException>() .Or <InvalidOperationException>() .WaitAndRetry(retry, retryAttempt => TimeSpan.FromSeconds(Math.Pow(2, retryAttempt)), (ex, time) => {}); this.myChannel = CreateConsumerChannel(); this.eventsStorage = eventsStorage; }
public void BindEvents(EventsStorage events) { events.eventsCollection.ForEach(x => { if (x.ErrorMessage != null) { ErrorMsg = x.ErrorMessage; ErrorVisibility = Visibility.Visible; EventsVisibility = Visibility.Visible; } }); this.events = events.eventsCollection; }
public DeviceEventsButton(IEventAggregator eventAggregator, ObservableCollection <FilterExpression> filters, EventsStorage events, INvtSession session, Account currentAccount) : base(eventAggregator, session, currentAccount) { Init(); this.events = events; this.filters = filters; }
public AckHandler(RabbitMQEventBus eventBus, EventsStorage eventStorage) : base(eventBus, null) { this.eventsStorage = eventsStorage; }