9 private ConfigurationPropertyCollection properties =
new ConfigurationPropertyCollection();
11 private readonly ConfigurationProperty checkCertificateName =
new ConfigurationProperty(
"checkCertificateName", typeof(
bool),
true, ConfigurationPropertyOptions.None);
13 private readonly ConfigurationProperty checkCertificateRevocationList =
new ConfigurationProperty(
"checkCertificateRevocationList", typeof(
bool),
false, ConfigurationPropertyOptions.None);
15 private readonly ConfigurationProperty dnsRefreshTimeout =
new ConfigurationProperty(
"dnsRefreshTimeout", typeof(
int), 120000,
null,
new TimeoutValidator(zeroValid:
true), ConfigurationPropertyOptions.None);
17 private readonly ConfigurationProperty enableDnsRoundRobin =
new ConfigurationProperty(
"enableDnsRoundRobin", typeof(
bool),
false, ConfigurationPropertyOptions.None);
19 private readonly ConfigurationProperty encryptionPolicy =
new ConfigurationProperty(
"encryptionPolicy", typeof(
EncryptionPolicy),
EncryptionPolicy.RequireEncryption, ConfigurationPropertyOptions.None);
21 private readonly ConfigurationProperty expect100Continue =
new ConfigurationProperty(
"expect100Continue", typeof(
bool),
true, ConfigurationPropertyOptions.None);
23 private readonly ConfigurationProperty useNagleAlgorithm =
new ConfigurationProperty(
"useNagleAlgorithm", typeof(
bool),
true, ConfigurationPropertyOptions.None);
28 [ConfigurationProperty(
"checkCertificateName", DefaultValue =
true)]
33 return (
bool)base[checkCertificateName];
37 base[checkCertificateName] = value;
44 [ConfigurationProperty(
"checkCertificateRevocationList", DefaultValue =
false)]
49 return (
bool)base[checkCertificateRevocationList];
53 base[checkCertificateRevocationList] = value;
59 [ConfigurationProperty(
"dnsRefreshTimeout", DefaultValue = 120000)]
64 return (
int)base[dnsRefreshTimeout];
68 base[dnsRefreshTimeout] = value;
75 [ConfigurationProperty(
"enableDnsRoundRobin", DefaultValue =
false)]
80 return (
bool)base[enableDnsRoundRobin];
84 base[enableDnsRoundRobin] = value;
90 [ConfigurationProperty(
"encryptionPolicy", DefaultValue =
EncryptionPolicy.RequireEncryption)]
99 base[encryptionPolicy] = value;
106 [ConfigurationProperty(
"expect100Continue", DefaultValue =
true)]
111 return (
bool)base[expect100Continue];
115 base[expect100Continue] = value;
122 [ConfigurationProperty(
"useNagleAlgorithm", DefaultValue =
true)]
127 return (
bool)base[useNagleAlgorithm];
131 base[useNagleAlgorithm] = value;
135 protected internal override ConfigurationPropertyCollection Properties
146 properties.Add(checkCertificateName);
147 properties.Add(checkCertificateRevocationList);
148 properties.Add(dnsRefreshTimeout);
149 properties.Add(enableDnsRoundRobin);
150 properties.Add(encryptionPolicy);
151 properties.Add(expect100Continue);
152 properties.Add(useNagleAlgorithm);
155 protected override void PostDeserialize()
157 if (base.EvaluationContext.IsMachineLevel)
161 PropertyInformation[] array =
new PropertyInformation[2]
163 base.ElementInformation.Properties[
"checkCertificateName"],
164 base.ElementInformation.Properties[
"checkCertificateRevocationList"]
166 PropertyInformation[] array2 = array;
167 foreach (PropertyInformation propertyInformation
in array2)
169 if (propertyInformation.ValueOrigin == PropertyValueOrigin.SetHere)
173 ExceptionHelper.UnmanagedPermission.Demand();
175 catch (Exception inner)
177 throw new ConfigurationErrorsException(SR.GetString(
"net_config_property_permission", propertyInformation.Name), inner);
bool Expect100Continue
Gets or sets a Boolean value that determines whether 100-Continue behavior is used.
ServicePointManagerElement()
Initializes a new instance of the T:System.Net.Configuration.ServicePointManagerElement class.
EncryptionPolicy
The EncryptionPolicy to use.
Represents the default settings used to create connections to a remote computer. This class cannot be...
int DnsRefreshTimeout
Gets or sets the amount of time after which address information is refreshed.
bool CheckCertificateName
Gets or sets a Boolean value that controls checking host name information in an X509 certificate.
bool EnableDnsRoundRobin
Gets or sets a Boolean value that controls using different IP addresses on connections to the same se...
bool CheckCertificateRevocationList
Gets or sets a Boolean value that indicates whether the certificate is checked against the certificat...
bool UseNagleAlgorithm
Gets or sets a Boolean value that determines whether the Nagle algorithm is used.