-
Notifications
You must be signed in to change notification settings - Fork 1.6k
/
ConfigurationBuilder.xml
195 lines (186 loc) · 12.6 KB
/
ConfigurationBuilder.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
<Type Name="ConfigurationBuilder" FullName="Microsoft.Extensions.Configuration.ConfigurationBuilder">
<TypeSignature Language="C#" Value="public class ConfigurationBuilder : Microsoft.Extensions.Configuration.IConfigurationBuilder" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit ConfigurationBuilder extends System.Object implements class Microsoft.Extensions.Configuration.IConfigurationBuilder" />
<TypeSignature Language="DocId" Value="T:Microsoft.Extensions.Configuration.ConfigurationBuilder" />
<TypeSignature Language="VB.NET" Value="Public Class ConfigurationBuilder
Implements IConfigurationBuilder" />
<TypeSignature Language="F#" Value="type ConfigurationBuilder = class
 interface IConfigurationBuilder" />
<TypeSignature Language="C++ CLI" Value="public ref class ConfigurationBuilder : Microsoft::Extensions::Configuration::IConfigurationBuilder" />
<AssemblyInfo>
<AssemblyName>Microsoft.Extensions.Configuration</AssemblyName>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
<AssemblyVersion>1.1.0.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
<AssemblyVersion>2.2.0.0</AssemblyVersion>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>3.1.0.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>
<Base>
<BaseTypeName>System.Object</BaseTypeName>
</Base>
<Interfaces>
<Interface>
<InterfaceName>Microsoft.Extensions.Configuration.IConfigurationBuilder</InterfaceName>
</Interface>
</Interfaces>
<Attributes>
<Attribute FrameworkAlternate="net-8.0-pp;net-9.0-pp">
<AttributeName Language="C#">[System.Runtime.CompilerServices.Nullable(0)]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.CompilerServices.Nullable(0)>]</AttributeName>
</Attribute>
</Attributes>
<Docs>
<summary>
Builds key/value-based configuration settings for use in an application.
</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
By using this class, you can store configuration values in a JSON file, for example, and then retrieve them at run time. For more information, see [Configuration - basic example](/dotnet/core/extensions/configuration#basic-example).
If you're migrating an app to .NET Core 3.1 or a later version, you can use this class to replace the *app.config* file functionality that you may have previously used to configure your app.
## Example
The following code snippet shows a simplified app that creates a `ConfigurationBuilder` object to retrieve a string value from a JSON file at run time.
:::code language="csharp" source="~/snippets/csharp/Microsoft.Extensions.Configuration/ConfigurationBuilder/Overview/Program.cs":::
The contents of the JSON file are shown here.
:::code language="json" source="~/snippets/csharp/Microsoft.Extensions.Configuration/ConfigurationBuilder/Overview/appsettings.json":::
]]></format>
</remarks>
<related type="Article" href="/dotnet/core/extensions/configuration">Configuration in .NET</related>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public ConfigurationBuilder ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Extensions.Configuration.ConfigurationBuilder.#ctor" />
<MemberSignature Language="VB.NET" Value="Public Sub New ()" />
<MemberSignature Language="C++ CLI" Value="public:
 ConfigurationBuilder();" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Extensions.Configuration</AssemblyName>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters />
<Docs>
<summary>Initializes a new instance of the <see cref="T:Microsoft.Extensions.Configuration.ConfigurationBuilder" /> class.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Add">
<MemberSignature Language="C#" Value="public Microsoft.Extensions.Configuration.IConfigurationBuilder Add (Microsoft.Extensions.Configuration.IConfigurationSource source);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class Microsoft.Extensions.Configuration.IConfigurationBuilder Add(class Microsoft.Extensions.Configuration.IConfigurationSource source) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Extensions.Configuration.ConfigurationBuilder.Add(Microsoft.Extensions.Configuration.IConfigurationSource)" />
<MemberSignature Language="VB.NET" Value="Public Function Add (source As IConfigurationSource) As IConfigurationBuilder" />
<MemberSignature Language="F#" Value="abstract member Add : Microsoft.Extensions.Configuration.IConfigurationSource -> Microsoft.Extensions.Configuration.IConfigurationBuilder
override this.Add : Microsoft.Extensions.Configuration.IConfigurationSource -> Microsoft.Extensions.Configuration.IConfigurationBuilder" Usage="configurationBuilder.Add source" />
<MemberSignature Language="C++ CLI" Value="public:
 virtual Microsoft::Extensions::Configuration::IConfigurationBuilder ^ Add(Microsoft::Extensions::Configuration::IConfigurationSource ^ source);" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:Microsoft.Extensions.Configuration.IConfigurationBuilder.Add(Microsoft.Extensions.Configuration.IConfigurationSource)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>Microsoft.Extensions.Configuration</AssemblyName>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Microsoft.Extensions.Configuration.IConfigurationBuilder</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="source" Type="Microsoft.Extensions.Configuration.IConfigurationSource" />
</Parameters>
<Docs>
<param name="source">The configuration source to add.</param>
<summary>
Adds a new configuration source.
</summary>
<returns>The same <see cref="T:Microsoft.Extensions.Configuration.IConfigurationBuilder" />.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Build">
<MemberSignature Language="C#" Value="public Microsoft.Extensions.Configuration.IConfigurationRoot Build ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class Microsoft.Extensions.Configuration.IConfigurationRoot Build() cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Extensions.Configuration.ConfigurationBuilder.Build" />
<MemberSignature Language="VB.NET" Value="Public Function Build () As IConfigurationRoot" />
<MemberSignature Language="F#" Value="abstract member Build : unit -> Microsoft.Extensions.Configuration.IConfigurationRoot
override this.Build : unit -> Microsoft.Extensions.Configuration.IConfigurationRoot" Usage="configurationBuilder.Build " />
<MemberSignature Language="C++ CLI" Value="public:
 virtual Microsoft::Extensions::Configuration::IConfigurationRoot ^ Build();" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:Microsoft.Extensions.Configuration.IConfigurationBuilder.Build</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>Microsoft.Extensions.Configuration</AssemblyName>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>Microsoft.Extensions.Configuration.IConfigurationRoot</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>
Builds an <see cref="T:Microsoft.Extensions.Configuration.IConfiguration" /> with keys and values from the set of providers registered in
<see cref="P:Microsoft.Extensions.Configuration.ConfigurationBuilder.Sources" />.
</summary>
<returns>An <see cref="T:Microsoft.Extensions.Configuration.IConfigurationRoot" /> with keys and values from the registered providers.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Properties">
<MemberSignature Language="C#" Value="public System.Collections.Generic.IDictionary<string,object> Properties { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Collections.Generic.IDictionary`2<string, object> Properties" />
<MemberSignature Language="DocId" Value="P:Microsoft.Extensions.Configuration.ConfigurationBuilder.Properties" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property Properties As IDictionary(Of String, Object)" />
<MemberSignature Language="F#" Value="member this.Properties : System.Collections.Generic.IDictionary<string, obj>" Usage="Microsoft.Extensions.Configuration.ConfigurationBuilder.Properties" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::Collections::Generic::IDictionary<System::String ^, System::Object ^> ^ Properties { System::Collections::Generic::IDictionary<System::String ^, System::Object ^> ^ get(); };" />
<MemberType>Property</MemberType>
<Implements>
<InterfaceMember>P:Microsoft.Extensions.Configuration.IConfigurationBuilder.Properties</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>Microsoft.Extensions.Configuration</AssemblyName>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Collections.Generic.IDictionary<System.String,System.Object></ReturnType>
</ReturnValue>
<Docs>
<summary>
Gets a key/value collection that can be used to share data between the <see cref="T:Microsoft.Extensions.Configuration.IConfigurationBuilder" />
and the registered <see cref="T:Microsoft.Extensions.Configuration.IConfigurationProvider" /> providers.
</summary>
<value>A key/value collection that can be used to share data between the <see cref="T:Microsoft.Extensions.Configuration.IConfigurationBuilder" />
and the registered configuration providers.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Sources">
<MemberSignature Language="C#" Value="public System.Collections.Generic.IList<Microsoft.Extensions.Configuration.IConfigurationSource> Sources { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Collections.Generic.IList`1<class Microsoft.Extensions.Configuration.IConfigurationSource> Sources" />
<MemberSignature Language="DocId" Value="P:Microsoft.Extensions.Configuration.ConfigurationBuilder.Sources" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property Sources As IList(Of IConfigurationSource)" />
<MemberSignature Language="F#" Value="member this.Sources : System.Collections.Generic.IList<Microsoft.Extensions.Configuration.IConfigurationSource>" Usage="Microsoft.Extensions.Configuration.ConfigurationBuilder.Sources" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::Collections::Generic::IList<Microsoft::Extensions::Configuration::IConfigurationSource ^> ^ Sources { System::Collections::Generic::IList<Microsoft::Extensions::Configuration::IConfigurationSource ^> ^ get(); };" />
<MemberType>Property</MemberType>
<Implements>
<InterfaceMember>P:Microsoft.Extensions.Configuration.IConfigurationBuilder.Sources</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>Microsoft.Extensions.Configuration</AssemblyName>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Collections.Generic.IList<Microsoft.Extensions.Configuration.IConfigurationSource></ReturnType>
</ReturnValue>
<Docs>
<summary>
Gets the sources used to obtain configuration values.
</summary>
<value>The sources used to obtain configuration values.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
</Members>
</Type>