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

Lines changed: 0 additions & 7 deletions
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

Lines changed: 3 additions & 4 deletions
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

Lines changed: 0 additions & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 2 additions & 7 deletions
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 7 additions & 16 deletions
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>

0 commit comments

Comments
 (0)