/
ContextInformation.xml
196 lines (176 loc) · 10.7 KB
/
ContextInformation.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
<Type Name="ContextInformation" FullName="System.Configuration.ContextInformation">
<TypeSignature Language="C#" Value="public sealed class ContextInformation" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi sealed beforefieldinit ContextInformation extends System.Object" />
<TypeSignature Language="DocId" Value="T:System.Configuration.ContextInformation" />
<TypeSignature Language="VB.NET" Value="Public NotInheritable Class ContextInformation" />
<TypeSignature Language="F#" Value="type ContextInformation = class" />
<TypeSignature Language="C++ CLI" Value="public ref class ContextInformation sealed" />
<AssemblyInfo>
<AssemblyName>System.Configuration</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Configuration.ConfigurationManager</AssemblyName>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
<AssemblyVersion>4.0.2.0</AssemblyVersion>
<AssemblyVersion>4.0.3.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<TypeForwardingChain>
<TypeForwarding From="System.Configuration.ConfigurationManager" FromVersion="9.0.0.0" To="System.Configuration" ToVersion="4.0.0.0" FrameworkAlternate="netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1" />
</TypeForwardingChain>
<Base>
<BaseTypeName>System.Object</BaseTypeName>
</Base>
<Interfaces />
<Docs>
<summary>Encapsulates the context information that is associated with a <see cref="T:System.Configuration.ConfigurationElement" /> object. This class cannot be inherited.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Configuration.ContextInformation> object provides environment details related to an element of the configuration. For instance, you can use the <xref:System.Configuration.ContextInformation.IsMachineLevel%2A> property to determine whether a <xref:System.Configuration.ConfigurationElement> was set in Machine.config, or you can determine which hierarchy a <xref:System.Configuration.ConfigurationElement> belongs to by using the <xref:System.Configuration.ContextInformation.HostingContext%2A> property.
## Examples
The following code example demonstrates how to use the <xref:System.Configuration.ContextInformation> type.
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Configuration.ContextInformation/CS/ContextInformation.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Configuration.ContextInformation/VB/ContextInformation.vb" id="Snippet1":::
]]></format>
</remarks>
</Docs>
<Members>
<Member MemberName="GetSection">
<MemberSignature Language="C#" Value="public object GetSection (string sectionName);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance object GetSection(string sectionName) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Configuration.ContextInformation.GetSection(System.String)" />
<MemberSignature Language="VB.NET" Value="Public Function GetSection (sectionName As String) As Object" />
<MemberSignature Language="F#" Value="member this.GetSection : string -> obj" Usage="contextInformation.GetSection sectionName" />
<MemberSignature Language="C++ CLI" Value="public:
 System::Object ^ GetSection(System::String ^ sectionName);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Configuration</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Configuration.ConfigurationManager</AssemblyName>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
<AssemblyVersion>4.0.2.0</AssemblyVersion>
<AssemblyVersion>4.0.3.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Object</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="sectionName" Type="System.String" />
</Parameters>
<Docs>
<param name="sectionName">The name of the configuration section.</param>
<summary>Provides an object containing configuration-section information based on the specified section name.</summary>
<returns>An object containing the specified section within the configuration.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
When specifying a section within the configuration, note that the name of the configuration section is case-sensitive.
]]></format>
</remarks>
<altmember cref="M:System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration(System.String)" />
</Docs>
</Member>
<Member MemberName="HostingContext">
<MemberSignature Language="C#" Value="public object HostingContext { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance object HostingContext" />
<MemberSignature Language="DocId" Value="P:System.Configuration.ContextInformation.HostingContext" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property HostingContext As Object" />
<MemberSignature Language="F#" Value="member this.HostingContext : obj" Usage="System.Configuration.ContextInformation.HostingContext" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::Object ^ HostingContext { System::Object ^ get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Configuration</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Configuration.ConfigurationManager</AssemblyName>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
<AssemblyVersion>4.0.2.0</AssemblyVersion>
<AssemblyVersion>4.0.3.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Object</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the context of the environment where the configuration property is being evaluated.</summary>
<value>An object specifying the environment where the configuration property is being evaluated.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The possible <xref:System.Configuration.ContextInformation.HostingContext%2A> value is <xref:System.Web.Configuration.WebContext>, <xref:System.Configuration.ExeContext>, or `null`.
## Examples
The following code example demonstrates how to use the <xref:System.Configuration.ContextInformation.HostingContext%2A> property.
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Configuration.ContextInformation/CS/ContextInformation.cs" id="Snippet3":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Configuration.ContextInformation/VB/ContextInformation.vb" id="Snippet3":::
]]></format>
</remarks>
<altmember cref="T:System.Web.Configuration.WebContext" />
<altmember cref="T:System.Configuration.ExeContext" />
</Docs>
</Member>
<Member MemberName="IsMachineLevel">
<MemberSignature Language="C#" Value="public bool IsMachineLevel { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool IsMachineLevel" />
<MemberSignature Language="DocId" Value="P:System.Configuration.ContextInformation.IsMachineLevel" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property IsMachineLevel As Boolean" />
<MemberSignature Language="F#" Value="member this.IsMachineLevel : bool" Usage="System.Configuration.ContextInformation.IsMachineLevel" />
<MemberSignature Language="C++ CLI" Value="public:
 property bool IsMachineLevel { bool get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Configuration</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Configuration.ConfigurationManager</AssemblyName>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
<AssemblyVersion>4.0.2.0</AssemblyVersion>
<AssemblyVersion>4.0.3.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a value specifying whether the configuration property is being evaluated at the machine configuration level.</summary>
<value>
<see langword="true" /> if the configuration property is being evaluated at the machine configuration level; otherwise, <see langword="false" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
When the returned value of <xref:System.Configuration.ContextInformation.IsMachineLevel%2A> is `false`, use the <xref:System.Configuration.ContextInformation.HostingContext%2A> property to determine the level within the configuration hierarchy.
## Examples
The following code example demonstrates how to use the <xref:System.Configuration.ContextInformation.HostingContext%2A> property.
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Configuration.ContextInformation/CS/ContextInformation.cs" id="Snippet2":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Configuration.ContextInformation/VB/ContextInformation.vb" id="Snippet2":::
]]></format>
</remarks>
</Docs>
</Member>
</Members>
</Type>