Skip to content

Commit 47ddbdb

Browse files
authored
Merge pull request #12647 from dotnet/main
Merge main into live
2 parents a2dace3 + e231d9f commit 47ddbdb

129 files changed

Lines changed: 787 additions & 6486 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

xml/System.Configuration/AppSettingsReader.xml

Lines changed: 2 additions & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -33,57 +33,7 @@
3333
<Interfaces />
3434
<Docs>
3535
<summary>Provides a method for reading values of a particular type from the configuration.</summary>
36-
<remarks>
37-
<format type="text/markdown"><![CDATA[
38-
39-
## Examples
40-
The following example creates a configuration file that contains the `<appSettings>` section, and then uses the <xref:System.Configuration.AppSettingsReader> to read the settings just generated.
41-
42-
```csharp
43-
using System;
44-
using System.Configuration;
45-
46-
class Program
47-
{
48-
static void Main(string[] args)
49-
{
50-
var reader = new AppSettingsReader();
51-
52-
var stringSetting = reader.GetValue("String setting", typeof(string));
53-
Console.WriteLine("String setting: " + stringSetting);
54-
55-
var dateTimeSetting = reader.GetValue("DateTime setting", typeof(DateTime));
56-
Console.WriteLine("DateTime setting: " + dateTimeSetting);
57-
58-
try
59-
{
60-
var missingSetting = reader.GetValue("Int setting", typeof(Int32));
61-
}
62-
catch (InvalidOperationException e)
63-
{
64-
Console.WriteLine("Missing key error: " + e.Message);
65-
}
66-
67-
Console.WriteLine("Press any key to continue");
68-
Console.ReadKey();
69-
}
70-
}
71-
```
72-
73-
The following example demonstrates a configuration file used by the previous example.
74-
75-
```xml
76-
<?xml version="1.0" encoding="utf-8"?>
77-
<configuration>
78-
<appSettings>
79-
<add key="String setting" value="String retrieved from App.Config"/>
80-
<add key="Date setting" value="Thursday, December 01, 2005 12:53:56 PM"/>
81-
</appSettings>
82-
</configuration>
83-
```
84-
85-
]]></format>
86-
</remarks>
36+
<remarks>To be added.</remarks>
8737
<altmember cref="T:System.Configuration.AppSettingsSection" />
8838
</Docs>
8939
<Members>
@@ -115,57 +65,7 @@ class Program
11565
<Parameters />
11666
<Docs>
11767
<summary>Initializes a new instance of the <see cref="T:System.Configuration.AppSettingsReader" /> class.</summary>
118-
<remarks>
119-
<format type="text/markdown"><![CDATA[
120-
121-
## Examples
122-
The following example creates a configuration file that contains the `<appSettings>` section, and then uses the <xref:System.Configuration.AppSettingsReader> to read the settings just generated.
123-
124-
```csharp
125-
using System;
126-
using System.Configuration;
127-
128-
class Program
129-
{
130-
static void Main(string[] args)
131-
{
132-
var reader = new AppSettingsReader();
133-
134-
var stringSetting = reader.GetValue("String setting", typeof(string));
135-
Console.WriteLine("String setting: " + stringSetting);
136-
137-
var dateTimeSetting = reader.GetValue("DateTime setting", typeof(DateTime));
138-
Console.WriteLine("DateTime setting: " + dateTimeSetting);
139-
140-
try
141-
{
142-
var missingSetting = reader.GetValue("Int setting", typeof(Int32));
143-
}
144-
catch (InvalidOperationException e)
145-
{
146-
Console.WriteLine("Missing key error: " + e.Message);
147-
}
148-
149-
Console.WriteLine("Press any key to continue");
150-
Console.ReadKey();
151-
}
152-
}
153-
```
154-
155-
The following example demonstrates a configuration file used by the previous example.
156-
157-
```xml
158-
<?xml version="1.0" encoding="utf-8"?>
159-
<configuration>
160-
<appSettings>
161-
<add key="String setting" value="String retrieved from App.Config"/>
162-
<add key="Date setting" value="Thursday, December 01, 2005 12:53:56 PM"/>
163-
</appSettings>
164-
</configuration>
165-
```
166-
167-
]]></format>
168-
</remarks>
68+
<remarks>To be added.</remarks>
16969
<altmember cref="T:System.Configuration.AppSettingsSection" />
17070
</Docs>
17171
</Member>

xml/System.Configuration/AppSettingsSection.xml

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -32,26 +32,7 @@
3232
<Interfaces />
3333
<Docs>
3434
<summary>Provides configuration system support for the <see langword="appSettings" /> configuration section. This class cannot be inherited.</summary>
35-
<remarks>
36-
<format type="text/markdown"><![CDATA[
37-
38-
## Remarks
39-
The `appSettings` configuration section provides for key/value pairs of `string` values for an application. Rather than accessing these values by using an instance of an <xref:System.Configuration.AppSettingsSection> object, you should use the <xref:System.Configuration.ConfigurationManager.AppSettings> property of the <xref:System.Configuration.ConfigurationManager> class or the <xref:System.Web.Configuration.WebConfigurationManager.AppSettings> property of the <xref:System.Web.Configuration.WebConfigurationManager> class.
40-
41-
42-
43-
## Examples
44-
The following example shows how to use the <xref:System.Configuration.AppSettingsSection> class in a console application. It reads and writes the key/value pairs that are contained by the `appSettings` section. It also shows how to access the <xref:System.Configuration.AppSettingsSection.File> property of the <xref:System.Configuration.AppSettingsSection> class.
45-
46-
> [!NOTE]
47-
> Before you compile this code, add a reference in your project to System.Configuration.dll.
48-
49-
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Configuration.AppSettingsSection/CS/UsingAppSettingsSection.cs" id="Snippet21":::
50-
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Configuration.AppSettingsSection/VB/AppSettingsSection.vb" id="Snippet21":::
51-
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Configuration.AppSettingsSection/VB/UsingAppSettingsSection.vb" id="Snippet21":::
52-
53-
]]></format>
54-
</remarks>
35+
<remarks>To be added.</remarks>
5536
<altmember cref="T:System.Configuration.ConfigurationManager" />
5637
</Docs>
5738
<Members>

xml/System.Configuration/ApplicationSettingsBase.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@
246246
<format type="text/markdown"><![CDATA[
247247
248248
## Remarks
249-
This constructor initializes the <xref:System.Configuration.ApplicationSettingsBase.SettingsKey> property to the value of the `settingsKey` parameter. This property is useful in disambiguating different instances of the settings wrapper class in the same application domain.
249+
This constructor initializes the <xref:System.Configuration.ApplicationSettingsBase.SettingsKey> property to the value of the `settingsKey` parameter. This property is useful in disambiguating different instances of the settings wrapper class.
250250
251251
For information about how reflection is used during the instantiation of a wrapper class, see the default <xref:System.Configuration.ApplicationSettingsBase.%23ctor> constructor.
252252
@@ -294,7 +294,7 @@
294294
## Remarks
295295
The <xref:System.ComponentModel.IComponent> object specified by the `owner` parameter acts as the owner of the current instance of this applications settings class. During the initialization of the settings wrapper class derived from <xref:System.Configuration.ApplicationSettingsBase>, the owner's site is queried for a <xref:System.Configuration.ISettingsProviderService>. If one exists, it is used in preference to native settings provider for all the properties of the wrapper class, as specified by the <xref:System.Configuration.SettingsProviderAttribute>.
296296
297-
This constructor initializes the <xref:System.Configuration.ApplicationSettingsBase.SettingsKey> property to the value of the `settingsKey` parameter. This property is useful in disambiguating different instances of the wrapper class in the same application domain.
297+
This constructor initializes the <xref:System.Configuration.ApplicationSettingsBase.SettingsKey> property to the value of the `settingsKey` parameter. This property is useful in disambiguating different instances of the wrapper class.
298298
299299
For information about how reflection is used during the instantiation of a wrapper class, see the default <xref:System.Configuration.ApplicationSettingsBase.%23ctor> constructor.
300300

xml/System.Configuration/ClientSettingsSection.xml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,10 @@
3636
<format type="text/markdown"><![CDATA[
3737
3838
## Remarks
39-
The .NET Framework contains a single default settings provider, <xref:System.Configuration.LocalFileSettingsProvider>, which stores configuration data to the local file system in files with the extension `.config`. The contents of configuration files are structured as XML documents. User-scoped settings are persisted in a file with the name `username.config`. Within this file, data is stored as elements within a `<userSettings>` section. Each of these sections is represented by a corresponding <xref:System.Configuration.ClientSettingsSection>. Each section object is owned and administered by a configuration section handler, which is an <xref:System.Configuration.IConfigurationSectionHandler>.
4039
41-
The <xref:System.Configuration.ClientSettingsSection> class represents a simple extension of the <xref:System.Configuration.ConfigurationSection> class, which is used in the .NET Framework support for general configuration files.
40+
.NET contains a single default settings provider, <xref:System.Configuration.LocalFileSettingsProvider>, which stores configuration data to the local file system in files with the extension `.config`. The contents of configuration files are structured as XML documents. User-scoped settings are persisted in a file with the name `username.config`. Within this file, data is stored as elements within a `<userSettings>` section. Each of these sections is represented by a corresponding <xref:System.Configuration.ClientSettingsSection>. Each section object is owned and administered by a configuration section handler, which is an <xref:System.Configuration.IConfigurationSectionHandler>.
4241
43-
For more information about application settings, see the topic [Application Settings for Windows Forms](/dotnet/desktop/winforms/advanced/application-settings-for-windows-forms).
42+
The <xref:System.Configuration.ClientSettingsSection> class represents a simple extension of the <xref:System.Configuration.ConfigurationSection> class, which is used in the .NET support for general configuration files.
4443
4544
]]></format>
4645
</remarks>

xml/System.Configuration/Configuration.xml

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -43,23 +43,19 @@
4343
You can get a <xref:System.Configuration.Configuration> object by using the following classes:
4444
4545
- The <xref:System.Configuration.ConfigurationManager> class, if your entity is a client application.
46-
4746
- The <xref:System.Web.Configuration.WebConfigurationManager> class, if your entity is a Web application.
4847
4948
The names of the methods that return a <xref:System.Configuration.Configuration> object begin with "Open".
5049
5150
You can also generate a configuration file that represents the configuration settings in a <xref:System.Configuration.Configuration> object. To do this, use one of the following methods:
5251
5352
- Call the <xref:System.Configuration.Configuration.Save*> method to create a new configuration file.
54-
5553
- Call the <xref:System.Configuration.Configuration.SaveAs*> method to generate a new configuration file at another location.
5654
5755
The names of the methods that create configuration files begin with "Save".
5856
5957
> [!NOTE]
60-
> To enable access to configuration settings on a remote computer, use the Aspnet_regiis command-line tool. For information about creating and accessing custom configuration settings other than the intrinsic sections included in the .NET Framework, refer to <xref:System.Configuration.ConfigurationSection>.
61-
62-
58+
> To enable access to configuration settings on a remote computer, use the Aspnet_regiis command-line tool. For information about creating and accessing custom configuration settings other than the intrinsic sections included in .NET, see <xref:System.Configuration.ConfigurationSection>.
6359
6460
## Examples
6561
The following code example demonstrates how to use the <xref:System.Configuration.Configuration> class to access configuration file elements.
@@ -92,7 +88,6 @@ Note: If you use a static <see langword="GetSection" /> method that takes a path
9288
</block>
9389
<altmember cref="T:System.Configuration.ConfigurationSection" />
9490
<altmember cref="T:System.Configuration.ConfigurationManager" />
95-
<related type="Article" href="/dotnet/framework/configure-apps/">Configuration Files</related>
9691
</Docs>
9792
<Members>
9893
<Member MemberName="AppSettings">
@@ -178,7 +173,7 @@ Note: If you use a static <see langword="GetSection" /> method that takes a path
178173
<format type="text/markdown"><![CDATA[
179174
180175
## Remarks
181-
This property enables a consumer of the .NET Framework configuration system to set a function delegate that is used to transform assembly strings found in configuration files. Visual Studio 2010 uses this property when a project is targeted for an earlier version of the .NET Framework. The function makes sure that assembly strings are formatted correctly for the targeted version of the .NET Framework when configuration files are updated.
176+
This property enables a consumer of the .NET configuration system to set a function delegate that is used to transform assembly strings found in configuration files. The function makes sure that assembly strings are formatted correctly for the targeted version of .NET when configuration files are updated.
182177
183178
]]></format>
184179
</remarks>
@@ -466,17 +461,9 @@ Note: If you use a static <see langword="GetSection" /> method that takes a path
466461
<format type="text/markdown"><![CDATA[
467462
468463
## Remarks
469-
The <xref:System.Configuration.Configuration.HasFile> property also returns `true` when the resource represented by this <xref:System.Configuration.Configuration> object inherits settings from a Web.config file.
470464
471-
The <xref:System.Configuration.Configuration.HasFile> property returns `false` when this <xref:System.Configuration.Configuration> object represents a location-specific configuration.
472-
473-
474-
475-
## Examples
476-
The following code example demonstrates how to use the <xref:System.Configuration.Configuration.HasFile> property.
465+
The <xref:System.Configuration.Configuration.HasFile> property returns `false` when this <xref:System.Configuration.Configuration> object represents a location-specific configuration.
477466
478-
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.Configuration.Configuration/CS/Configuration.cs" id="Snippet9":::
479-
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Configuration.Configuration/VB/Configuration.vb" id="Snippet9":::
480467
481468
]]></format>
482469
</remarks>
@@ -1138,7 +1125,7 @@ Note: If you use a static <see langword="GetSection" /> method that takes a path
11381125
<format type="text/markdown"><![CDATA[
11391126
11401127
## Remarks
1141-
This property enables a consumer of the .NET Framework configuration system to set a function delegate that is used to transform type strings found in configuration files. Visual Studio 2010 uses this property when a project is targeted for an earlier version of the .NET Framework. The function makes sure that type strings are formatted correctly for the targeted version of the .NET Framework when configuration files are updated.
1128+
This property enables a consumer of the .NET configuration system to set a function delegate that is used to transform type strings found in configuration files. The function makes sure that type strings are formatted correctly for the targeted version of the .NET when configuration files are updated.
11421129
11431130
]]></format>
11441131
</remarks>

xml/System.Configuration/ConfigurationCollectionAttribute.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,8 @@
138138
<format type="text/markdown"><![CDATA[
139139
140140
## Remarks
141-
You use this constructor to tell the .NET Framework the custom type of the property collection to be created.
142-
143141
142+
You use this constructor to declare the custom type of the property collection to be created.
144143
145144
## Examples
146145
The following example shows how to use the <xref:System.Configuration.ConfigurationCollectionAttribute.%23ctor*>.

0 commit comments

Comments
 (0)