mscorlib(4.0.0.0) API with additions
SettingsSection.cs
2 using System.Net.Cache;
3 
5 {
7  public sealed class SettingsSection : ConfigurationSection
8  {
9  private ConfigurationPropertyCollection properties = new ConfigurationPropertyCollection();
10 
11  private readonly ConfigurationProperty httpWebRequest = new ConfigurationProperty("httpWebRequest", typeof(HttpWebRequestElement), null, ConfigurationPropertyOptions.None);
12 
13  private readonly ConfigurationProperty ipv6 = new ConfigurationProperty("ipv6", typeof(Ipv6Element), null, ConfigurationPropertyOptions.None);
14 
15  private readonly ConfigurationProperty servicePointManager = new ConfigurationProperty("servicePointManager", typeof(ServicePointManagerElement), null, ConfigurationPropertyOptions.None);
16 
17  private readonly ConfigurationProperty socket = new ConfigurationProperty("socket", typeof(SocketElement), null, ConfigurationPropertyOptions.None);
18 
19  private readonly ConfigurationProperty webProxyScript = new ConfigurationProperty("webProxyScript", typeof(WebProxyScriptElement), null, ConfigurationPropertyOptions.None);
20 
21  private readonly ConfigurationProperty performanceCounters = new ConfigurationProperty("performanceCounters", typeof(PerformanceCountersElement), null, ConfigurationPropertyOptions.None);
22 
23  private readonly ConfigurationProperty httpListener = new ConfigurationProperty("httpListener", typeof(HttpListenerElement), null, ConfigurationPropertyOptions.None);
24 
25  private readonly ConfigurationProperty webUtility = new ConfigurationProperty("webUtility", typeof(WebUtilityElement), null, ConfigurationPropertyOptions.None);
26 
29  [ConfigurationProperty("httpWebRequest")]
31  {
32  get
33  {
34  return (HttpWebRequestElement)base[httpWebRequest];
35  }
36  }
37 
40  [ConfigurationProperty("ipv6")]
41  public Ipv6Element Ipv6
42  {
43  get
44  {
45  return (Ipv6Element)base[ipv6];
46  }
47  }
48 
51  [ConfigurationProperty("servicePointManager")]
53  {
54  get
55  {
56  return (ServicePointManagerElement)base[servicePointManager];
57  }
58  }
59 
62  [ConfigurationProperty("socket")]
63  public SocketElement Socket
64  {
65  get
66  {
67  return (SocketElement)base[socket];
68  }
69  }
70 
73  [ConfigurationProperty("webProxyScript")]
75  {
76  get
77  {
78  return (WebProxyScriptElement)base[webProxyScript];
79  }
80  }
81 
84  [ConfigurationProperty("performanceCounters")]
86  {
87  get
88  {
89  return (PerformanceCountersElement)base[performanceCounters];
90  }
91  }
92 
95  [ConfigurationProperty("httpListener")]
97  {
98  get
99  {
100  return (HttpListenerElement)base[httpListener];
101  }
102  }
103 
106  [ConfigurationProperty("webUtility")]
108  {
109  get
110  {
111  return (WebUtilityElement)base[webUtility];
112  }
113  }
114 
115  protected internal override ConfigurationPropertyCollection Properties
116  {
117  protected get
118  {
119  return properties;
120  }
121  }
122 
123  internal static void EnsureConfigLoaded()
124  {
125  try
126  {
127  AuthenticationManager.EnsureConfigLoaded();
128  object obj = RequestCacheManager.IsCachingEnabled;
131  obj = WebRequest.PrefixList;
132  obj = WebRequest.InternalDefaultWebProxy;
133  }
134  catch
135  {
136  }
137  }
138 
141  {
142  properties.Add(httpWebRequest);
143  properties.Add(ipv6);
144  properties.Add(servicePointManager);
145  properties.Add(socket);
146  properties.Add(webProxyScript);
147  properties.Add(performanceCounters);
148  properties.Add(httpListener);
149  properties.Add(webUtility);
150  }
151  }
152 }
Represents the maximum length for response headers. This class cannot be inherited.
Provides methods for encoding and decoding URLs when processing Web requests.
Definition: WebUtility.cs:13
SettingsSection()
Initializes a new instance of the T:System.Net.Configuration.ConnectionManagementSection class.
Determines whether Internet Protocol version 6 is enabled on the local computer. This class cannot be...
Definition: Ipv6Element.cs:6
static bool Expect100Continue
Gets or sets a T:System.Boolean value that determines whether 100-Continue behavior is used.
Manages the collection of T:System.Net.ServicePoint objects.
Definition: __Canon.cs:3
Represents information used to configure T:System.Net.Sockets.Socket objects. This class cannot be in...
Definition: SocketElement.cs:7
Ipv6Element Ipv6
Gets the configuration element that enables Internet Protocol version 6 (IPv6).
Represents the configuration section for sockets, IPv6, response headers, and service points....
Represents the HttpListener element in the configuration file. This class cannot be inherited.
Represents the performance counter element in the System.Net configuration file that determines wheth...
Represents the default settings used to create connections to a remote computer. This class cannot be...
PerformanceCountersElement PerformanceCounters
Gets the configuration element that controls whether network performance counters are enabled.
Represents the WebUtility element in the configuration file.
SocketElement Socket
Gets the configuration element that controls settings for sockets.
static int DefaultConnectionLimit
Gets or sets the maximum number of concurrent connections allowed by a T:System.Net....
WebProxyScriptElement WebProxyScript
Gets the configuration element that controls the execution timeout and download timeout of Web proxy ...
Provides a simple, programmatically controlled HTTP protocol listener. This class cannot be inherited...
Definition: HttpListener.cs:15
Represents information used to configure Web proxy scripts. This class cannot be inherited.
Provides an HTTP-specific implementation of the T:System.Net.WebRequest class.