Skip to content

Commit a614b2e

Browse files
authored
Fixes per UUF feedback (#10326)
1 parent f53f53c commit a614b2e

File tree

13 files changed

+559
-562
lines changed

13 files changed

+559
-562
lines changed

snippets/csharp/System.Diagnostics/ProcessStartInfo/Verb/source.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// <Snippet1>
2-
// <Snippet3>
32
using System;
43
using System.ComponentModel;
54
using System.IO;
@@ -49,14 +48,13 @@ static void Main()
4948
startInfo.Verb = verbToUse;
5049
if (verbToUse.ToLower().IndexOf("printto") >= 0)
5150
{
52-
// printto implies a specific printer. Ask for the network address.
51+
// printto implies a specific printer. Ask for the network address.
5352
// The address must be in the form \\server\printer.
5453
// The printer address is passed as the Arguments property.
5554
Console.Write("Enter the network address of the target printer: ");
5655
var arguments = Console.ReadLine();
5756
startInfo.Arguments = arguments;
5857
}
59-
// </Snippet4>
6058

6159
try
6260
{
@@ -81,6 +79,7 @@ static void Main()
8179
Console.WriteLine($"Unable to start '{fileName}' with verb {verbToUse}");
8280
}
8381
}
82+
// </Snippet4>
8483
}
8584
else
8685
{
@@ -90,5 +89,4 @@ static void Main()
9089
}
9190
}
9291
}
93-
// </Snippet3>
9492
// </Snippet1>

xml/Microsoft.CSharp/CSharpCodeProvider.xml

Lines changed: 68 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -32,22 +32,24 @@
3232
<Docs>
3333
<summary>Provides access to instances of the C# code generator and code compiler.</summary>
3434
<remarks>
35-
<format type="text/markdown"><![CDATA[
36-
37-
## Remarks
38-
This class provides methods that can be used to retrieve instances of the C# <xref:System.CodeDom.Compiler.ICodeGenerator> and <xref:System.CodeDom.Compiler.ICodeCompiler> implementations.
39-
35+
<format type="text/markdown"><![CDATA[
36+
37+
## Remarks
38+
39+
This class provides methods that can be used to retrieve instances of the C# <xref:System.CodeDom.Compiler.ICodeGenerator> and <xref:System.CodeDom.Compiler.ICodeCompiler> implementations.
40+
4041
> [!NOTE]
41-
> This class contains a link demand and an inheritance demand at the class level that applies to all members. A <xref:System.Security.SecurityException> is thrown when either the immediate caller or the derived class does not have full-trust permission.
42-
43-
44-
45-
## Examples
46-
The following example uses either the C# or Visual Basic code provider to compile a source file. The example checks the input file extension and uses the corresponding <xref:Microsoft.CSharp.CSharpCodeProvider> or <xref:Microsoft.VisualBasic.VBCodeProvider> for compilation. The input file is compiled into an executable file, and any compilation errors are displayed to the console.
47-
42+
> This class contains a link demand and an inheritance demand at the class level that applies to all members. A <xref:System.Security.SecurityException> is thrown when either the immediate caller or the derived class does not have full-trust permission.
43+
44+
## Examples
45+
The following example uses either the C# or Visual Basic code provider to compile a source file. The example checks the input file extension and uses the corresponding <xref:Microsoft.CSharp.CSharpCodeProvider> or <xref:Microsoft.VisualBasic.VBCodeProvider> for compilation. The input file is compiled into an executable file, and any compilation errors are displayed to the console.
46+
47+
> [!IMPORTANT]
48+
> The `CompileAssemblyFrom*` methods aren't supported on .NET Core and .NET 5+. This example only runs on .NET Framework.
49+
4850
:::code language="csharp" source="~/snippets/csharp/Microsoft.CSharp/CSharpCodeProvider/Overview/source.cs" id="Snippet1":::
49-
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/CodeDom_CodeProviders/VB/source.vb" id="Snippet1":::
50-
51+
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/CodeDom_CodeProviders/VB/source.vb" id="Snippet1":::
52+
5153
]]></format>
5254
</remarks>
5355
<altmember cref="T:System.CodeDom.Compiler.ICodeGenerator" />
@@ -124,40 +126,40 @@
124126
<param name="providerOptions">A <see cref="T:System.Collections.Generic.IDictionary`2" /> object that contains the provider options.</param>
125127
<summary>Initializes a new instance of the <see cref="T:Microsoft.CSharp.CSharpCodeProvider" /> class by using the specified provider options.</summary>
126128
<remarks>
127-
<format type="text/markdown"><![CDATA[
128-
129-
## Remarks
129+
<format type="text/markdown"><![CDATA[
130+
131+
## Remarks
130132
131-
In .NET Framework apps, you can obtain the value for `providerOptions` from the [\<providerOption>](/dotnet/framework/configure-apps/file-schema/compiler/provideroption-element) element in the configuration file. You can identify the version of the <xref:Microsoft.CSharp.CSharpCodeProvider> you want to use by specifying the `<providerOption>` element, supplying "CompilerVersion" as the option name, and supplying the version number (for example, "v3.5") as the option value. You must precede the version number with a lower case "v". The following configuration file example demonstrates how to specify that version 3.5 of the C# code provider should be used.
132-
133-
```xml
134-
<configuration>
135-
<system.codedom>
136-
<compilers>
137-
<!-- zero or more compiler elements -->
138-
<compiler
139-
language="c#;cs;csharp"
140-
extension=".cs"
141-
type="Microsoft.CSharp.CSharpCodeProvider, System,
142-
Version=2.0.3600.0, Culture=neutral,
143-
PublicKeyToken=b77a5c561934e089"
144-
compilerOptions="/optimize"
145-
warningLevel="1" >
146-
<providerOption
147-
name="CompilerVersion"
148-
value="v3.5" />
149-
</compiler>
150-
</compilers>
151-
</system.codedom>
152-
</configuration>
153-
```
133+
In .NET Framework apps, you can obtain the value for `providerOptions` from the [\<providerOption>](/dotnet/framework/configure-apps/file-schema/compiler/provideroption-element) element in the configuration file. You can identify the version of the <xref:Microsoft.CSharp.CSharpCodeProvider> you want to use by specifying the `<providerOption>` element, supplying "CompilerVersion" as the option name, and supplying the version number (for example, "v3.5") as the option value. You must precede the version number with a lower case "v". The following configuration file example demonstrates how to specify that version 3.5 of the C# code provider should be used.
134+
135+
```xml
136+
<configuration>
137+
<system.codedom>
138+
<compilers>
139+
<!-- zero or more compiler elements -->
140+
<compiler
141+
language="c#;cs;csharp"
142+
extension=".cs"
143+
type="Microsoft.CSharp.CSharpCodeProvider, System,
144+
Version=2.0.3600.0, Culture=neutral,
145+
PublicKeyToken=b77a5c561934e089"
146+
compilerOptions="/optimize"
147+
warningLevel="1" >
148+
<providerOption
149+
name="CompilerVersion"
150+
value="v3.5" />
151+
</compiler>
152+
</compilers>
153+
</system.codedom>
154+
</configuration>
155+
```
154156
155157
## Examples
156158
157-
The following example shows how to specify the compiler version when you create a new instance of the <xref:Microsoft.CSharp.CSharpCodeProvider> class.
158-
159-
:::code language="csharp" source="~/snippets/csharp/Microsoft.CSharp/CSharpCodeProvider/.ctor/program.cs" id="Snippet1":::
160-
159+
The following example shows how to specify the compiler version when you create a new instance of the <xref:Microsoft.CSharp.CSharpCodeProvider> class.
160+
161+
:::code language="csharp" source="~/snippets/csharp/Microsoft.CSharp/CSharpCodeProvider/.ctor/program.cs" id="Snippet1":::
162+
161163
]]></format>
162164
</remarks>
163165
<exception cref="T:System.ArgumentNullException">
@@ -291,11 +293,11 @@ In .NET Framework apps, you can obtain the value for `providerOptions` from the
291293
<summary>Gets the file name extension to use when creating source code files.</summary>
292294
<value>The file name extension to use for generated source code files.</value>
293295
<remarks>
294-
<format type="text/markdown"><![CDATA[
295-
296-
## Remarks
297-
This file name extension is usually the extension used by the language's source code files.
298-
296+
<format type="text/markdown"><![CDATA[
297+
298+
## Remarks
299+
This file name extension is usually the extension used by the language's source code files.
300+
299301
]]></format>
300302
</remarks>
301303
</Docs>
@@ -337,19 +339,19 @@ In .NET Framework apps, you can obtain the value for `providerOptions` from the
337339
<param name="options">The <see cref="T:System.CodeDom.Compiler.CodeGeneratorOptions" /> to use when generating the code.</param>
338340
<summary>Generates code for the specified class member using the specified text writer and code generator options.</summary>
339341
<remarks>
340-
<format type="text/markdown"><![CDATA[
341-
342-
## Remarks
343-
Members are generated differently depending on their context. For example, a method in an interface or a field in an enumeration is generated differently than a method or field on a class. This implementation generates code for a member in the class context.
344-
345-
346-
347-
## Examples
348-
The following code example shows the use of the <xref:Microsoft.CSharp.CSharpCodeProvider.GenerateCodeFromMember%2A> method to create a code fragment to be used in a CodeDOM graph. This code example is part of a larger example provided for the <xref:System.CodeDom.Compiler.CodeDomProvider.GenerateCodeFromMember%2A> method of the <xref:System.CodeDom.Compiler.CodeDomProvider> class.
349-
342+
<format type="text/markdown"><![CDATA[
343+
344+
## Remarks
345+
Members are generated differently depending on their context. For example, a method in an interface or a field in an enumeration is generated differently than a method or field on a class. This implementation generates code for a member in the class context.
346+
347+
348+
349+
## Examples
350+
The following code example shows the use of the <xref:Microsoft.CSharp.CSharpCodeProvider.GenerateCodeFromMember%2A> method to create a code fragment to be used in a CodeDOM graph. This code example is part of a larger example provided for the <xref:System.CodeDom.Compiler.CodeDomProvider.GenerateCodeFromMember%2A> method of the <xref:System.CodeDom.Compiler.CodeDomProvider> class.
351+
350352
:::code language="csharp" source="~/snippets/csharp/Microsoft.CSharp/CSharpCodeProvider/GenerateCodeFromMember/program.cs" id="Snippet3":::
351-
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/CodeDom_GenerateCodeFromMember/vb/module1.vb" id="Snippet3":::
352-
353+
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/CodeDom_GenerateCodeFromMember/vb/module1.vb" id="Snippet3":::
354+
353355
]]></format>
354356
</remarks>
355357
<altmember cref="T:System.CodeDom.CodeTypeMember" />
@@ -392,11 +394,11 @@ In .NET Framework apps, you can obtain the value for `providerOptions` from the
392394
<summary>Gets a <see cref="T:System.ComponentModel.TypeConverter" /> for the specified type of object.</summary>
393395
<returns>A <see cref="T:System.ComponentModel.TypeConverter" /> for the specified type.</returns>
394396
<remarks>
395-
<format type="text/markdown"><![CDATA[
396-
397-
## Remarks
398-
A derived class can override this method to provide specific types of type converters for specific data types.
399-
397+
<format type="text/markdown"><![CDATA[
398+
399+
## Remarks
400+
A derived class can override this method to provide specific types of type converters for specific data types.
401+
400402
]]></format>
401403
</remarks>
402404
</Docs>

xml/Microsoft.Extensions.Caching.Memory/MemoryCacheOptions.xml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -210,9 +210,9 @@
210210
<summary>Gets or sets the maximum size of the cache.</summary>
211211
<value>To be added.</value>
212212
<remarks>
213-
<format type="text/markdown"><![CDATA[
214-
> [!CAUTION]
215-
> There may be transient states while the cache is full but blocks are being released on a background thread. In this state, unexpected behavior might occur if the cache is being overutilized.
213+
<format type="text/markdown"><![CDATA[
214+
> [!CAUTION]
215+
> There might be transient states while the cache is full but blocks are being released on a background thread. In this state, unexpected behavior might occur if the cache is being overutilized.
216216
]]></format>
217217
</remarks>
218218
</Docs>
@@ -238,12 +238,12 @@
238238
<value>
239239
<see langword="true" /> if linked entries are tracked; otherwise, <see langword="false" />. The default is <see langword="false" /> in .NET 7 and later versions.</value>
240240
<remarks>
241-
<format type="text/markdown"><![CDATA[
242-
243-
## Remarks
244-
245-
Prior to .NET 7 this feature was always enabled.
246-
241+
<format type="text/markdown"><![CDATA[
242+
243+
## Remarks
244+
245+
Prior to .NET 7 this feature was always enabled.
246+
247247
]]></format>
248248
</remarks>
249249
</Docs>

0 commit comments

Comments
 (0)