Exemple #1
0
        private static EventsStorage EventsStorage()
        {
            var accountKey = Environment.GetEnvironmentVariable("Smartbot_AzureStorage_AccountKey");
            var storage    = new EventsStorage(accountKey);

            return(storage);
        }
Exemple #2
0
 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;
 }
Exemple #4
0
 public DeviceEventsButton(IEventAggregator eventAggregator, ObservableCollection <FilterExpression> filters, EventsStorage events, INvtSession session, Account currentAccount)
     : base(eventAggregator, session, currentAccount)
 {
     Init();
     this.events  = events;
     this.filters = filters;
 }
Exemple #5
0
 public AckHandler(RabbitMQEventBus eventBus, EventsStorage eventStorage) : base(eventBus, null)
 {
     this.eventsStorage = eventsStorage;
 }