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;
}