Skip to content

Commit 830bb9c

Browse files
authored
add language slugs (#11222)
1 parent e23d7f8 commit 830bb9c

File tree

11 files changed

+30
-60
lines changed

11 files changed

+30
-60
lines changed

xml/System.DirectoryServices.AccountManagement/AdvancedFilters.xml

-7
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@
111111
## Examples
112112
113113
```csharp
114-
115114
// Create the principal context for the usr object.
116115
PrincipalContext ctx = new PrincipalContext(ContextType.Domain, "fabrikam.com", "CN=Users,DC=fabrikam,DC=com", "administrator", "SecurelyStoredPassword");
117116
@@ -175,7 +174,6 @@ foreach (UserPrincipal u in results)
175174
## Examples
176175
177176
```csharp
178-
179177
// Create the principal context for the usr object.
180178
PrincipalContext ctx = new PrincipalContext(ContextType.Domain, "fabrikam.com", "CN=Users,DC=fabrikam,DC=com", "administrator", "SecurelyStoredPassword");
181179
@@ -245,7 +243,6 @@ foreach (UserPrincipal u in results)
245243
In an extended class, you might implement an advanced search filter for `LogonCount`:
246244
247245
```csharp
248-
249246
public class InetOrgPersonSearchFilter : AdvancedFilters
250247
{
251248
public InetOrgPersonSearchFilter(Principal p) : base(p) { }
@@ -293,7 +290,6 @@ public class InetOrgPersonSearchFilter : AdvancedFilters
293290
## Examples
294291
295292
```csharp
296-
297293
// Create the principal context for the usr object.
298294
PrincipalContext ctx = new PrincipalContext(ContextType.Domain, "fabrikam.com", "CN=Users,DC=fabrikam,DC=com", "administrator", "SecurelyStoredPassword");
299295
@@ -355,7 +351,6 @@ foreach (UserPrincipal u in results)
355351
## Examples
356352
357353
```csharp
358-
359354
// Create the principal context for the usr object.
360355
PrincipalContext ctx = new PrincipalContext(ContextType.Domain, "fabrikam.com", "CN=Users,DC=fabrikam,DC=com", "administrator", "SecurelyStoredPassword");
361356
@@ -419,7 +414,6 @@ foreach (UserPrincipal u in results)
419414
## Examples
420415
421416
```csharp
422-
423417
// Create the principal context for the usr object.
424418
PrincipalContext ctx = new PrincipalContext(ContextType.Domain, "fabrikam.com", "CN=Users,DC=fabrikam,DC=com", "administrator", "SecurelyStoredPassword");
425419
@@ -481,7 +475,6 @@ foreach (UserPrincipal u in results)
481475
## Examples
482476
483477
```csharp
484-
485478
// Create the principal context for the usr object.
486479
PrincipalContext ctx = new PrincipalContext(ContextType.Domain, "fabrikam.com", "CN=Users,DC=fabrikam,DC=com", "administrator", "SecurelyStoredPassword");
487480

xml/System.DirectoryServices.AccountManagement/AuthenticablePrincipal.xml

+3-4
Original file line numberDiff line numberDiff line change
@@ -729,7 +729,7 @@
729729
730730
A search is performed for all authenticable principals under the container "DC=adamApp1,DC=fabrikam,DC=com" that have not logged on to this ADAM instance for the last 45 days. The principals returned by the search are then deleted.
731731
732-
```
732+
```csharp
733733
PrincipalContext ctx = new PrincipalContext(
734734
ContextType.ApplicationDirectory,
735735
"adamHost1.fabrikam.com:5000",
@@ -748,7 +748,6 @@ foreach (Principal p in oldPrincipals)
748748
749749
oldPrincipals.Dispose();
750750
ctx.Dispose();
751-
752751
```
753752
754753
]]></format>
@@ -1280,9 +1279,9 @@ ctx.Dispose();
12801279
## Examples
12811280
The following example code connects to the LDAP domain "fabrikam.com" with the username (administrator) and password (SecretPwd123) initialized in the <xref:System.DirectoryServices.AccountManagement.PrincipalContext> constructor.
12821281
1283-
A search is performed to find the user with name "John Smith" under the container specified in the <xref:System.DirectoryServices.AccountManagement.PrincipalContext> constructor: "CN=Users,DC=fabrikam,DC=com." If the user is found, a check is performed to determine whether this user's account has been locked out. If the account has been locked out, the code example unlocks the account.
1282+
A search is performed to find the user with name "John Smith" under the container specified in the <xref:System.DirectoryServices.AccountManagement.PrincipalContext> constructor: "CN=Users,DC=fabrikam,DC=com." If the user is found, a check is performed to determine whether this user's account has been locked out. If the account has been locked out, the code example unlocks the account.
12841283
1285-
```
1284+
```csharp
12861285
PrincipalContext ctx = new PrincipalContext(ContextType.Domain,
12871286
"fabrikam.com",
12881287
"CN=Users,DC=fabrikam,DC=com",

xml/System.DirectoryServices/DirectoryEntry.xml

-1
Original file line numberDiff line numberDiff line change
@@ -2069,7 +2069,6 @@ if (string.Compare(mySchemaEntry.Name,"container") == 0)
20692069
foreach(DirectoryEntry myChildDirectoryEntry in myDirectoryEntry.Children)
20702070
Console.WriteLine(myChildDirectoryEntry.Path);
20712071
}
2072-
20732072
```
20742073
20752074
```cpp

xml/System.EnterpriseServices/ServicedComponent.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
5353
To deploy this class as a configured COM component, you must generate a strong key, compile the class as a library, and register the library. These three steps are accomplished by the following three commands.
5454
55-
```
55+
```console
5656
sn -k Calculator.snk
5757
csc /t:library Calculator.cs
5858
regsvcs Calculator.dll

xml/System.Messaging/DefaultPropertiesToSend.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
7373
There are two ways to define a queue's default properties to send, as shown in the following C# code. You can set values for this instance of <xref:System.Messaging.DefaultPropertiesToSend> and associate it with the queue's <xref:System.Messaging.MessageQueue.DefaultPropertiesToSend%2A?displayProperty=nameWithType> property:
7474
75-
```
75+
```csharp
7676
DefaultPropertiesToSend myDefaultProperties = new DefaultPropertiesToSend();
7777
// Set default values for the properties.
7878
myDefaultProperties.Label = "myLabel";
@@ -84,7 +84,7 @@ DefaultPropertiesToSend myDefaultProperties = new DefaultPropertiesToSend();
8484
8585
Or, you can individually assign values to the <xref:System.Messaging.MessageQueue> instance's <xref:System.Messaging.MessageQueue.DefaultPropertiesToSend%2A> property directly:
8686
87-
```
87+
```csharp
8888
myMessageQueue.DefaultPropertiesToSend.Label = "myLabel";
8989
myMessageQueue.DefaultPropertiesToSend.Recoverable = false;
9090
...

xml/System.Messaging/Message.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1040,7 +1040,7 @@
10401040
10411041
Other formatters can provide binding functionality also, as shown in the following C# code.
10421042
1043-
```
1043+
```csharp
10441044
message.Formatter = new ActiveXMessageFormatter();
10451045
object myObject message.Body;
10461046
if (myObject is string) {

xml/System.Messaging/MessageQueue.xml

+2-7
Original file line numberDiff line numberDiff line change
@@ -4117,13 +4117,8 @@ The name of the computer is not valid, possibly because the syntax is incorrect.
41174117
<ReturnType>System.String</ReturnType>
41184118
</ReturnValue>
41194119
<Docs>
4120-
<summary>Introduced in MSMQ 3.0. Gets or sets the multicast address associated with the queue.</summary>
4121-
<value>A <see cref="T:System.String" /> that contains a valid multicast address (in the form shown below) or <see langword="null" />, which indicates that the queue is not associated with a multicast address.
4122-
4123-
```
4124-
&lt;address&gt;:&lt;port&gt;
4125-
```
4126-
</value>
4120+
<summary>Gets or sets the multicast address associated with the queue.</summary>
4121+
<value>A valid multicast address (in the form &lt;address&gt;:&lt;port&gt;) or <see langword="null" />, which indicates that the queue is not associated with a multicast address.</value>
41274122
<remarks>
41284123
<format type="text/markdown"><![CDATA[
41294124

xml/System.Resources.Tools/StronglyTypedResourceBuilder.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@
295295
## Remarks
296296
This overload enables you to use the `resourcesNamespace` parameter to specify the namespace for the generated resources. In this case, the generated code appears as follows:
297297
298-
```
298+
```csharp
299299
System.Resources.ResourceManager rm = new System.Resources.ResourceManager("<resourceNamespace>.<baseName>",typeof(baseName).Assembly);
300300
```
301301

xml/System.Resources/ResXResourceReader.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -988,7 +988,7 @@
988988
989989
The resource XML file used by the example contains one data node and one metadata node. To use the XML file with the previous example, copy the following text and save it to a file named Resource1.resx.
990990
991-
```
991+
```xml
992992
<?xml version="1.0" encoding="utf-8"?>
993993
<root>
994994
<resheader name="resmimetype">

xml/System.Resources/ResourceManager.xml

+7-16
Original file line numberDiff line numberDiff line change
@@ -893,10 +893,9 @@
893893
894894
895895
## Examples
896-
The following example calls the <xref:System.Resources.ResourceManager.GetResourceSet%2A> method to retrieve culture-specific resources for the French (France) culture. It then enumerates all of the resources in the resource set. It contains the source code for an executable named ShowNumbers.exe. It also includes the following two text file that contain the names of numbers. The first, NumberResources.txt, contains the names of numbers from one to ten in the English language:
897-
898-
```
896+
The following example calls the <xref:System.Resources.ResourceManager.GetResourceSet%2A> method to retrieve culture-specific resources for the French (France) culture. It then enumerates all of the resources in the resource set. It contains the source code for an executable named ShowNumbers.exe. The example includes two text files that contain the names of numbers. The first, NumberResources.txt, contains the names of numbers from one to ten in the English language:
899897
898+
```txt
900899
one=one
901900
two=two
902901
three=three
@@ -907,24 +906,20 @@ seven=seven
907906
eight=eight
908907
nine=nine
909908
ten=ten
910-
911909
```
912910
913911
The second, NumberResources.fr-FR.txt, contains the names of numbers from one to four in the French language:
914912
915-
```
916-
913+
```txt
917914
one=un
918915
two=deux
919916
three=trois
920917
four=quatre
921-
922918
```
923919
924920
You can use a batch file to generate the resource files, embed the English language resource file into the executable, and create a satellite assembly for the French language resources. Here's the batch file to generate an executable by using the Visual Basic compiler:
925921
926-
```
927-
922+
```bat
928923
resgen NumberResources.txt
929924
vbc shownumbers.vb /resource:NumberResources.resources
930925
@@ -935,21 +930,19 @@ al /out:fr-FR\ShowNumbers.resources.dll /culture:fr-FR /embed:NumberResources.fr
935930
936931
For the C# compiler, you can use the following batch file:
937932
938-
```
939-
933+
```bat
940934
resgen NumberResources.txt
941935
csc shownumbers.cs /resource:NumberResources.resources
942936
943937
md fr-FR
944938
resgen NumberResources.fr-FR.txt
945939
al /out:fr-FR\ShowNumbers.resources.dll /culture:fr-FR /embed:NumberResources.fr-FR.resources
946-
947940
```
948941
949942
:::code language="csharp" source="~/snippets/csharp/System.Resources/ResourceManager/GetResourceSet/shownumbers.cs" id="Snippet1":::
950943
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.resources.resourcemanager.getresourceset/vb/shownumbers.vb" id="Snippet1":::
951944
952-
Note that if you change the value of the `createIfNotExists` argument to `false`, the method call returns `null`, since Resource Manager has not already loaded the French language resources.
945+
If you change the value of the `createIfNotExists` argument to `false`, the method call returns `null`, since Resource Manager hasn't yet loaded the French language resources.
953946
954947
]]></format>
955948
</remarks>
@@ -1128,15 +1121,13 @@ al /out:fr-FR\ShowNumbers.resources.dll /culture:fr-FR /embed:NumberResources.fr
11281121
11291122
You can use the following batch file to build the C# example. For Visual Basic, change `csc` to `vbc`, and change the extension of the source code file from `.cs` to `.vb`.
11301123
1131-
```
1132-
1124+
```bat
11331125
csc CreateResources.cs
11341126
CreateResources
11351127
11361128
resgen AppResources.resx
11371129
11381130
csc GetStream.cs /resource:AppResources.resources
1139-
11401131
```
11411132
11421133
]]></format>

xml/System.Resources/ResourceReader.xml

+12-19
Original file line numberDiff line numberDiff line change
@@ -174,10 +174,10 @@
174174
[!INCLUDE [untrusted-data-instance-note](~/includes/untrusted-data-instance-note.md)]
175175
176176
## Examples
177-
The example in this section uses the following .txt file named `PatientForm.txt` to define the resources used by an application.
178177
179-
```
178+
The example in this section uses the following .txt file named `PatientForm.txt` to define the resources used by an application.
180179
180+
```txt
181181
Title="Top Pet Animal Clinic"
182182
Label1="Patient Number:"
183183
Label2="Pet Name:"
@@ -190,25 +190,24 @@ Label8="Address:"
190190
Label9="Home Phone:"
191191
Label10="Work Phone:"
192192
Label11="Mobile Phone:"
193-
194193
```
195194
196195
You can compile the .txt file into a .resources file by issuing the following command:
197196
198-
**resgen PatientForm.txt**
197+
`resgen PatientForm.txt`
199198
200199
The following example assumes that the resource file is embedded in the assembly that contains the application's executable code. It retrieves a resource file named `PatientForm.resources` from the currently executing assemblies and displays the name and value of each of its resources.
201200
202201
:::code language="csharp" source="~/snippets/csharp/System.Resources/ResourceReader/.ctor/stream1.cs" id="Snippet1":::
203202
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.resources.resourcereader.ctor/vb/stream1.vb" id="Snippet1":::
204203
205-
If the C# example is named `Example.cs`, you can compile it by using the following command:
204+
If the C# example is named `Example.cs`, you can compile it by using the following command:
206205
207-
**csc Example.cs /res:PatientForm.resources**
206+
`csc Example.cs /res:PatientForm.resources`
208207
209-
If the Visual Basic example is named `Example.vb`, you can compile it by using the following command:
208+
If the Visual Basic example is named `Example.vb`, you can compile it by using the following command:
210209
211-
**vbc Example.vb /res:PatientForm.resources**
210+
`vbc Example.vb /res:PatientForm.resources`
212211
213212
]]></format>
214213
</remarks>
@@ -279,8 +278,7 @@ Label11="Mobile Phone:"
279278
## Examples
280279
The example in this section uses the following .txt file named `PatientForm.txt` to define the resources used by an application.
281280
282-
```
283-
281+
```txt
284282
Title="Top Pet Animal Clinic"
285283
Label1="Patient Number:"
286284
Label2="Pet Name:"
@@ -293,12 +291,11 @@ Label8="Address:"
293291
Label9="Home Phone:"
294292
Label10="Work Phone:"
295293
Label11="Mobile Phone:"
296-
297294
```
298295
299296
You can compile this .txt file into a .resources file by issuing the following command:
300297
301-
**resgen PatientForm.txt**
298+
`resgen PatientForm.txt`
302299
303300
The following example enumerates the resources in `PatientForm.resources` and displays the name and value of each.
304301
@@ -514,15 +511,12 @@ Label11="Mobile Phone:"
514511
You can handle the exception by calling the <xref:System.Resources.ResourceReader.GetResourceData%2A> method to retrieve information about the data type and the byte array assigned to the named resource. For more information, see the "Retrieving Resources by Name with GetResourceData" section in the <xref:System.Resources.ResourceReader> class topic.
515512
516513
> [!IMPORTANT]
517-
> The <xref:System.Resources.ResourceReader> class includes two methods that return enumerators. The <xref:System.Resources.ResourceReader.GetEnumerator%2A> method returns an <xref:System.Collections.IDictionaryEnumerator> interface object and is the recommended method to call when enumerating resources.
518-
519-
514+
> The <xref:System.Resources.ResourceReader> class includes two methods that return enumerators. The <xref:System.Resources.ResourceReader.GetEnumerator%2A> method returns an <xref:System.Collections.IDictionaryEnumerator> interface object and is the recommended method to call when enumerating resources.
520515
521516
## Examples
522517
The example in this section uses the following .txt file named `PatientForm.txt` to define the resources used by an application.
523518
524-
```
525-
519+
```txt
526520
Title="Top Pet Animal Clinic"
527521
Label1="Patient Number:"
528522
Label2="Pet Name:"
@@ -535,12 +529,11 @@ Label8="Address:"
535529
Label9="Home Phone:"
536530
Label10="Work Phone:"
537531
Label11="Mobile Phone:"
538-
539532
```
540533
541534
You can compile the .txt file into a .resources file by issuing the following command:
542535
543-
**resgen PatientForm.txt**
536+
`resgen PatientForm.txt`
544537
545538
The following example enumerates the resources in `PatientForm.resources` and displays the name and value of each.
546539

0 commit comments

Comments
 (0)