Ejemplo n.º 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
            }
        }
Ejemplo n.º 2
0
 public GcmPushService(GcmPushChannelSettings channelSettings)
     : this(default(IPushChannelFactory), channelSettings, default(IPushServiceSettings))
 {
 }
Ejemplo n.º 3
0
 public GcmPushService(IPushChannelFactory pushChannelFactory, GcmPushChannelSettings channelSettings, IPushServiceSettings serviceSettings)
     : base(pushChannelFactory ?? new GcmPushChannelFactory(), channelSettings, serviceSettings)
 {
 }
Ejemplo n.º 4
0
 public static void RegisterGcmService(this PushBroker broker, GcmPushChannelSettings channelSettings, IPushServiceSettings serviceSettings = null)
 {
     RegisterGcmService(broker, channelSettings, null, serviceSettings);
 }
Ejemplo n.º 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);
 }