public Agent(AppSecret secret, INotificationConsumer consumer, ITokenStore store, IAgentSettings agentSettings) { this.Secret = secret; this.Consumer = consumer; this.Store = store; _agentSettings = agentSettings; _retryWaitSeconds = agentSettings.InitialRetryWaitSeconds; }
public ApnsAgent(AppSecret secret, INotificationConsumer consumer, ITokenStore store) : base(secret, consumer, store, _settings) { _readBuffer = new byte[6]; var feedbackInterval = Settings.Apns.FeedbackIntervalSeconds * 1000; _feedbackTimer = new Timer(OnQueryFeedback, null, feedbackInterval, feedbackInterval); }
public NotificationEventArgs(INotificationConsumer consumer, string deviceToken, uint expiry, JObject payload, object tag) { _consumer = consumer; _acked = false; this.DeviceToken = deviceToken; this.Expiry = expiry; this.Payload = payload; this.Tag = tag; }
public void SubstrubeTo(INotificationConsumer consumer) { Xamarin.Forms.Device.StartTimer(TimeSpan.FromSeconds(2), () => { try { IEnumerable <NotificationEntity> notify = gateway.GetNotifications(consumer.Account.Id).Result; --count; DispatcherEx.BeginRise(() => consumer.OnNotificationsReceived(notify.Map <NotificationEntity, NotificationModel>())); if (count == 0) { return(false); } } catch (Exception ex) { ex.ToString(); } return(true); }); }
public WnsAgent(AppSecret secret, INotificationConsumer consumer, ITokenStore store) : base(secret, consumer, store, _settings) { }
public NotificationConsumerWorker(INotificationConsumer notificationConsumer, IServiceScopeFactory scopeFactory) { _notificationConsumer = notificationConsumer; _scopeFactory = scopeFactory; }