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 } }
public GcmPushService(GcmPushChannelSettings channelSettings) : this(default(IPushChannelFactory), channelSettings, default(IPushServiceSettings)) { }
public GcmPushService(IPushChannelFactory pushChannelFactory, GcmPushChannelSettings channelSettings, IPushServiceSettings serviceSettings) : base(pushChannelFactory ?? new GcmPushChannelFactory(), channelSettings, serviceSettings) { }
public static void RegisterGcmService(this PushBroker broker, GcmPushChannelSettings channelSettings, IPushServiceSettings serviceSettings = null) { RegisterGcmService(broker, channelSettings, null, serviceSettings); }
public static void RegisterGcmService(this PushBroker broker, GcmPushChannelSettings channelSettings, string applicationId, IPushServiceSettings serviceSettings = null) { broker.RegisterService <GcmNotification>(new GcmPushService(new GcmPushChannelFactory(), channelSettings, serviceSettings), applicationId); }