Inheritance: System.Configuration.ConfigurationSection
 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;
 }
Ejemplo n.º 2
0
        internal SettingsSectionInternal(SettingsSection section)
        {
            TimeSpan ts;

            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;
            this.autoConfigUrlRetryInterval      = section.WebProxyScript.AutoConfigUrlRetryInterval;
            ts = section.WebProxyScript.DownloadTimeout;
            this.downloadTimeout                   = (ts == TimeSpan.MaxValue || ts == TimeSpan.Zero) ? Timeout.Infinite : (int)ts.TotalMilliseconds;
            this.performanceCountersEnabled        = section.PerformanceCounters.Enabled;
            this.httpListenerUnescapeRequestUrl    = section.HttpListener.UnescapeRequestUrl;
            this.httpListenerTimeouts              = section.HttpListener.Timeouts.GetTimeouts();
            this.defaultCredentialsHandleCacheSize = section.WindowsAuthentication.DefaultCredentialsHandleCacheSize;

            // <webUtility> element
            WebUtilityElement webUtilityElement = section.WebUtility;

            this.WebUtilityUnicodeDecodingConformance = webUtilityElement.UnicodeDecodingConformance;
            this.WebUtilityUnicodeEncodingConformance = webUtilityElement.UnicodeEncodingConformance;
        }
Ejemplo n.º 3
0
        internal SettingsSectionInternal(SettingsSection section)
        {
            TimeSpan ts;

            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;
            ts = section.WebProxyScript.DownloadTimeout;
            this.downloadTimeout = (ts == TimeSpan.MaxValue || ts == TimeSpan.Zero) ? Timeout.Infinite : (int) ts.TotalMilliseconds;
            this.performanceCountersEnabled = section.PerformanceCounters.Enabled;
            this.httpListenerUnescapeRequestUrl = section.HttpListener.UnescapeRequestUrl;
            this.httpListenerTimeouts = section.HttpListener.Timeouts.GetTimeouts();

            // <webUtility> element
            WebUtilityElement webUtilityElement = section.WebUtility;
            this.WebUtilityUnicodeDecodingConformance = webUtilityElement.UnicodeDecodingConformance;
            this.WebUtilityUnicodeEncodingConformance = webUtilityElement.UnicodeEncodingConformance;
        }
Ejemplo n.º 4
0
        internal SettingsSectionInternal(SettingsSection section)
        {
            TimeSpan ts;

            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.ipv6Enabled = section.Ipv6.Enabled;
            this.EnableDnsRoundRobin = section.ServicePointManager.EnableDnsRoundRobin;
            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;
            ts = section.WebProxyScript.DownloadTimeout;
            this.downloadTimeout = (ts == TimeSpan.MaxValue || ts == TimeSpan.Zero)  Timeout.Infinite : (int) ts.TotalMilliseconds;
            /* Not used with Managed JScript
            ts = section.WebProxyScript.ExecutionTimeout;
            this.executionTimeout = (ts == TimeSpan.MaxValue || ts == TimeSpan.Zero)  Timeout.Infinite : (int) ts.TotalMilliseconds;
            */
            this.performanceCountersEnabled = section.PerformanceCounters.Enabled;
            NetworkingPerfCounters.Initialize();
        }