Esempio n. 1
0
		public IPushChannel CreateChannel(IPushChannelSettings channelSettings)
		{
			if (!(channelSettings is GcmPushChannelSettings))
				throw new ArgumentException("channelSettings must be of type " + typeof(GcmPushChannelSettings).Name);

			return new GcmPushChannel(channelSettings as GcmPushChannelSettings);
		}
Esempio n. 2
0
		public IPushChannel CreateChannel(IPushChannelSettings channelSettings)
		{
			if (!(channelSettings is WindowsPushChannelSettings))
				throw new ArgumentException("channelSettings must be of type WindowsPushChannelSettings");

			return new WindowsPushChannel(channelSettings as WindowsPushChannelSettings);
		}
        public IPushChannel CreateChannel(IPushChannelSettings channelSettings)
        {
            if (!(channelSettings is ApplePushChannelSettings))
                throw new ArgumentException("Channel Settings must be of type ApplePushChannelSettings");

            return new ApplePushChannel(channelSettings as ApplePushChannelSettings);
        }
        public IPushChannel CreateChannel(IPushChannelSettings channelSettings)
        {
            if (!(channelSettings is BlackberryPushChannelSettings))
                throw new ArgumentException("channelSettings must be of type: " + typeof(BlackberryPushChannelSettings).Name);

            return new BlackberryPushChannel(channelSettings as BlackberryPushChannelSettings);
        }
Esempio n. 5
0
        public IPushChannel CreateChannel(IPushChannelSettings channelSettings)
        {
            if (!(channelSettings is FacebookPushChannelSettings))
                throw new ArgumentException("channelSettings must be of type FacebookPushChannelSettings");

            return new FacebookPushChannel(channelSettings as FacebookPushChannelSettings);
        }
Esempio n. 6
0
		public IPushChannel CreateChannel(IPushChannelSettings channelSettings)
		{
			if (!(channelSettings is ChromePushChannelSettings))
				throw new ArgumentException("channelSettings must be of type " + typeof(ChromePushChannelSettings).ToString());

			return new ChromePushChannel(channelSettings as ChromePushChannelSettings);
		}
Esempio n. 7
0
 public IPushChannel CreateChannel(IPushChannelSettings channelSettings)
 {
     if (!(channelSettings is ApplePushChannelSettings))
     {
         throw new ArgumentException("Channel Settings must be of type ApplePushChannelSettings");
     }
     return((IPushChannel) new ApplePushChannel(channelSettings as ApplePushChannelSettings));
 }
Esempio n. 8
0
        public IPushChannel CreateChannel(IPushChannelSettings channelSettings)
        {
            if (!(channelSettings is BlackberryPushChannelSettings))
            {
                throw new ArgumentException("channelSettings must be of type: " + typeof(BlackberryPushChannelSettings).Name);
            }

            return(new BlackberryPushChannel(channelSettings as BlackberryPushChannelSettings));
        }
Esempio n. 9
0
        public IPushChannel CreateChannel(IPushChannelSettings channelSettings)
        {
            if (!(channelSettings is ChromePushChannelSettings))
            {
                throw new ArgumentException("channelSettings must be of type " + typeof(ChromePushChannelSettings).ToString());
            }

            return(new ChromePushChannel(channelSettings as ChromePushChannelSettings));
        }
Esempio n. 10
0
        public IPushChannel CreateChannel(IPushChannelSettings channelSettings)
        {
            if (!(channelSettings is BISPushChannelSettings))
            {
                throw new ArgumentException("channelSettings must be of type BISPushChannelSettings");
            }

            return(new BISPushChannel(channelSettings as BISPushChannelSettings));
        }
Esempio n. 11
0
        public IPushChannel CreateChannel(IPushChannelSettings channelSettings)
        {
            if (!(channelSettings is GcmPushChannelSettings))
            {
                throw new ArgumentException("channelSettings must be of type " + typeof(GcmPushChannelSettings).Name);
            }

            return(new GcmPushChannel(channelSettings as GcmPushChannelSettings));
        }
Esempio n. 12
0
        public IPushChannel CreateChannel(IPushChannelSettings channelSettings)
        {
            if (!(channelSettings is WindowsPhonePushChannelSettings))
            {
                throw new ArgumentException("channelSettings must be of type WindowsPhonePushChannelSettings");
            }

            return(new WindowsPhonePushChannel(channelSettings as WindowsPhonePushChannelSettings));
        }
Esempio n. 13
0
 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;
 }
Esempio n. 14
0
        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;
        }
Esempio n. 15
0
        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;
        }
Esempio n. 16
0
 protected PushServiceBase(IPushChannelFactory pushChannelFactory, IPushChannelSettings channelSettings)
     : this(pushChannelFactory, channelSettings, default(IPushServiceSettings))
 {
 }
Esempio n. 17
0
 /// <summary>
 /// Creates a FirefoxOS push channel.
 /// </summary>
 /// <param name="channelSettings"></param>
 /// <returns></returns>
 public IPushChannel CreateChannel(IPushChannelSettings channelSettings)
 {
     return(new FirefoxOSPushChannel());
 }
Esempio n. 18
0
 protected PushServiceBase(IPushChannelFactory pushChannelFactory, IPushChannelSettings channelSettings)
     : this(pushChannelFactory, channelSettings, default(IPushServiceSettings))
 {
 }
 /// <summary>
 /// Creates a FirefoxOS push channel.
 /// </summary>
 /// <param name="channelSettings"></param>
 /// <returns></returns>
 public IPushChannel CreateChannel(IPushChannelSettings channelSettings)
 {
     return new FirefoxOSPushChannel();
 }
Esempio n. 20
0
 protected PushServiceBase(IPushChannelFactory pushChannelFactory, IPushChannelSettings channelSettings)
     : this(pushChannelFactory, channelSettings, (IPushServiceSettings)null)
 {
 }