Skip to content

Commit de08662

Browse files
committed
add language slugs
1 parent 5831ac1 commit de08662

File tree

7 files changed

+37
-44
lines changed

7 files changed

+37
-44
lines changed

xml/System.Diagnostics.CodeAnalysis/FeatureSwitchDefinitionAttribute.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ When the app is trimmed with the following feature settings in the project file,
5858
<RuntimeHostConfigurationOption Include="Feature.IsSupported" Value="false" />
5959
</ItemGroup>
6060
```
61+
6162
]]></format>
6263
</example>
6364
</Docs>

xml/System.Diagnostics.Tracing/EventSource.xml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3088,9 +3088,9 @@ public void Info1(string arg1)
30883088
## Remarks
30893089
`eventid` should be greater than 0 or less than 65535 or errors can occur in the operation. If errors do occur, you can get more information about the source of the error by checking the output stream of the debugger, if you have a debugger attached to the process firing events. You can also look for errors reported in the ETW event stream, if you have an ETW listener on the event source where the error occurs.
30903090
3091-
When you implement a method that is identified as an ETW event in an <xref:System.Diagnostics.Tracing.EventSource>-derived class. You must call the base class <xref:System.Diagnostics.Tracing.EventSource.WriteEvent%2A> method passing the <xref:System.Diagnostics.Tracing.EventAttribute.EventId%2A> and the same arguments as the implemented method similar to the following example.
3091+
When you implement a method that's identified as an ETW event in an <xref:System.Diagnostics.Tracing.EventSource>-derived class, you must call the base class <xref:System.Diagnostics.Tracing.EventSource.WriteEvent%2A> method passing the <xref:System.Diagnostics.Tracing.EventAttribute.EventId%2A> and the same arguments as the implemented method similar to the following example.
30923092
3093-
```
3093+
```csharp
30943094
[Event(2, Level = EventLevel.Informational)]
30953095
public void Info1(Int64 arg1, string arg2)
30963096
{
@@ -3697,13 +3697,11 @@ public void Info1(string arg1)
36973697
The following example shows how to add a <xref:System.Diagnostics.Tracing.EventSource.WriteEvent%2A> overload that accepts four arguments. An example would be if you have a logging event that logs a string and 3 integers.
36983698
36993699
```csharp
3700-
37013700
[Event(1)]
37023701
public void LogTime(string tag, int hour, int minute, int second)
37033702
{
37043703
WriteEvent(1, tag, hour, minute, second);
37053704
}
3706-
37073705
```
37083706
37093707
You could do this without calling <xref:System.Diagnostics.Tracing.EventSource.WriteEventCore%2A>, but it would be slower than it needs to be. That is because it uses arrays and reflection to figure out what to do. If you log these at a high rate (> 1000 / sec), it can be worth making a fast helper, as shown in the following example. The method shadows the existing <xref:System.Diagnostics.Tracing.EventSource.WriteEvent%2A>. Thus the original caller code (LogTime) does not actually change, but the C# compiler will use the more specialized version which will be faster.
@@ -3734,10 +3732,9 @@ class AnotherEventSource : EventSource {
37343732
}
37353733
}
37363734
}
3737-
37383735
```
37393736
3740-
These are the expected sizes and data encodings for standard serializable types:
3737+
These are the expected sizes and data encodings for standard serializable types:
37413738
37423739
```csharp
37433740
// bool arg

xml/System.Diagnostics/Debug.xml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1264,13 +1264,11 @@ The following example sets the indent level and emits debugging messages.
12641264
12651265
This example produces the following output:
12661266
1267-
```
1268-
1267+
```txt
12691268
List of errors:
12701269
Error 1: File not found
12711270
Error 2: Directory not found
12721271
End of list of errors
1273-
12741272
```
12751273
12761274
]]></format>
@@ -1338,13 +1336,11 @@ The following example sets the indent level and emits debugging messages.
13381336
13391337
This example produces the following output:
13401338
1341-
```
1342-
1339+
```txt
13431340
List of errors:
13441341
Error 1: File not found
13451342
Error 2: Directory not found
13461343
End of list of errors
1347-
13481344
```
13491345
13501346
]]></format>
@@ -1713,13 +1709,11 @@ The following example sets the indent level and emits debugging messages.
17131709
17141710
This example produces the following output:
17151711
1716-
```
1717-
1712+
```txt
17181713
List of errors:
17191714
Error 1: File not found
17201715
Error 2: Directory not found
17211716
End of list of errors
1722-
17231717
```
17241718
17251719
]]></format>

xml/System.Diagnostics/EventLog.xml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -696,7 +696,7 @@
696696
697697
The example uses the following message text file, built into the resource library EventLogMsgs.dll. A message text file is the source from which the message resource file is created. The message text file defines the resource identifiers and text for the category, event message, and parameter insertion strings. Specifically, resource identifier 5001 is defined for the localized name of the event log.
698698
699-
```
699+
```txt
700700
; // EventLogMsgs.mc
701701
; // ********************************************************
702702
@@ -2513,15 +2513,15 @@ SVC_UPDATE.EXE
25132513
<summary>This property is deprecated.</summary>
25142514
<value>To be added.</value>
25152515
<remarks>
2516-
<format type="text/markdown"><![CDATA[
2517-
2518-
## Remarks
2516+
<format type="text/markdown"><![CDATA[
2517+
2518+
## Remarks
25192519
25202520
> [!IMPORTANT]
25212521
> Support for the <xref:System.Diagnostics.EventLog.MinimumRetentionDays%2A> property was removed in Windows Vista and later operating systems. Setting this value can cause the Event Log to never overwrite events, and to drop all events to the channel once it is full.
2522-
2523-
## Examples
2524-
The following example enumerates the event logs defined on the local computer, and displays configuration details for each event log.
2522+
2523+
## Examples
2524+
The following example enumerates the event logs defined on the local computer, and displays configuration details for each event log.
25252525
25262526
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/EventLogProperties/CPP/source.cpp" id="Snippet2":::
25272527
:::code language="csharp" source="~/snippets/csharp/System.Diagnostics/EventLog/GetEventLogs/source1.cs" id="Snippet2":::
@@ -2587,11 +2587,11 @@ SVC_UPDATE.EXE
25872587
The <xref:System.Diagnostics.EventLog.ModifyOverflowPolicy%2A> method configures the overflow behavior of an event log. <xref:System.Diagnostics.EventLog> instance. After calling this method for the event log specified by the <xref:System.Diagnostics.EventLog.Log%2A> property, the <xref:System.Diagnostics.EventLog.OverflowAction%2A> and <xref:System.Diagnostics.EventLog.MinimumRetentionDays%2A> property values reflect the newly configured overflow behavior.
25882588
25892589
> [!NOTE]
2590-
> This property represents a configuration setting for the event log represented by this instance. When the event log reaches its maximum size, this property specifies how the operating system handles new entries written by all event sources registered for the event log.
2591-
2592-
Set the `action` parameter to <xref:System.Diagnostics.OverflowAction.OverwriteAsNeeded> to indicate that a new entry overwrites the oldest entry when the <xref:System.Diagnostics.EventLog> reaches its maximum size. If the `action` parameter is set to <xref:System.Diagnostics.OverflowAction.OverwriteAsNeeded>, the `retentionDays` parameter value is ignored.
2590+
> This property represents a configuration setting for the event log represented by this instance. When the event log reaches its maximum size, this property specifies how the operating system handles new entries written by all event sources registered for the event log.
25932591
2594-
Set the `action` parameter to <xref:System.Diagnostics.OverflowAction.DoNotOverwrite> to discard new events when the maximum log size is reached. If the `action` parameter is set to <xref:System.Diagnostics.OverflowAction.DoNotOverwrite>, the `retentionDays` parameter value is ignored.
2592+
Set the `action` parameter to <xref:System.Diagnostics.OverflowAction.OverwriteAsNeeded> to indicate that a new entry overwrites the oldest entry when the <xref:System.Diagnostics.EventLog> reaches its maximum size. If the `action` parameter is set to <xref:System.Diagnostics.OverflowAction.OverwriteAsNeeded>, the `retentionDays` parameter value is ignored.
2593+
2594+
Set the `action` parameter to <xref:System.Diagnostics.OverflowAction.DoNotOverwrite> to discard new events when the maximum log size is reached. If the `action` parameter is set to <xref:System.Diagnostics.OverflowAction.DoNotOverwrite>, the `retentionDays` parameter value is ignored.
25952595
25962596
> [!WARNING]
25972597
> Never set the `action` parameter to <xref:System.Diagnostics.OverflowAction.OverwriteOlder>. This value is deprecated and might cause the log to behave as if the `DoNotOverwrite` parameter was passed instead.
@@ -2756,7 +2756,7 @@ SVC_UPDATE.EXE
27562756
27572757
The example uses the following message text file, built into the resource library EventLogMsgs.dll. A message text file is the source from which the message resource file is created. The message text file defines the resource identifiers and text for the category, event message, and parameter insertion strings. Specifically, resource identifier 5001 is defined for the localized name of the event log.
27582758
2759-
```
2759+
```txt
27602760
; // EventLogMsgs.mc
27612761
; // ********************************************************
27622762
@@ -4446,7 +4446,7 @@ SVC_UPDATE.EXE
44464446
44474447
The example uses the following message text file, built into the resource library EventLogMsgs.dll. A message text file is the source from which the message resource file is created. The message text file defines the resource identifiers and text for the category, event message, and parameter insertion strings.
44484448
4449-
```
4449+
```txt
44504450
; // EventLogMsgs.mc
44514451
; // ********************************************************
44524452
@@ -4679,7 +4679,7 @@ SVC_UPDATE.EXE
46794679
46804680
The example uses the following message text file, built into the resource library EventLogMsgs.dll. A message text file is the source from which the message resource file is created. The message text file defines the resource identifiers and text for the category, event message, and parameter insertion strings.
46814681
4682-
```
4682+
```txt
46834683
; // EventLogMsgs.mc
46844684
; // ********************************************************
46854685
@@ -4898,7 +4898,7 @@ SVC_UPDATE.EXE
48984898
48994899
The example uses the following message text file, built into the resource library EventLogMsgs.dll. A message text file is the source from which the message resource file is created. The message text file defines the resource identifiers and text for the category, event message, and parameter insertion strings.
49004900
4901-
```
4901+
```txt
49024902
; // EventLogMsgs.mc
49034903
; // ********************************************************
49044904
@@ -5117,7 +5117,7 @@ SVC_UPDATE.EXE
51175117
51185118
The example uses the following message text file, built into the resource library EventLogMsgs.dll. A message text file is the source from which the message resource file is created. The message text file defines the resource identifiers and text for the category, event message, and parameter insertion strings.
51195119
5120-
```
5120+
```txt
51215121
; // EventLogMsgs.mc
51225122
; // ********************************************************
51235123

xml/System.Diagnostics/EventLogInstaller.xml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@
131131
132132
The code example uses the following message text file, built into the resource library EventLogMsgs.dll. A message text file is the source from which the message resource file is created. The message text file defines the resource identifiers and text for the category, event message, and parameter insertion strings.
133133
134-
```
134+
```txt
135135
; // EventLogMsgs.mc
136136
; // ********************************************************
137137
@@ -311,7 +311,7 @@ SVC_UPDATE.EXE
311311
312312
The code example uses the following message text file, built into the resource library EventLogMsgs.dll. A message text file is the source from which the message resource file is created. The message text file defines the resource identifiers and text for the category, event message, and parameter insertion strings.
313313
314-
```
314+
```txt
315315
; // EventLogMsgs.mc
316316
; // ********************************************************
317317
@@ -670,7 +670,7 @@ SVC_UPDATE.EXE
670670
671671
The code example uses the following message text file, built into the resource library EventLogMsgs.dll. A message text file is the source from which the message resource file is created. The message text file defines the resource identifiers and text for the category, event message, and parameter insertion strings.
672672
673-
```
673+
```txt
674674
; // EventLogMsgs.mc
675675
; // ********************************************************
676676
@@ -835,8 +835,7 @@ SVC_UPDATE.EXE
835835
836836
For example, the following section of a message text file defines a string with a parameter placeholder:
837837
838-
```
839-
838+
```txt
840839
MessageId = 1501
841840
Severity = Success
842841
Facility = Application
@@ -848,7 +847,7 @@ Component %%6050 is starting.
848847
849848
Within the parameter resource file, the insertion string must be defined with the resource identifier that corresponds to the placeholder, as shown below:
850849
851-
```
850+
```txt
852851
MessageId = 6050
853852
Severity = Success
854853
Facility = Application
@@ -875,7 +874,7 @@ TRIGGER.EXE
875874
876875
The code example uses the following message text file, built into the resource library EventLogMsgs.dll. A message text file is the source from which the message resource file is created. The message text file defines the resource identifiers and text for the category, event message, and parameter insertion strings. Specifically, the message defined for resource identifier 1004 uses a placeholder for a parameter string defined for resource identifier 5002.
877876
878-
```
877+
```txt
879878
; // EventLogMsgs.mc
880879
; // ********************************************************
881880

xml/System.Diagnostics/ProcessStartInfo.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,7 @@ var info = new System.Diagnostics.ProcessStartInfo("cmd.exe")
338338
Arguments = "/c dir \"C:\\Program Files\\dotnet\""
339339
};
340340
```
341+
341342
```vb
342343
Dim info As New System.Diagnostics.ProcessStartInfo("cmd.exe")
343344
info.ArgumentList.Add("/c")
@@ -347,6 +348,7 @@ info.ArgumentList.Add("C:\Program Files\dotnet")
347348
' The corresponding assignment to the Arguments property is:
348349
info.Arguments = "/c dir ""C:\Program Files\dotnet"""
349350
```
351+
350352
]]></format>
351353
</remarks>
352354
</Docs>

xml/System.Diagnostics/XmlWriterTraceListener.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -300,9 +300,9 @@ You can create an <xref:System.Diagnostics.XmlWriterTraceListener> in your code.
300300
## Remarks
301301
This constructor initializes the <xref:System.Diagnostics.TraceListener.Name%2A> property to the `name` parameter value or to an empty string ("") if the `name` parameter is `null`. The name can be used as an index into the <xref:System.Diagnostics.Trace.Listeners%2A?displayProperty=nameWithType> collection to programmatically change the properties for the listener. For example, the following code sets the <xref:System.Diagnostics.TraceListener.TraceOutputOptions%2A> property for an instance of <xref:System.Diagnostics.XmlWriterTraceListener> whose <xref:System.Diagnostics.TraceListener.Name%2A> property is "xmlListener".
302302
303-
```
303+
```csharp
304304
((XmlWriterTraceListener)Trace.Listeners["xmlListener"]).TraceOutputOptions =
305-
TraceOptions.Timestamp
305+
TraceOptions.Timestamp;
306306
```
307307
308308
]]></format>
@@ -357,9 +357,9 @@ You can create an <xref:System.Diagnostics.XmlWriterTraceListener> in your code.
357357
## Remarks
358358
This constructor initializes the <xref:System.Diagnostics.TraceListener.Name%2A> property to the `name` parameter value or to an empty string ("") if the `name` parameter is `null`. The name can be used as an index into the <xref:System.Diagnostics.Trace.Listeners%2A?displayProperty=nameWithType> collection to programmatically change the properties for the listener. For example, the following code sets the <xref:System.Diagnostics.TraceListener.TraceOutputOptions%2A> property for an instance of <xref:System.Diagnostics.XmlWriterTraceListener> whose <xref:System.Diagnostics.TraceListener.Name%2A> property is "xmlListener".
359359
360-
```
360+
```csharp
361361
((XmlWriterTraceListener)Trace.Listeners["xmlListener"]).TraceOutputOptions =
362-
TraceOptions.Timestamp.
362+
TraceOptions.Timestamp;
363363
```
364364
365365
]]></format>
@@ -412,9 +412,9 @@ You can create an <xref:System.Diagnostics.XmlWriterTraceListener> in your code.
412412
413413
The <xref:System.Diagnostics.TraceListener.Name%2A> property is set to the `name` parameter value or to an empty string ("") if the `name` parameter is `null`. The name can be used as an index into the <xref:System.Diagnostics.Trace.Listeners%2A?displayProperty=nameWithType> collection to programmatically change the properties for the listener. For example, the following code sets the <xref:System.Diagnostics.TraceListener.TraceOutputOptions%2A> property for an instance of <xref:System.Diagnostics.XmlWriterTraceListener> whose <xref:System.Diagnostics.TraceListener.Name%2A> property is "xmlListener".
414414
415-
```
415+
```csharp
416416
((XmlWriterTraceListener)Trace.Listeners["xmlListener"]).TraceOutputOptions =
417-
TraceOptions.Timestamp.
417+
TraceOptions.Timestamp;
418418
```
419419
420420
]]></format>

0 commit comments

Comments
 (0)