internal SettingsSectionInternal(SettingsSection section)
        {
            if (section == null)
            {
                section = new SettingsSection();
            }
            this.alwaysUseCompletionPortsForConnect = section.Socket.AlwaysUseCompletionPortsForConnect;
            this.alwaysUseCompletionPortsForAccept  = section.Socket.AlwaysUseCompletionPortsForAccept;
            this.checkCertificateName           = section.ServicePointManager.CheckCertificateName;
            this.checkCertificateRevocationList = section.ServicePointManager.CheckCertificateRevocationList;
            this.dnsRefreshTimeout               = section.ServicePointManager.DnsRefreshTimeout;
            this.ipProtectionLevel               = section.Socket.IPProtectionLevel;
            this.ipv6Enabled                     = section.Ipv6.Enabled;
            this.enableDnsRoundRobin             = section.ServicePointManager.EnableDnsRoundRobin;
            this.encryptionPolicy                = section.ServicePointManager.EncryptionPolicy;
            this.expect100Continue               = section.ServicePointManager.Expect100Continue;
            this.maximumUnauthorizedUploadLength = section.HttpWebRequest.MaximumUnauthorizedUploadLength;
            this.maximumResponseHeadersLength    = section.HttpWebRequest.MaximumResponseHeadersLength;
            this.maximumErrorResponseLength      = section.HttpWebRequest.MaximumErrorResponseLength;
            this.useUnsafeHeaderParsing          = section.HttpWebRequest.UseUnsafeHeaderParsing;
            this.useNagleAlgorithm               = section.ServicePointManager.UseNagleAlgorithm;
            TimeSpan downloadTimeout = section.WebProxyScript.DownloadTimeout;

            this.downloadTimeout                = ((downloadTimeout == TimeSpan.MaxValue) || (downloadTimeout == TimeSpan.Zero)) ? -1 : ((int)downloadTimeout.TotalMilliseconds);
            this.performanceCountersEnabled     = section.PerformanceCounters.Enabled;
            this.httpListenerUnescapeRequestUrl = section.HttpListener.UnescapeRequestUrl;
        }
 internal SettingsSectionInternal(SettingsSection section)
 {
     if (section == null)
     {
         section = new SettingsSection();
     }
     this.alwaysUseCompletionPortsForConnect = section.Socket.AlwaysUseCompletionPortsForConnect;
     this.alwaysUseCompletionPortsForAccept = section.Socket.AlwaysUseCompletionPortsForAccept;
     this.checkCertificateName = section.ServicePointManager.CheckCertificateName;
     this.checkCertificateRevocationList = section.ServicePointManager.CheckCertificateRevocationList;
     this.dnsRefreshTimeout = section.ServicePointManager.DnsRefreshTimeout;
     this.ipProtectionLevel = section.Socket.IPProtectionLevel;
     this.ipv6Enabled = section.Ipv6.Enabled;
     this.enableDnsRoundRobin = section.ServicePointManager.EnableDnsRoundRobin;
     this.encryptionPolicy = section.ServicePointManager.EncryptionPolicy;
     this.expect100Continue = section.ServicePointManager.Expect100Continue;
     this.maximumUnauthorizedUploadLength = section.HttpWebRequest.MaximumUnauthorizedUploadLength;
     this.maximumResponseHeadersLength = section.HttpWebRequest.MaximumResponseHeadersLength;
     this.maximumErrorResponseLength = section.HttpWebRequest.MaximumErrorResponseLength;
     this.useUnsafeHeaderParsing = section.HttpWebRequest.UseUnsafeHeaderParsing;
     this.useNagleAlgorithm = section.ServicePointManager.UseNagleAlgorithm;
     TimeSpan downloadTimeout = section.WebProxyScript.DownloadTimeout;
     this.downloadTimeout = ((downloadTimeout == TimeSpan.MaxValue) || (downloadTimeout == TimeSpan.Zero)) ? -1 : ((int) downloadTimeout.TotalMilliseconds);
     this.performanceCountersEnabled = section.PerformanceCounters.Enabled;
     this.httpListenerUnescapeRequestUrl = section.HttpListener.UnescapeRequestUrl;
 }