mscorlib(4.0.0.0) API with additions
XmlReaderSection.cs
3 
5 {
7  [EditorBrowsable(EditorBrowsableState.Never)]
8  public sealed class XmlReaderSection : ConfigurationSection
9  {
12  [ConfigurationProperty("prohibitDefaultResolver", DefaultValue = "false")]
13  public string ProhibitDefaultResolverString
14  {
15  get
16  {
17  return (string)base["prohibitDefaultResolver"];
18  }
19  set
20  {
21  base["prohibitDefaultResolver"] = value;
22  }
23  }
24 
25  private bool _ProhibitDefaultResolver
26  {
27  get
28  {
29  string prohibitDefaultResolverString = ProhibitDefaultResolverString;
30  XmlConvert.TryToBoolean(prohibitDefaultResolverString, out bool result);
31  return result;
32  }
33  }
34 
35  internal static bool ProhibitDefaultUrlResolver => (ConfigurationManager.GetSection(XmlConfigurationString.XmlReaderSectionPath) as XmlReaderSection)?._ProhibitDefaultResolver ?? false;
36 
39  [ConfigurationProperty("CollapseWhiteSpaceIntoEmptyString", DefaultValue = "false")]
41  {
42  get
43  {
44  return (string)base["CollapseWhiteSpaceIntoEmptyString"];
45  }
46  set
47  {
48  base["CollapseWhiteSpaceIntoEmptyString"] = value;
49  }
50  }
51 
52  private bool _CollapseWhiteSpaceIntoEmptyString
53  {
54  get
55  {
56  string collapseWhiteSpaceIntoEmptyStringString = CollapseWhiteSpaceIntoEmptyStringString;
57  XmlConvert.TryToBoolean(collapseWhiteSpaceIntoEmptyStringString, out bool result);
58  return result;
59  }
60  }
61 
62  internal static bool CollapseWhiteSpaceIntoEmptyString => (ConfigurationManager.GetSection(XmlConfigurationString.XmlReaderSectionPath) as XmlReaderSection)?._CollapseWhiteSpaceIntoEmptyString ?? false;
63 
64  internal static XmlResolver CreateDefaultResolver()
65  {
66  if (ProhibitDefaultUrlResolver)
67  {
68  return null;
69  }
70  return new XmlUrlResolver();
71  }
72  }
73 }
string ProhibitDefaultResolverString
Gets or sets the string that represents the prohibit default resolver.
EditorBrowsableState
Specifies the browsable state of a property or method from within an editor.
Definition: __Canon.cs:3
string CollapseWhiteSpaceIntoEmptyStringString
Gets or sets the string that represents a boolean value indicating whether white spaces are collapsed...
Represents an XML reader section.
Encodes and decodes XML names, and provides methods for converting between common language runtime ty...
Definition: XmlConvert.cs:11