Skip to content

Commit 6491536

Browse files
Merge pull request #11251 from dotnet/main
Merge main into live
2 parents d64ee79 + ac52319 commit 6491536

File tree

89 files changed

+6816
-6891
lines changed

Some content is hidden

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

89 files changed

+6816
-6891
lines changed

xml/System.Globalization/CultureInfo.xml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1279,21 +1279,19 @@ You might choose to override some of the values associated with the current cult
12791279
<format type="text/markdown"><![CDATA[
12801280
12811281
## Remarks
1282-
In the .NET Framework 4 and previous versions, by default, the UI culture of all threads is set to the Windows system culture. For applications whose current UI culture differs from the default system culture, this behavior is often undesirable. In the .NET Framework 4.5, the <xref:System.Globalization.CultureInfo.DefaultThreadCurrentUICulture%2A> property lets you define the default UI culture of all threads in an application domain.
1282+
In the .NET Framework 4 and previous versions, by default, the UI culture of all threads is set to the Windows system culture. For applications whose current UI culture differs from the default system culture, this behavior is often undesirable. In .NET Framework 4.5+, the <xref:System.Globalization.CultureInfo.DefaultThreadCurrentUICulture%2A> property lets you define the default UI culture of all threads in an application domain.
12831283
12841284
> [!IMPORTANT]
12851285
> If you have not explicitly set the UI culture of any existing threads executing in an application domain, setting the <xref:System.Globalization.CultureInfo.DefaultThreadCurrentUICulture%2A> property also changes the culture of these threads. However, if these threads execute in another application domain, their culture is defined by the <xref:System.Globalization.CultureInfo.DefaultThreadCurrentUICulture%2A> property in that application domain or, if no default value is defined, by the default system culture. Because of this, we recommend that you always explicitly set the culture of your main application thread and do not rely on the <xref:System.Globalization.CultureInfo.DefaultThreadCurrentUICulture%2A> property to define the culture of the main application thread.
12861286
12871287
Unless it is set explicitly, the value of the <xref:System.Globalization.CultureInfo.DefaultThreadCurrentUICulture%2A> property is `null`, and the current culture of all threads in an application domain that have not been assigned an explicit culture is defined by the default Windows system culture.
12881288
1289-
For more information about cultures, threads, and application domains, see the "Culture and threads" and "Culture and application domains" sections in the <xref:System.Globalization.CultureInfo> reference page.
1290-
1291-
1289+
For more information about cultures, threads, and application domains, see the "Culture and threads" and "Culture and application domains" sections of <xref:System.Globalization.CultureInfo>.
12921290
12931291
## Examples
1294-
The following example illustrates the default behavior of the .NET Framework in defining the current culture of a new thread. It uses English and Russian language resources. The following text file named GreetingStrings.txt contains the English language resources:
1292+
The following example illustrates the default behavior of .NET in defining the current culture of a new thread. It uses English and Russian language resources. The following text file named GreetingStrings.txt contains the English language resources:
12951293
1296-
```
1294+
```txt
12971295
greeting =Hello again!
12981296
newGreeting=Hello!
12991297
```
@@ -1306,7 +1304,7 @@ resgen greetingstrings.txt
13061304
13071305
The following text file named GreetingStrings.ru-RU.txt contains the Russian language resources:
13081306
1309-
```
1307+
```txt
13101308
greeting=Еще раз привет!
13111309
newGreeting=Привет!
13121310
```

xml/System.IO.MemoryMappedFiles/MemoryMappedFile.xml

Lines changed: 12 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -896,38 +896,27 @@
896896
## Remarks
897897
Use this method to create a memory-mapped file that is not persisted (that is, not associated with a file on disk), which you can use to share data between processes.
898898
899-
900-
901899
## Examples
902900
The following example is composed of three separate processes (console applications) that write `Boolean` values to a memory-mapped file. The following sequence of actions occur:
903901
904-
1. Process A creates the memory-mapped file and writes a value to it.
905-
906-
2. Process B opens the memory-mapped file and writes a value to it.
907-
908-
3. Process C opens the memory-mapped file and writes a value to it.
909-
910-
4. Process A reads and displays the values from the memory-mapped file.
911-
912-
5. After Process A is finished with the memory-mapped file, the file is immediately reclaimed by garbage collection.
902+
1. Process A creates the memory-mapped file and writes a value to it.
903+
2. Process B opens the memory-mapped file and writes a value to it.
904+
3. Process C opens the memory-mapped file and writes a value to it.
905+
4. Process A reads and displays the values from the memory-mapped file.
906+
5. After Process A is finished with the memory-mapped file, the file is immediately reclaimed by garbage collection.
913907
914908
To run this example, do the following:
915909
916-
1. Compile the applications and open three Command windows.
917-
918-
2. In the first Command window, run Process A.
919-
920-
3. In the second Command window, run Process B.
921-
922-
4. Return to Process A and press ENTER.
923-
924-
5. In the third Command window, run Process C.
925-
926-
6. Return to Process A and press ENTER.
910+
1. Compile the applications and open three Command windows.
911+
2. In the first Command window, run Process A.
912+
3. In the second Command window, run Process B.
913+
4. Return to Process A and press ENTER.
914+
5. In the third Command window, run Process C.
915+
6. Return to Process A and press ENTER.
927916
928917
The output of Process A is as follows:
929918
930-
```
919+
```txt
931920
Start Process B and press ENTER to continue.
932921
Start Process C and press ENTER to continue.
933922
Process A says: True

xml/System.IO/BufferedStream.xml

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -743,34 +743,6 @@ Flushing the stream will not flush its underlying encoder unless you explicitly
743743
744744
Attempting to manipulate a stream after it has been closed might throw an <xref:System.ObjectDisposedException>.
745745
746-
## Examples
747-
This code example is part of a larger example provided for the <xref:System.IO.BufferedStream> class.
748-
749-
```vb
750-
' When bufStream is closed, netStream is in turn
751-
' closed, which in turn shuts down the connection
752-
' and closes clientSocket.
753-
Console.WriteLine(vbCrLf & "Shutting down the connection.")
754-
bufStream.Close()
755-
```
756-
757-
```csharp
758-
// When bufStream is closed, netStream is in turn
759-
// closed, which in turn shuts down the connection
760-
// and closes clientSocket.
761-
Console.WriteLine("\nShutting down the connection.");
762-
bufStream.Close();
763-
```
764-
765-
```cpp
766-
// When bufStream is closed, netStream is in turn closed,
767-
// which in turn shuts down the connection and closes
768-
// clientSocket.
769-
Console::WriteLine( "\nShutting down connection." );
770-
bufStream->Close();
771-
772-
```
773-
774746
]]></format>
775747
</remarks>
776748
<exception cref="T:System.IO.IOException">An error occurred while trying to close the stream.</exception>

xml/System.IO/Directory.xml

Lines changed: 24 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -983,12 +983,13 @@ An I/O error occurred.</exception>
983983
<format type="text/markdown"><![CDATA[
984984
985985
## Remarks
986-
`searchPattern` can be a combination of literal and wildcard characters, but it doesn't support regular expressions. The following wildcard specifiers are permitted in `searchPattern`.
986+
987+
`searchPattern` can be a combination of literal and wildcard characters, but it doesn't support regular expressions. The following wildcard specifiers are permitted in `searchPattern`.
987988
988-
|Wildcard specifier|Matches|
989-
|------------------------|-------------|
990-
|\* (asterisk)|Zero or more characters in that position.|
991-
|? (question mark)|Exactly one character in that position.|
989+
| Wildcard specifier | Matches |
990+
|--------------------|-------------------------------------------|
991+
| \* (asterisk) | Zero or more characters in that position. |
992+
| ? (question mark) | Exactly one character in that position. |
992993
993994
Characters other than the wildcard are literal characters. For example, the `searchPattern` string "\*t" searches for all names in `path` ending with the letter "t". The `searchPattern` string "s\*" searches for all names in `path` beginning with the letter "s".
994995
@@ -1009,8 +1010,6 @@ An I/O error occurred.</exception>
10091010
<paramref name="searchPattern" /> does not contain a valid pattern.</exception>
10101011
<exception cref="T:System.ArgumentNullException">
10111012
<paramref name="path" /> or <paramref name="searchPattern" /> is <see langword="null" />.</exception>
1012-
<exception cref="T:System.ArgumentOutOfRangeException">
1013-
<paramref name="searchOption" /> is not a valid <see cref="T:System.IO.SearchOption" /> value.</exception>
10141013
<exception cref="T:System.IO.DirectoryNotFoundException">
10151014
<paramref name="path" /> is invalid, such as referring to an unmapped drive.</exception>
10161015
<exception cref="T:System.IO.IOException">
@@ -1397,8 +1396,6 @@ The returned collection is not cached. Each call to the <xref:System.Collections
13971396
-or-
13981397

13991398
<paramref name="searchPattern" /> is <see langword="null" />.</exception>
1400-
<exception cref="T:System.ArgumentOutOfRangeException">
1401-
<paramref name="enumerationOptions" /> is not a valid <see cref="T:System.IO.EnumerationOptions" /> value.</exception>
14021399
<exception cref="T:System.IO.DirectoryNotFoundException">
14031400
<paramref name="path" /> is invalid, such as referring to an unmapped drive.</exception>
14041401
<exception cref="T:System.IO.IOException">
@@ -1740,12 +1737,13 @@ The returned collection is not cached. Each call to the <xref:System.Collections
17401737
<format type="text/markdown"><![CDATA[
17411738
17421739
## Remarks
1743-
`searchPattern` can be a combination of literal and wildcard characters, but it doesn't support regular expressions. The following wildcard specifiers are permitted in `searchPattern`.
1740+
1741+
`searchPattern` can be a combination of literal and wildcard characters, but it doesn't support regular expressions. The following wildcard specifiers are permitted in `searchPattern`.
17441742
1745-
|Wildcard specifier|Matches|
1746-
|------------------------|-------------|
1747-
|\* (asterisk)|Zero or more characters in that position.|
1748-
|? (question mark)|Exactly one character in that position.|
1743+
| Wildcard specifier | Matches |
1744+
|--------------------|-------------------------------------------|
1745+
| \* (asterisk) | Zero or more characters in that position. |
1746+
| ? (question mark) | Exactly one character in that position. |
17491747
17501748
Characters other than the wildcard are literal characters. For example, the `searchPattern` string "\*t" searches for all names in `path` ending with the letter "t". The `searchPattern` string "s\*" searches for all names in `path` beginning with the letter "s".
17511749
@@ -1778,8 +1776,6 @@ The returned collection is not cached. Each call to the <xref:System.Collections
17781776
-or-
17791777

17801778
<paramref name="searchPattern" /> is <see langword="null" />.</exception>
1781-
<exception cref="T:System.ArgumentOutOfRangeException">
1782-
<paramref name="enumerationOptions" /> is not a valid <see cref="T:System.IO.EnumerationOptions" /> value.</exception>
17831779
<exception cref="T:System.IO.DirectoryNotFoundException">
17841780
<paramref name="path" /> is invalid, such as referring to an unmapped drive.</exception>
17851781
<exception cref="T:System.IO.IOException">
@@ -2634,10 +2630,10 @@ The returned collection is not cached. Each call to the <xref:System.Collections
26342630
26352631
`searchPattern` can be a combination of literal and wildcard characters, but it doesn't support regular expressions. The following wildcard specifiers are permitted in `searchPattern`.
26362632
2637-
|Wildcard specifier|Matches|
2638-
|------------------------|-------------|
2639-
|\* (asterisk)|Zero or more characters in that position.|
2640-
|? (question mark)|Exactly one character in that position.|
2633+
| Wildcard specifier | Matches |
2634+
|--------------------|-------------------------------------------|
2635+
| \* (asterisk) | Zero or more characters in that position. |
2636+
| ? (question mark) | Exactly one character in that position. |
26412637
26422638
Characters other than the wildcard are literal characters. For example, the `searchPattern` string "\*t" searches for all names in `path` ending with the letter "t". The `searchPattern` string "s\*" searches for all names in `path` beginning with the letter "s".
26432639
@@ -3125,10 +3121,10 @@ The returned collection is not cached. Each call to the <xref:System.Collections
31253121
31263122
`searchPattern` can be a combination of literal and wildcard characters, but it doesn't support regular expressions. The following wildcard specifiers are permitted in `searchPattern`.
31273123
3128-
|Wildcard specifier|Matches|
3129-
|------------------------|-------------|
3130-
|\* (asterisk)|Zero or more characters in that position.|
3131-
|? (question mark)|Exactly one character in that position.|
3124+
| Wildcard specifier | Matches |
3125+
|--------------------|-------------------------------------------|
3126+
| \* (asterisk) | Zero or more characters in that position. |
3127+
| ? (question mark) | Exactly one character in that position. |
31323128
31333129
Characters other than the wildcard are literal characters. For example, the `searchPattern` string "\*t" searches for all names in `path` ending with the letter "t". The `searchPattern` string "s\*" searches for all names in `path` beginning with the letter "s".
31343130
@@ -3536,10 +3532,10 @@ The returned collection is not cached. Each call to the <xref:System.Collections
35363532
35373533
`searchPattern` can be a combination of literal and wildcard characters, but it doesn't support regular expressions. The following wildcard specifiers are permitted in `searchPattern`.
35383534
3539-
|Wildcard specifier|Matches|
3540-
|------------------------|-------------|
3541-
|\* (asterisk)|Zero or more characters in that position.|
3542-
|? (question mark)|Exactly one character in that position.|
3535+
| Wildcard specifier | Matches |
3536+
|--------------------|-------------------------------------------|
3537+
| \* (asterisk) | Zero or more characters in that position. |
3538+
| ? (question mark) | Exactly one character in that position. |
35433539
35443540
Characters other than the wildcard are literal characters. For example, the `searchPattern` string "\*t" searches for all names in `path` ending with the letter "t". The `searchPattern` string "s\*" searches for all names in `path` beginning with the letter "s".
35453541

xml/System.IO/FileInfo.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@
129129
130130
This example produces output similar to the following.
131131
132-
```
132+
```txt
133133
Hello
134134
And
135135
Welcome

xml/System.IO/Path.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2209,7 +2209,7 @@ Console.WriteLine(result);
22092209
22102210
This example produces output similar to the following.
22112211
2212-
```
2212+
```txt
22132213
C:\Users\UserName\AppData\Local\Temp\
22142214
```
22152215

xml/System.Web.Caching/SqlCacheDependency.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@
145145
146146
The database name passed to the `database` parameter must be defined in the application's Web.config file. For example, the following Web.config file defines a database named pubs for <xref:System.Web.Caching.SqlCacheDependency> change notifications.
147147
148-
```
148+
```xml
149149
<configuration>
150150
<connectionStrings>
151151
<add name="Pubs" connectionString="Data Source=(local); Initial Catalog=pubs; Integrated Security=true"; providerName="System.Data.SqlClient" />
@@ -247,7 +247,7 @@
247247
## Remarks
248248
The following markup shows a typical output-cache dependency directive.
249249
250-
```
250+
```xml
251251
<%@ OutputCache Duration="3600" SqlDependency="Northwind:Employees" VaryByParam="none" %>
252252
```
253253

xml/System.Web.Compilation/RouteUrlExpressionBuilder.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
## Examples
3737
The following example shows how to create markup that generates a hyperlink with a URL that is formatted for a route. The route is defined by using `http://www.contoso.com/search/{searchterm}` as the URL pattern.
3838
39-
```
39+
```xml
4040
<asp:HyperLink ID="HyperLink1" runat="server"
4141
NavigateUrl="<%$ RouteUrl:searchterm=Bicycles %>">
4242
Search for Bicycles
@@ -47,7 +47,7 @@
4747
4848
If the URL parameters provided to the `RouteUrl` expression are not sufficient to uniquely identify a route, you must include the route name. For example, if a Web application has two routes with `searchterm` as the sole URL parameter, the routes would have to be defined by using route names, and the hyperlink markup would resemble the following example:
4949
50-
```
50+
```xml
5151
<asp:HyperLink ID="HyperLink1" runat="server"
5252
NavigateUrl="<%$ RouteUrl:searchterm=Bicycles,
5353
routename=BasicSearchRoute %>">

xml/System.Web.Compilation/RouteValueExpressionBuilder.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
## Examples
3737
The following example shows how to use markup to display the value of the URL parameter `searchterm`. The route is defined by using `http://www.contoso.com/search/{searchterm}` as the URL pattern.
3838
39-
```
39+
```xml
4040
<asp:Label ID="Label1" runat="server"
4141
text="<%$ RouteValue:searchterm %>">
4242
</asp:Label>

xml/System.Web.Configuration/AuthorizationSection.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
> [!NOTE]
3636
> If you use the `credentials` section, be sure to follow the guidelines explained at [ASP.NET Authentication](https://learn.microsoft.com/previous-versions/aspnet/eeyk640h(v=vs.100)). For scalability and better security capability, it is recommended that you use an external database to store the users' credentials. For more information about building secure ASP.NET applications, see [Securing Your ASP.NET Application](https://learn.microsoft.com/archive/msdn-magazine/2012/january/asp-net-security-securing-your-asp-net-applications) and [Building Secure ASP.NET Applications: Authentication, Authorization, and Secure Communication](https://learn.microsoft.com/previous-versions/msp-n-p/ff649357(v=pandp.10)).
3737
38-
```
38+
```xml
3939
<authorization>
4040
<allow users="userName" roles="admin" verbs="post" />
4141
<deny users="*" verbs="post"/>

xml/System.Web.Configuration/ClientTarget.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
3838
The following code example shows how to declaratively specify values for several properties of the <xref:System.Web.Configuration.ClientTarget> class.
3939
40-
```
40+
```xml
4141
<clientTarget>
4242
<add alias=
4343
"uplevel"

xml/System.Web.Configuration/ClientTargetCollection.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
4141
The following example shows an excerpt from the configuration file.
4242
43-
```
43+
```xml
4444
<clientTarget>
4545
<add alias=
4646
"uplevel"

xml/System.Web.Configuration/ClientTargetSection.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
3232
The following code example shows how to declaratively specify values for several properties of the <xref:System.Web.Configuration.ClientTarget> class.
3333
34-
```
34+
```xml
3535
<clientTarget>
3636
<add alias=
3737
"uplevel" userAgent="Mozilla/5.0 (compatible;MSIE 6.0;Windows NT 5.1)"/>

xml/System.Web.Configuration/HttpCapabilitiesBase.xml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2349,7 +2349,7 @@
23492349
## Remarks
23502350
Intended for internal use only. Some browsers require a meta-tag similar to the following for the browser to render properly.
23512351
2352-
```
2352+
```html
23532353
<META NAME="NAME" CONTENT="VALUE">
23542354
```
23552355
@@ -2421,14 +2421,12 @@
24212421
## Remarks
24222422
If `true`, server-control adapters insert the following tag into the HTML `<head>` element of a Web page:
24232423
2424-
```
2424+
```html
24252425
<META HTTP-EQUIV="CONTENT-TYPE" CONTENT=""; CHARSET="">
24262426
```
24272427
24282428
In this example, `CONTENT` is the value returned by the <xref:System.Web.Configuration.HttpCapabilitiesBase.PreferredRenderingMime%2A> property, and `charset` is the character encoding used.
24292429
2430-
2431-
24322430
## Examples
24332431
The following code example shows how to determine whether the browser requires an HTML `<meta>` element for which the `content-type` attribute is specified.
24342432
@@ -2724,7 +2722,7 @@
27242722
## Remarks
27252723
HTTP is a stateless protocol, and `VIEWSTATE` is one mechanism used to persist client changes across multiple requests. Each control on a Web page contains a <xref:System.Web.UI.Control.ViewState%2A> property, which represents the accumulation of any changes made by the client. In a Web Forms page, these changes are encoded in postback data as the `value` of an HTML `<input>` element with a `type` attribute of `hidden`. For example:
27262724
2727-
```
2725+
```html
27282726
<input type="hidden" name="__VIEWSTATE" value="t0PH_u56?cDxleHQ7P=" />
27292727
```
27302728
@@ -3147,7 +3145,7 @@
31473145
## Remarks
31483146
The `cache-control` value for the `http-equiv` attribute of HTML `<meta>` elements allows control over client caching of downloaded content, which includes Web pages. The following HTML fragment shows an example:
31493147
3150-
```
3148+
```html
31513149
<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE"/>
31523150
```
31533151
@@ -3157,7 +3155,7 @@
31573155
31583156
The <xref:System.Web.Configuration.HttpCapabilitiesBase.SupportsCacheControlMetaTag%2A> property also applies to the equivalent HTTP header form:
31593157
3160-
```
3158+
```txt
31613159
CACHE-CONTROL: NO-CACHE
31623160
```
31633161

xml/System.Web.Configuration/HttpHandlerAction.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
4040
The following configuration excerpt shows how to specify values declaratively for the `httpHandlers` section.
4141
42-
```
42+
```xml
4343
<httpHandlers>
4444
<add path="Calculator.custom"
4545
type="Samples.Aspnet.SystemWebConfiguration.Calculator, CalculatorHandler"

xml/System.Web.Configuration/HttpHandlersSection.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
3636
The following configuration excerpt shows how to specify values declaratively for the `httpHandlers` section.
3737
38-
```
38+
```xml
3939
<httpHandlers>
4040
<add path="Calculator.custom"
4141
type="Samples.Aspnet.SystemWebConfiguration.Calculator, CalculatorHandler"

0 commit comments

Comments
 (0)