public ApplePushService(IPushChannelFactory pushChannelFactory, ApplePushChannelSettings channelSettings, IPushServiceSettings serviceSettings) : base(pushChannelFactory ?? new ApplePushChannelFactory(), channelSettings, serviceSettings) { var appleChannelSettings = channelSettings; cancelTokenSource = new CancellationTokenSource(); //allow control over feedback call interval, if set to zero, don't make feedback calls automatically if (appleChannelSettings.FeedbackIntervalMinutes > 0) { feedbackService = new FeedbackService(); feedbackService.OnFeedbackReceived += feedbackService_OnFeedbackReceived; feedbackService.OnFeedbackException += (Exception ex) => this.RaiseServiceException (ex); if (timerFeedback == null) { timerFeedback = new Timer(new TimerCallback((state) => { try { feedbackService.Run(channelSettings as ApplePushChannelSettings, this.cancelTokenSource.Token); } catch (Exception ex) { base.RaiseServiceException(ex); } //Timer will run first after 10 seconds, then every 10 minutes to get feedback! }), null, TimeSpan.FromSeconds(10), TimeSpan.FromMinutes(appleChannelSettings.FeedbackIntervalMinutes)); } } //Apple has documented that they only want us to use 20 connections to them base.ServiceSettings.MaxAutoScaleChannels = 20; }
public static void RegisterWindowsService(this IPushBroker broker, WindowsPushChannelSettings channelSettings, string applicationId, IPushServiceSettings serviceSettings = null) { var service = new WindowsPushService(new WindowsPushChannelFactory(), channelSettings, serviceSettings); broker.RegisterService<WindowsRawNotification>(service, applicationId); broker.RegisterService<WindowsTileNotification>(service, applicationId); broker.RegisterService<WindowsToastNotification>(service, applicationId); broker.RegisterService<WindowsBadgeNumericNotification>(service, applicationId); broker.RegisterService<WindowsBadgeGlyphNotification>(service, applicationId); }
public static void RegisterWindowsPhoneService(this PushBroker broker, WindowsPhonePushChannelSettings channelSettings, string applicationId, IPushServiceSettings serviceSettings = null) { var service = new WindowsPhonePushService(new WindowsPhonePushChannelFactory(), channelSettings, serviceSettings); broker.RegisterService<WindowsPhoneCycleTileNotification>(service, applicationId); broker.RegisterService<WindowsPhoneFlipTileNotification>(service, applicationId); broker.RegisterService<WindowsPhoneIconicTileNotification>(service, applicationId); broker.RegisterService<WindowsPhoneTileNotification>(service, applicationId); broker.RegisterService<WindowsPhoneToastNotification>(service, applicationId); broker.RegisterService<WindowsPhoneRawNotification>(service, applicationId); }
protected PushServiceBase(IPushChannelFactory pushChannelFactory, IPushChannelSettings channelSettings, IPushServiceSettings serviceSettings) { this.PushChannelFactory = pushChannelFactory; this.ServiceSettings = serviceSettings ?? new PushServiceSettings(); this.ChannelSettings = channelSettings; this.queuedNotifications = new ConcurrentQueue <INotification>(); timerCheckScale = new Timer(CheckScale, null, TimeSpan.FromSeconds(5), TimeSpan.FromSeconds(5)); CheckScale(); stopping = false; }
protected PushServiceBase(IPushChannelFactory pushChannelFactory, IPushChannelSettings channelSettings, IPushServiceSettings serviceSettings) { this.PushChannelFactory = pushChannelFactory; this.ServiceSettings = serviceSettings ?? new PushServiceSettings(); this.ChannelSettings = channelSettings; this.queuedNotifications = new ConcurrentQueue<INotification>(); timerCheckScale = new Timer(CheckScale, null, TimeSpan.FromSeconds(15), TimeSpan.FromSeconds(15)); CheckScale(); stopping = false; }
public static void RegisterC2dmService(this IPushBroker broker, C2dmPushChannelSettings channelSettings, string applicationId, IPushServiceSettings serviceSettings = null) { broker.RegisterService<C2dmNotification>(new C2dmPushService(channelSettings, serviceSettings), applicationId); }
public ApplePushService(ApplePushChannelSettings channelSettings, IPushServiceSettings serviceSettings) : this((IPushChannelFactory)null, channelSettings, serviceSettings) { }
public static void RegisterChromeGcmService(this PushBroker broker, ChromePushChannelSettings channelSettings, IPushServiceSettings serviceSettings = null) { RegisterChromeGcmService (broker, channelSettings, null, serviceSettings); }
public GcmPushService(IPushChannelFactory pushChannelFactory, GcmPushChannelSettings channelSettings, IPushServiceSettings serviceSettings) : base(pushChannelFactory ?? new GcmPushChannelFactory(), channelSettings, serviceSettings) { }
public ApplePushService(IPushChannelFactory pushChannelFactory, ApplePushChannelSettings channelSettings, IPushServiceSettings serviceSettings) : base(pushChannelFactory ?? (IPushChannelFactory) new ApplePushChannelFactory(), (IPushChannelSettings)channelSettings, serviceSettings) { ApplePushService applePushService = this; ApplePushChannelSettings pushChannelSettings = channelSettings; this.cancelTokenSource = new CancellationTokenSource(); if (pushChannelSettings.FeedbackIntervalMinutes > 0) { this.feedbackService = new FeedbackService(); this.feedbackService.OnFeedbackReceived += new FeedbackService.FeedbackReceivedDelegate(this.feedbackService_OnFeedbackReceived); this.feedbackService.OnFeedbackException += (FeedbackService.FeedbackExceptionDelegate)(ex => applePushService.RaiseServiceException(ex)); if (this.timerFeedback == null) { this.timerFeedback = new Timer((TimerCallback)(state => { try { applePushService.feedbackService.Run(channelSettings, applePushService.cancelTokenSource.Token); } catch (Exception ex) { applePushService.RaiseServiceException(ex); } }), (object)null, TimeSpan.FromSeconds(10.0), TimeSpan.FromMinutes((double)pushChannelSettings.FeedbackIntervalMinutes)); } } this.ServiceSettings.MaxAutoScaleChannels = 20; }
public static void RegisterWindowsPhoneService(this PushBroker broker, WindowsPhonePushChannelSettings channelSettings, IPushServiceSettings serviceSettings = null) { RegisterWindowsPhoneService (broker, channelSettings, null, serviceSettings); }
public static void RegisterAppleService(this PushBroker broker, ApplePushChannelSettings channelSettings, string applicationId, IPushServiceSettings serviceSettings = null) { broker.RegisterService <AppleNotification>(new ApplePushService(channelSettings, serviceSettings), applicationId); }
public static void RegisterGcmService(this PushBroker broker, GcmPushChannelSettings channelSettings, string applicationId, IPushServiceSettings serviceSettings = null) { broker.RegisterService <GcmNotification>(new GcmPushService(new GcmPushChannelFactory(), channelSettings, serviceSettings), applicationId); }
protected PushServiceBase(IPushChannelFactory pushChannelFactory, IPushChannelSettings channelSettings, IPushServiceSettings serviceSettings) { this.PushChannelFactory = pushChannelFactory; this.ServiceSettings = serviceSettings ?? (IPushServiceSettings) new PushServiceSettings(); this.ChannelSettings = channelSettings; this.queuedNotifications = new NotificationQueue(); this.scaleSync = 0; this.timerCheckScale = new Timer(new TimerCallback(this.CheckScale), (object)null, TimeSpan.FromSeconds(5.0), TimeSpan.FromSeconds(5.0)); this.CheckScale((object)null); this.stopping = false; }
public BISPushService(IPushChannelFactory pushChannelFactory, BISPushChannelSettings channelSettings, IPushServiceSettings serviceSettings) : base(pushChannelFactory ?? new BISPushChannelFactory(), channelSettings ?? new BISPushChannelSettings(), serviceSettings) { }
public static void RegisterC2dmService(this IPushBroker broker, C2dmPushChannelSettings channelSettings, string applicationId, IPushServiceSettings serviceSettings = null) { broker.RegisterService <C2dmNotification>(new C2dmPushService(channelSettings, serviceSettings), applicationId); }
public static void RegisterAdmService(this IPushBroker broker, AdmPushChannelSettings channelSettings, string applicationId, IPushServiceSettings serviceSettings = null) { broker.RegisterService <AdmNotification>(new AdmPushService(new AdmPushChannelFactory(), channelSettings, serviceSettings)); }
public static void RegisterBlackberryService(this PushBroker broker, BlackberryPushChannelSettings channelSettings, string applicationId = null, IPushServiceSettings serviceSettings = null) { broker.RegisterService <BlackberryNotification>(new BlackberryPushService(channelSettings, serviceSettings), applicationId); }
public static void RegisterWindowsService(this IPushBroker broker, WindowsPushChannelSettings channelSettings, string applicationId, IPushServiceSettings serviceSettings = null) { var service = new WindowsPushService(new WindowsPushChannelFactory(), channelSettings, serviceSettings); broker.RegisterService <WindowsRawNotification>(service, applicationId); broker.RegisterService <WindowsTileNotification>(service, applicationId); broker.RegisterService <WindowsToastNotification>(service, applicationId); broker.RegisterService <WindowsBadgeNumericNotification>(service, applicationId); broker.RegisterService <WindowsBadgeGlyphNotification>(service, applicationId); }
public static void RegisterChromeGcmService(this IPushBroker broker, ChromePushChannelSettings channelSettings, string applicationId = null, IPushServiceSettings serviceSettings = null) { broker.RegisterService <ChromeNotification>(new ChromePushService(channelSettings, serviceSettings), applicationId); }
public BlackberryPushService(BlackberryPushChannelSettings channelSettings, IPushServiceSettings serviceSettings) : this(default(IPushChannelFactory), channelSettings, serviceSettings) { }
public static void RegisterWindowsPhoneService(this PushBroker broker, string applicationId, IPushServiceSettings serviceSettings = null) { RegisterWindowsPhoneService (broker, null, applicationId, serviceSettings); }
public BlackberryPushService(IPushChannelFactory pushChannelFactory, BlackberryPushChannelSettings channelSettings, IPushServiceSettings serviceSettings) : base(pushChannelFactory ?? new BisPushChannelFactory(), channelSettings ?? new BlackberryPushChannelSettings(), serviceSettings) { }
public ApplePushService(ApplePushChannelSettings channelSettings, IPushServiceSettings serviceSettings) : this(default(IPushChannelFactory), channelSettings, serviceSettings) { }
public static void RegisterBlackberryService(this PushBroker broker, BlackberryPushChannelSettings channelSettings, IPushServiceSettings serviceSettings = null) { RegisterBlackberryService (broker, channelSettings, null, serviceSettings); }
public static void RegisterChromeGcmService(this PushBroker broker, ChromePushChannelSettings channelSettings, string applicationId = null, IPushServiceSettings serviceSettings = null) { broker.RegisterService<ChromeNotification>(new ChromePushService(channelSettings, serviceSettings), applicationId); }
public static void RegisterAdmService(this IPushBroker broker, AdmPushChannelSettings channelSettings, IPushServiceSettings serviceSettings = null) { RegisterAdmService (broker, channelSettings, null, serviceSettings); }
public FacebookPushService(FacebookPushChannelSettings channelSettings, IPushServiceSettings serviceSettings) : this(default(IPushChannelFactory), channelSettings, serviceSettings) { }
public static void RegisterBISService(this PushBroker broker, BISPushChannelSettings channelSettings, IPushServiceSettings serviceSettings = null) { broker.RegisterService <BISNotification>(new BISPushService(channelSettings, serviceSettings)); }
public static void RegisterAppleService(this PushBroker broker, ApplePushChannelSettings channelSettings, string applicationId, IPushServiceSettings serviceSettings = null) { broker.RegisterService<AppleNotification>(new ApplePushService(channelSettings, serviceSettings), applicationId); }
public WindowsPushService(WindowsPushChannelSettings channelSettings, IPushServiceSettings serviceSettings) : this(default(IPushChannelFactory), channelSettings, serviceSettings) { }
public static void RegisterAdmService(this IPushBroker broker, AdmPushChannelSettings channelSettings, string applicationId, IPushServiceSettings serviceSettings = null) { broker.RegisterService<AdmNotification>(new AdmPushService(new AdmPushChannelFactory(), channelSettings, serviceSettings)); }
public WindowsPushService(IPushChannelFactory pushChannelFactory, WindowsPushChannelSettings channelSettings, IPushServiceSettings serviceSettings) : base(pushChannelFactory ?? new WindowsPushChannelFactory(), channelSettings, serviceSettings) { }
public FacebookPushService(IPushChannelFactory pushChannelFactory, FacebookPushChannelSettings channelSettings, IPushServiceSettings serviceSettings) : base(pushChannelFactory ?? new FacebookPushChannelFactory(), channelSettings, serviceSettings) { }
public WindowsPhonePushService(WindowsPhonePushChannelSettings channelSettings, IPushServiceSettings serviceSettings) : this(default(IPushChannelFactory), channelSettings, serviceSettings) { }
public static void RegisterBlackberryService(this PushBroker broker, BlackberryPushChannelSettings channelSettings, IPushServiceSettings serviceSettings = null) { RegisterBlackberryService(broker, channelSettings, null, serviceSettings); }
public WindowsPhonePushService(IPushChannelFactory pushChannelFactory, WindowsPhonePushChannelSettings channelSettings, IPushServiceSettings serviceSettings) : base(pushChannelFactory ?? new WindowsPhonePushChannelFactory(), channelSettings ?? new WindowsPhonePushChannelSettings(), serviceSettings) { }
public static void RegisterChromeGcmService(this IPushBroker broker, ChromePushChannelSettings channelSettings, IPushServiceSettings serviceSettings = null) { RegisterChromeGcmService(broker, channelSettings, null, serviceSettings); }
public static void RegisterWindowsPhoneService(this PushBroker broker, string applicationId, IPushServiceSettings serviceSettings = null) { RegisterWindowsPhoneService(broker, null, applicationId, serviceSettings); }
public static void RegisterAppleService(this PushBroker broker, ApplePushChannelSettings channelSettings, IPushServiceSettings serviceSettings = null) { RegisterAppleService(broker, channelSettings, null, serviceSettings); }
public static void RegisterWindowsPhoneService(this PushBroker broker, IPushServiceSettings serviceSettings = null) { RegisterWindowsPhoneService(broker, null, null, serviceSettings); }
public static void RegisterWindowsPhoneService(this PushBroker broker, IPushServiceSettings serviceSettings = null) { RegisterWindowsPhoneService (broker, null, null, serviceSettings); }
public static void RegisterWindowsPhoneService(this PushBroker broker, WindowsPhonePushChannelSettings channelSettings, IPushServiceSettings serviceSettings = null) { RegisterWindowsPhoneService(broker, channelSettings, null, serviceSettings); }
public static void RegisterWindowsPhoneService(this PushBroker broker, WindowsPhonePushChannelSettings channelSettings, string applicationId, IPushServiceSettings serviceSettings = null) { var service = new WindowsPhonePushService(new WindowsPhonePushChannelFactory(), channelSettings, serviceSettings); broker.RegisterService <WindowsPhoneCycleTileNotification>(service, applicationId); broker.RegisterService <WindowsPhoneFlipTileNotification>(service, applicationId); broker.RegisterService <WindowsPhoneIconicTileNotification>(service, applicationId); broker.RegisterService <WindowsPhoneTileNotification>(service, applicationId); broker.RegisterService <WindowsPhoneToastNotification>(service, applicationId); broker.RegisterService <WindowsPhoneRawNotification>(service, applicationId); }
public static void RegisterBlackberryService(this PushBroker broker, BlackberryPushChannelSettings channelSettings, string applicationId = null, IPushServiceSettings serviceSettings = null) { broker.RegisterService<BlackberryNotification>(new BlackberryPushService(channelSettings, serviceSettings), applicationId); }
public ApplePushService(IPushChannelFactory pushChannelFactory, ApplePushChannelSettings channelSettings, IPushServiceSettings serviceSettings) : base(pushChannelFactory ?? new ApplePushChannelFactory(), channelSettings, serviceSettings) { var appleChannelSettings = channelSettings; cancelTokenSource = new CancellationTokenSource(); //allow control over feedback call interval, if set to zero, don't make feedback calls automatically if (appleChannelSettings.FeedbackIntervalMinutes > 0) { feedbackService = new FeedbackService(); feedbackService.OnFeedbackReceived += feedbackService_OnFeedbackReceived; feedbackService.OnFeedbackException += (Exception ex) => this.RaiseServiceException(ex); if (timerFeedback == null) { timerFeedback = new Timer(new TimerCallback((state) => { try { feedbackService.Run(channelSettings as ApplePushChannelSettings, this.cancelTokenSource.Token); } catch (Exception ex) { base.RaiseServiceException(ex); } //Timer will run first after 10 seconds, then every 10 minutes to get feedback! }), null, TimeSpan.FromSeconds(10), TimeSpan.FromMinutes(appleChannelSettings.FeedbackIntervalMinutes)); } } //Apple has documented that they only want us to use 20 connections to them base.ServiceSettings.MaxAutoScaleChannels = 20; }
public static void RegisterGcmService(this PushBroker broker, GcmPushChannelSettings channelSettings, string applicationId, IPushServiceSettings serviceSettings = null) { broker.RegisterService<GcmNotification>(new GcmPushService(new GcmPushChannelFactory(), channelSettings, serviceSettings), applicationId); }