예제 #1
0
 public NotificationProvider(IProviderClient providerClient,
                             INotificationServiceClient serviceClient,
                             IUserNotificationSettingsRepository repository)
 {
     _providerClient = providerClient;
     _serviceClient  = serviceClient;
     _repository     = repository;
 }
 public ConversationController(IConversationStore store, ILogger <ConversationController> logger,
                               IMetricsClient client, INotificationServiceClient notificationService)
 {
     this.store  = store;
     this.logger = logger;
     this.notificationService = notificationService;
     PostMessageMetric        = client.CreateAggregateMetric("PostMessageTime");
     GetMessagesMetric        = client.CreateAggregateMetric("GetMessageTime");
 }
예제 #3
0
 public ConversationsController(IConversationStore store, IMetricsClient client,
                                ILogger <ConversationsController> logger, IProfileStore profileStore, INotificationServiceClient notificationService)
 {
     this.store               = store;
     this.logger              = logger;
     this.profileStore        = profileStore;
     this.notificationService = notificationService;
     PostConversationMetric   = client.CreateAggregateMetric("PostConversationTime");
     GetConversationMetric    = client.CreateAggregateMetric("GetConversationTime");
 }
예제 #4
0
 public UserNotificationSettingsUpdatedHandler(IHandler handler,
                                               IUserNotificationSettingsRepository repository,
                                               INotificationServiceClient serviceClient,
                                               IUserNotificationSettingsCache cache)
 {
     _handler       = handler;
     _repository    = repository;
     _serviceClient = serviceClient;
     _cache         = cache;
 }
예제 #5
0
        public MainViewModel(
            IChartSettingDataService service,
            INotificationServiceClient notification,
            IEventAggregator eventAggregator,
            Func <IChartViewModel> chartModel)
        {
            _service         = service;
            _eventAggregator = eventAggregator;
            _chartModel      = chartModel;
            _notification    = notification;

            _eventAggregator.GetEvent <ChartViewItemEvent>().Subscribe(OnChartItemView);

            SaveCommand   = new DelegateCommand(OnSaveExecute, OnSaveCanExecute);
            DeleteCommand = new DelegateCommand(OnDeleteExecute, OnDeleteCanExecute);
            AddNewCommand = new DelegateCommand(OnAddNewExecute, OnAddNewCanExecute);

            _notification.OpenConnection(new Uri(ConfigurationManager.ConnectionStrings["NotificationRemote"].ConnectionString));

            _notification.EventMessage += OnNotificationRecieved;
        }
예제 #6
0
        private void OnNotificationRecieved(INotificationServiceClient s, NotificationPayload message)
        {
            Dispatcher?.Invoke(() =>
            {
                switch (message.Notification)
                {
                case Notifications.Error:
                    Debug.WriteLine(message);
                    break;

                case Notifications.Connect:
                    Debug.WriteLine("CONNECTED");
                    break;

                case Notifications.Disconnect:
                    Debug.WriteLine("DISCONNECTED");
                    break;

                case Notifications.Notify:
                    ChartViewModel?.LoadAsync(SelectedItem);
                    break;
                }
            });
        }
예제 #7
0
 public PaymentController(IPaymentDatabase paymentDatabase, INotificationServiceClient notificationServiceClient)
 {
     _paymentDatabase           = paymentDatabase;
     _notificationServiceClient = notificationServiceClient;
 }
예제 #8
0
 public CartController(INotificationServiceClient notificationServiceClient)
 {
     _notificationServiceClient = notificationServiceClient;
 }
 public NotificationsHubNegotiateQueryHandler(INotificationServiceClient notificationServiceClient) =>
예제 #10
0
 public CustomerController(ICustomerDatabase customerDatabase, INotificationServiceClient notificationServiceClient)
 {
     _customerDatabase          = customerDatabase;
     _notificationServiceClient = notificationServiceClient;
 }
 public NotificationClientResiliencyDecorator(INotificationServiceClient notificationClient,
                                              IResiliencyPolicy resiliencyPolicy)
 {
     this.resiliencyPolicy   = resiliencyPolicy;
     this.notificationClient = notificationClient;
 }