Skip to content

Add language slugs (mostly System namespace) #11224

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion xml/System.Text.RegularExpressions/MatchCollection.xml
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@ A collection that is read-only does not allow the addition or removal of element

The example produces the following output:

```
```txt
Half
house
huge
Expand Down
14 changes: 7 additions & 7 deletions xml/System.Text.RegularExpressions/Regex.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2986,7 +2986,7 @@ Allows an <see cref="T:System.Object" /> to attempt to free resources and perfor

The regular expression pattern is:

```
```txt
^[a-zA-Z0-9]\d{2}[a-zA-Z0-9](-\d{3}){2}[A-Za-z0-9]$
```

Expand Down Expand Up @@ -3169,7 +3169,7 @@ For more details about `startat`, see the Remarks section of <xref:System.Text.R

The regular expression pattern is:

```
```txt
[a-zA-Z0-9]\d{2}[a-zA-Z0-9](-\d{3}){2}[A-Za-z0-9]$
```

Expand Down Expand Up @@ -3274,7 +3274,7 @@ For more details about `startat`, see the Remarks section of <xref:System.Text.R

The regular expression pattern is:

```
```txt
^[a-zA-Z0-9]\d{2}[a-zA-Z0-9](-\d{3}){2}[A-Za-z0-9]$
```

Expand Down Expand Up @@ -3440,7 +3440,7 @@ For more details about `startat`, see the Remarks section of <xref:System.Text.R

The regular expression pattern is:

```
```txt
^[A-Z0-9]\d{2}[A-Z0-9](-\d{3}){2}[A-Z0-9]$
```

Expand All @@ -3460,7 +3460,7 @@ For more details about `startat`, see the Remarks section of <xref:System.Text.R

Calling the <xref:System.Text.RegularExpressions.Regex.IsMatch(System.String,System.String,System.Text.RegularExpressions.RegexOptions)> method with the `options` parameter set to <xref:System.Text.RegularExpressions.RegexOptions.IgnoreCase?displayProperty=nameWithType> is equivalent to defining the following regular expression:

```
```txt
[a-zA-Z0-9]\d{2}[a-zA-Z0-9](-\d{3}){2}[A-Za-z0-9]
```

Expand Down Expand Up @@ -3619,7 +3619,7 @@ For more details about `startat`, see the Remarks section of <xref:System.Text.R

The regular expression pattern is:

```
```txt
^[A-Z0-9]\d{2}[A-Z0-9](-\d{3}){2}[A-Z0-9]$
```

Expand All @@ -3639,7 +3639,7 @@ For more details about `startat`, see the Remarks section of <xref:System.Text.R

Calling the <xref:System.Text.RegularExpressions.Regex.IsMatch(System.String,System.String,System.Text.RegularExpressions.RegexOptions,System.TimeSpan)> method with the `options` parameter set to <xref:System.Text.RegularExpressions.RegexOptions.IgnoreCase?displayProperty=nameWithType> is equivalent to defining the following regular expression:

```
```txt
[a-zA-Z0-9]\d{2}[a-zA-Z0-9](-\d{3}){2}[A-Za-z0-9]
```

Expand Down
4 changes: 0 additions & 4 deletions xml/System.Text/Encoding.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4354,14 +4354,12 @@ In .NET 5 and later versions, the code page name `utf-7` is not supported.
The example uses the following text, which should be saved to a UTF-8 encoded file named Utf8Example.txt.

```txt

This is a UTF-8-encoded file that contains primarily Latin text, although it
does list the first twelve letters of the Russian (Cyrillic) alphabet:

А б в г д е ё ж з и й к

The goal is to save this file, then open and decode it as a binary stream.

```

]]></format>
Expand Down Expand Up @@ -4597,14 +4595,12 @@ The goal is to save this file, then open and decode it as a binary stream.
The example uses the following text, which should be saved to a UTF-8 encoded file named Utf8Example.txt.

```txt

This is a UTF-8-encoded file that contains primarily Latin text, although it
does list the first twelve letters of the Russian (Cyrillic) alphabet:

А б в г д е ё ж з и й к

The goal is to save this file, then open and decode it as a binary stream.

```

]]></format>
Expand Down
14 changes: 7 additions & 7 deletions xml/System.Transactions/TransactionEventArgs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,16 @@
<Docs>
<summary>Provides data for the following transaction events: <see cref="E:System.Transactions.TransactionManager.DistributedTransactionStarted" />, <see cref="E:System.Transactions.Transaction.TransactionCompleted" />.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following example demonstrates how this type is used.
```cs
<format type="text/markdown"><![CDATA[

## Examples
The following example demonstrates how this type is used.

```csharp
//Transaction completed event handler
static void Current_TransactionCompleted(object sender, TransactionEventArgs e)
{

Console.WriteLine("A transaction has completed:");
Console.WriteLine("ID:{0}", e.Transaction.TransactionInformation.LocalIdentifier);
Console.WriteLine("Distributed ID: {0}", e.Transaction.TransactionInformation.DistributedIdentifier);
Expand Down
2 changes: 1 addition & 1 deletion xml/System/Byte.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6730,7 +6730,7 @@ This member is an explicit interface member implementation. It can be used only

The `s` parameter should be the string representation of a number in the following form:

```
```txt
[ws][sign]digits[ws]
```

Expand Down
4 changes: 2 additions & 2 deletions xml/System/DateTime.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3591,7 +3591,7 @@ The value parameter is rounded to the nearest integer.

The example displays the following output:

```
```txt
7/28/2009
7/28/09
07/28/09
Expand Down Expand Up @@ -3882,7 +3882,7 @@ July, 2009

The example displays the following output:

```
```txt
28/07/2009
28/07/09
28.07.09
Expand Down
4 changes: 2 additions & 2 deletions xml/System/Environment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@

The example can then be invoked from a batch file such as the following, which makes its error codes accessible by using the `ERRORLEVEL` command.

```
```bat
@echo off
Double.exe %1
if errorlevel 1639 goto NoArg
Expand All @@ -502,7 +502,7 @@ goto :EOF

The following shows some sample output produced by invoking the batch file.

```
```txt
>getdouble 123
Result: 246
Completed Successfully
Expand Down
4 changes: 2 additions & 2 deletions xml/System/Math.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3883,13 +3883,13 @@ Dim i2 As Integer = CInt(Math.Floor(d2)) ' Result: 7968

The <xref:System.Math.IEEERemainder%2A> method is not the same as the [remainder operator](/dotnet/csharp/language-reference/operators/remainder-operator). Although both return the remainder after division, the formulas they use are different. The formula for the <xref:System.Math.IEEERemainder%2A> method is:

```
```txt
IEEERemainder = dividend - (divisor * Math.Round(dividend / divisor))
```

In contrast, the formula for the remainder operator is:

```
```txt
Remainder = (Math.Abs(dividend) - (Math.Abs(divisor) *
(Math.Floor(Math.Abs(dividend) / Math.Abs(divisor))))) *
Math.Sign(dividend)
Expand Down
4 changes: 2 additions & 2 deletions xml/System/MathF.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1177,13 +1177,13 @@ The value of this constant is 2.71828175.

The <xref:System.MathF.IEEERemainder%2A> method is not the same as the [remainder operator](/dotnet/csharp/language-reference/operators/remainder-operator). Although both return the remainder after division, the formulas they use are different. The formula for the <xref:System.MathF.IEEERemainder%2A> method is:

```
```txt
IEEERemainder = dividend - (divisor * MathF.Round(dividend / divisor))
```

In contrast, the formula for the remainder operator is:

```
```txt
Remainder = (MathF.Abs(dividend) - (MathF.Abs(divisor) *
(MathF.Floor(MathF.Abs(dividend) / MathF.Abs(divisor))))) *
MathF.Sign(dividend)
Expand Down
2 changes: 1 addition & 1 deletion xml/System/ObjectDisposedException.xml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@

This code produces the following output:

```
```txt
Caught:
Cannot access a closed Stream.
```
Expand Down
4 changes: 2 additions & 2 deletions xml/System/String.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6680,7 +6680,7 @@ In .NET Framework desktop apps, you can use the [\<UseRandomizedStringHashAlgori

When you run the example without supplying a configuration file, it displays output similar to the following. Note that the hash codes for the string are identical in the two application domains.

```
```txt
String 'This is a string.' in domain 'PerDomain.exe': 941BCEAC
String 'This is a string.' in domain 'NewDomain': 941BCEAC
```
Expand All @@ -6698,7 +6698,7 @@ However, if you add the following configuration file to the example's directory

When the configuration file is present, the example displays the following output:

```
```txt
String 'This is a string.' in domain 'PerDomain.exe': 5435776D
String 'This is a string.' in domain 'NewDomain': 75CC8236
```
Expand Down
20 changes: 7 additions & 13 deletions xml/System/TimeZoneInfo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1172,14 +1172,12 @@

Typically, the time zone's standard time name and its identifier are the same. However, the length of the time zone's identifier should not exceed 32 characters. The string passed to the `displayName` parameter follows a fairly standard format. The first portion of the display name is the time zone's base offset from Coordinated Universal Time, which is indicated by the acronym GMT (for Greenwich Mean Time), enclosed in parentheses. This is followed by a string that identifies the time zone itself, or one or more of the cities, regions, or countries in the time zone, or both. For example:

```
```txt
(GMT+02:00) Athens, Beirut, Istanbul, Minsk
(GMT-02:00) Mid-Atlantic
(GMT-07:00) Mountain Time (US & Canada)
```



## Examples
The following example creates a custom time zone for the Mawson and Holme Bay regions of Antarctica. It then displays the result of converting the local time to the time in the new time zone.

Expand Down Expand Up @@ -1293,7 +1291,7 @@

Typically, the time zone's standard time name and its identifier are the same. However, the length of the time zone's identifier should not exceed 32 characters. The string passed to the `displayName` parameter follows a fairly standard format. The first portion of the display name is the time zone's base offset from Coordinated Universal Time, which is indicated by the acronym GMT (for Greenwich Mean Time), enclosed in parentheses. This is followed by a string that identifies the time zone itself, or one or more of the cities, regions, or countries in the time zone, or both. For example:

```
```txt
(GMT+02:00) Athens, Beirut, Istanbul, Minsk
(GMT-02:00) Mid-Atlantic
(GMT-07:00) Mountain Time (US & Canada)
Expand Down Expand Up @@ -1445,24 +1443,22 @@

Typically, the time zone's standard time name and its identifier are the same. However, the length of the time zone's identifier should not exceed 32 characters. The string passed to the `displayName` parameter follows a fairly standard format. The first portion of the display name is the time zone's base offset from Coordinated Universal Time, which is indicated by the acronym GMT (for Greenwich Mean Time), enclosed in parentheses. This is followed by a string that identifies the time zone itself, or one or more of the cities, regions, or countries in the time zone, or both. For example:

```
```txt
(GMT+02:00) Athens, Beirut, Istanbul, Minsk
(GMT-02:00) Mid-Atlantic
(GMT-07:00) Mountain Time (US & Canada)
```

A time zone's adjustment rules are defined by doing the following:

1. Calling either the <xref:System.TimeZoneInfo.TransitionTime.CreateFloatingDateRule%2A> or the <xref:System.TimeZoneInfo.TransitionTime.CreateFixedDateRule%2A> method to define the starting and ending transition rules for each adjustment rule.
1. Calling either the <xref:System.TimeZoneInfo.TransitionTime.CreateFloatingDateRule%2A> or the <xref:System.TimeZoneInfo.TransitionTime.CreateFixedDateRule%2A> method to define the starting and ending transition rules for each adjustment rule.

2. Calling the <xref:System.TimeZoneInfo.AdjustmentRule.CreateAdjustmentRule%2A> method for each adjustment rule.
2. Calling the <xref:System.TimeZoneInfo.AdjustmentRule.CreateAdjustmentRule%2A> method for each adjustment rule.

3. Assigning the adjustment rules to an array that can be passed as the `adjustmentRules` parameter.
3. Assigning the adjustment rules to an array that can be passed as the `adjustmentRules` parameter.

If `disableDaylightSavingTime` parameter is `false`, the operation of this method is identical to the <xref:System.TimeZoneInfo.CreateCustomTimeZone%2A?displayProperty=nameWithType> overload. If `disableDaylightSavingTime` is `true`, the returned object includes no adjustment rules and a <xref:System.TimeZoneInfo.DaylightName%2A> property whose value is an empty string.



## Examples
The following example creates a custom time zone for the Palmer station and Anvers Island in Antarctica. It sets the `disableDaylightSavingTime` parameter in the call to the <xref:System.TimeZoneInfo.CreateCustomTimeZone%2A?displayProperty=nameWithType> method to `true`. It then displays the new time zone's daylight saving time name, if one is present, and the number of adjustment rules to confirm that the new time zone has no daylight saving time information.

Expand Down Expand Up @@ -1621,15 +1617,13 @@

Time zone display names for Windows system time zones follow a fairly standard format. The first portion of the display name is the time zone's base offset from Coordinated Universal Time, which is indicated by the acronym GMT (for Greenwich Mean Time), enclosed in parentheses. For Coordinated Universal Time, the GMT acronym with no offset is enclosed in parentheses. This is followed by a string that identifies the time zone or one or more of the cities, regions, or countries in the time zone. For example:

```
```txt
(GMT) Greenwich Mean Time : Dublin, Edinburgh, Lisbon, London
(GMT+02:00) Athens, Beirut, Istanbul, Minsk
(GMT-02:00) Mid-Atlantic
(GMT-07:00) Mountain Time (US & Canada)
```



## Examples
The following example retrieves a <xref:System.TimeZoneInfo> object that represents the local time zone and outputs its display name, standard time name, and daylight saving time name. The output is displayed for a system in the U.S. Pacific Standard Time zone.

Expand Down
Loading