public NotificationViewModel(INotificationDataStore notificationData, IUserDataStore dataStore) { NotificationDataStore = notificationData; userDataStore = dataStore; JobRequestPreseters = new ObservableCollection <JobRequestPresenter>(); GetRequest(); App.HubManager.GetHubConnection.On <string>("Notification", (item) => { MainThread.BeginInvokeOnMainThread(() => { try { UpdateUI(item); } catch (Exception ex) { App.Current.MainPage.DisplayAlert("Notification Error", ex.Message, "OK"); } }); }); MessagingCenter.Subscribe <JobRequestPresenter, JobRequestPresenter>(this, "ToRemove", (sender, arg) => { var result = JobRequestPreseters.Remove(arg); //var tempdata = JobRequestPreseters; //JobRequestPreseters = new ObservableCollection<JobRequestPresenter>(tempdata); }); }
public SubscriptionService(ILogger <SubscriptionService> logger, ISubscriptionDataStore subscriptionDataStore, IMediaDataStore mediaDataStore, INotificationDataStore notificationDataStore) { _logger = logger; _subscriptionDataStore = subscriptionDataStore; _mediaDataStore = mediaDataStore; _notificationDataStore = notificationDataStore; }
public NotificationEndpointService(INotificationDataStore notificationDataStore, ILogger <NotificationEndpointService> logger) { _notificationDataStore = notificationDataStore; _logger = logger; }