public ProxyConfigurationExample(string apiKey, string apiUrl) : base(apiKey, apiUrl)
        {
            httpProxyConfiguration = ProxyConfigurationBuilder.NewProxyConfiguration()
                                     .WithHttpHost(proxyHost)
                                     .WithHttpPort(proxyPort)
                                     .Build();

            httpProxyWithCredentialsConfiguration = ProxyConfigurationBuilder.NewProxyConfiguration()
                                                    .WithHttpHost(proxyWithCredentialsHost)
                                                    .WithHttpPort(proxyWithCredentialsPort)
                                                    .WithCredentials(proxyUserName, proxyPassword)
                                                    .Build();

            eslClientWithHttpProxy = new EslClient(apiKey, apiUrl, allowAllSSLCertificates, httpProxyConfiguration);
            eslClientWithHttpProxyHasCredentials = new EslClient(apiKey, apiUrl, allowAllSSLCertificates, httpProxyWithCredentialsConfiguration);
        }
コード例 #2
0
        public ProxyConfigurationExample(string apiKey, string apiUrl, string email1) : base(apiKey, apiUrl)
        {
            this.email1 = email1;
            fileStream1 = File.OpenRead(new FileInfo(Directory.GetCurrentDirectory() + "/src/document.pdf").FullName);
            fileStream2 = File.OpenRead(new FileInfo(Directory.GetCurrentDirectory() + "/src/document.pdf").FullName);

            httpProxyConfiguration = ProxyConfigurationBuilder.NewProxyConfiguration()
                                     .WithHttpHost(httpProxyURL)
                                     .WithHttpPort(httpProxyPort)
                                     .Build();

            httpProxyWithCredentialsConfiguration = ProxyConfigurationBuilder.NewProxyConfiguration()
                                                    .WithHttpHost(httpProxyWithCredentialsURL)
                                                    .WithHttpPort(httpProxyWithCredentialsPort)
                                                    .WithCredentials(httpProxyUserName, httpProxyPassword)
                                                    .Build();

            eslClientWithHttpProxy = new EslClient(apiKey, apiUrl, allowAllSSLCertificates, httpProxyConfiguration);
            eslClientWithHttpProxyHasCredentials = new EslClient(apiKey, apiUrl, allowAllSSLCertificates, httpProxyWithCredentialsConfiguration);
        }