Merge pull request #3716 from vargaz/unbox-stobj-null
[mono.git] / mcs / class / System / ReferenceSources / SettingsSectionInternal.cs
1 using System.Net.Security;
2 using System.Net.Sockets;
3
4 namespace System.Net.Configuration {
5         sealed class SettingsSectionInternal
6         {
7                 static readonly SettingsSectionInternal instance = new SettingsSectionInternal ();
8
9                 internal static SettingsSectionInternal Section {
10                         get {
11                                 return instance;
12                         }
13                 }
14
15 #if !MOBILE
16                 internal UnicodeEncodingConformance WebUtilityUnicodeEncodingConformance = UnicodeEncodingConformance.Auto;
17                 internal UnicodeDecodingConformance WebUtilityUnicodeDecodingConformance = UnicodeDecodingConformance.Auto;
18 #endif
19
20                 internal readonly bool HttpListenerUnescapeRequestUrl = true;
21                 internal readonly IPProtectionLevel IPProtectionLevel = IPProtectionLevel.Unspecified;
22
23                 internal bool UseNagleAlgorithm { get; set; }
24                 internal bool Expect100Continue { get; set; }
25                 internal bool CheckCertificateName { get; private set; }
26                 internal int DnsRefreshTimeout { get; set; }
27                 internal bool EnableDnsRoundRobin { get; set; }
28                 internal bool CheckCertificateRevocationList { get; set; }
29                 internal EncryptionPolicy EncryptionPolicy { get; private set; }
30
31                 internal bool Ipv6Enabled {
32                         get {
33 #if CONFIGURATION_DEP && !MOBILE
34                                 try {
35                                         var config = (SettingsSection) System.Configuration.ConfigurationManager.GetSection ("system.net/settings");
36                                         if (config != null)
37                                                 return config.Ipv6.Enabled;
38                                 } catch {
39                                 }
40 #endif
41
42                                 return true;
43                         }
44                 }
45         }
46 }