Example #1
0
        public GcmPushChannel(GcmPushChannelSettings channelSettings)
        {
            gcmSettings = channelSettings;

            if (gcmSettings != null && gcmSettings.ValidateServerCertificate)
            {
                ServicePointManager.ServerCertificateValidationCallback += ValidateRemoteCertificate;
            }
            else
            {
                ServicePointManager.ServerCertificateValidationCallback += (sender, cert, chain, policyErrs) => true; //Don't validate remote cert
            }
        }
Example #2
0
 public GcmPushService(GcmPushChannelSettings channelSettings)
     : this(default(IPushChannelFactory), channelSettings, default(IPushServiceSettings))
 {
 }
Example #3
0
 public GcmPushService(IPushChannelFactory pushChannelFactory, GcmPushChannelSettings channelSettings, IPushServiceSettings serviceSettings)
     : base(pushChannelFactory ?? new GcmPushChannelFactory(), channelSettings, serviceSettings)
 {
 }
Example #4
0
 public static void RegisterGcmService(this PushBroker broker, GcmPushChannelSettings channelSettings, IPushServiceSettings serviceSettings = null)
 {
     RegisterGcmService(broker, channelSettings, null, serviceSettings);
 }
Example #5
0
 public static void RegisterGcmService(this PushBroker broker, GcmPushChannelSettings channelSettings, string applicationId, IPushServiceSettings serviceSettings = null)
 {
     broker.RegisterService <GcmNotification>(new GcmPushService(new GcmPushChannelFactory(), channelSettings, serviceSettings), applicationId);
 }