public ApnsHttp2Connection(ApnsHttp2Configuration configuration) { id = ++ID; if (id >= int.MaxValue) { ID = 0; } Configuration = configuration; certificate = Configuration.Certificate; certificates = new X509CertificateCollection(); // Add local/machine certificate stores to our collection if requested if (Configuration.AddLocalAndMachineCertificateStores) { var store = new X509Store(StoreLocation.LocalMachine); certificates.AddRange(store.Certificates); store = new X509Store(StoreLocation.CurrentUser); certificates.AddRange(store.Certificates); } // Add optionally specified additional certs into our collection if (Configuration.AdditionalCertificates != null) { foreach (var addlCert in Configuration.AdditionalCertificates) { certificates.Add(addlCert); } } // Finally, add the main private cert for authenticating to our collection if (certificate != null) { certificates.Add(certificate); } var http2Settings = new Http2ConnectionSettings( Configuration.Host, (uint)Configuration.Port, true, certificates); http2 = new Http2Client(http2Settings); }
public ApnsHttp2ServiceConnectionFactory(ApnsHttp2Configuration configuration) { Configuration = configuration; }
public ApnsHttp2ServiceConnection(ApnsHttp2Configuration configuration) { connection = new ApnsHttp2Connection(configuration); }
public ApnsHttp2ServiceBroker(ApnsHttp2Configuration configuration) : base(new ApnsHttp2ServiceConnectionFactory(configuration)) { }