Skip to content

Commit a2dace3

Browse files
authored
Merge pull request #12638 from dotnet/main
Merge main into live
2 parents 012f845 + 583c474 commit a2dace3

117 files changed

Lines changed: 428 additions & 1060 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/policies/disallow-edits.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ configuration:
7070
- filesMatchPattern:
7171
matchAny: true
7272
pattern: xml/System.Text.RegularExpressions/*
73+
- filesMatchPattern:
74+
matchAny: true
75+
pattern: xml/System.Threading.RateLimiting/*
7376
then:
7477
- addReply:
7578
reply: >-

docfx.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@
175175
"api/System.Numerics.Tensors.**": false,
176176
"api/System.Reflection.Context.**": false,
177177
"api/System.Text.RegularExpressions.**": false,
178+
"api/System.Threading.RateLimiting.**": false,
178179

179180
"api/System.Diagnostics.FileVersionInfo.yml": false,
180181
"api/System.Linq.AsyncEnumerable.yml": false,

xml/Microsoft.CSharp/CSharpCodeProvider.xml

Lines changed: 1 addition & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -40,18 +40,6 @@
4040
4141
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.
4242
43-
> [!NOTE]
44-
> 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.
45-
46-
## Examples
47-
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.
48-
49-
> [!IMPORTANT]
50-
> The `CompileAssemblyFrom*` methods aren't supported on .NET Core and .NET 5+. This example only runs on .NET Framework.
51-
52-
:::code language="csharp" source="~/snippets/csharp/Microsoft.CSharp/CSharpCodeProvider/Overview/source.cs" id="Snippet1":::
53-
:::code language="vb" source="~/snippets/visualbasic/Microsoft.CSharp/CSharpCodeProvider/Overview/source.vb" id="Snippet1":::
54-
5543
]]></format>
5644
</remarks>
5745
<altmember cref="T:System.CodeDom.Compiler.ICodeGenerator" />
@@ -134,32 +122,6 @@ This class provides methods that can be used to retrieve instances of the C# <xr
134122
<remarks>
135123
<format type="text/markdown"><![CDATA[
136124
137-
## Remarks
138-
139-
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.
140-
141-
```xml
142-
<configuration>
143-
<system.codedom>
144-
<compilers>
145-
<!-- zero or more compiler elements -->
146-
<compiler
147-
language="c#;cs;csharp"
148-
extension=".cs"
149-
type="Microsoft.CSharp.CSharpCodeProvider, System,
150-
Version=2.0.3600.0, Culture=neutral,
151-
PublicKeyToken=b77a5c561934e089"
152-
compilerOptions="/optimize"
153-
warningLevel="1" >
154-
<providerOption
155-
name="CompilerVersion"
156-
value="v3.5" />
157-
</compiler>
158-
</compilers>
159-
</system.codedom>
160-
</configuration>
161-
```
162-
163125
## Examples
164126
165127
The following example shows how to specify the compiler version when you create a new instance of the <xref:Microsoft.CSharp.CSharpCodeProvider> class.
@@ -172,10 +134,7 @@ In .NET Framework apps, you can obtain the value for `providerOptions` from the
172134
<paramref name="providerOptions" /> is <see langword="null" />.</exception>
173135
<altmember cref="T:System.CodeDom.Compiler.CompilerInfo" />
174136
<altmember cref="T:System.CodeDom.Compiler.CodeDomProvider" />
175-
<related type="Article" href="/dotnet/framework/configure-apps/file-schema/">Configuration file schema for the .NET Framework</related>
176-
<related type="Article" href="/dotnet/framework/configure-apps/file-schema/compiler/compilers-element">&lt;compilers&gt; Element</related>
177137
<related type="Article" href="/dotnet/fundamentals/reflection/specifying-fully-qualified-type-names">Specifying Fully Qualified Type Names</related>
178-
<related type="Article" href="/dotnet/framework/configure-apps/file-schema/compiler/provideroption-element">&lt;provideroption&gt; Element</related>
179138
</Docs>
180139
</Member>
181140
<Member MemberName="CreateCompiler">
@@ -358,10 +317,8 @@ In .NET Framework apps, you can obtain the value for `providerOptions` from the
358317
## Remarks
359318
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.
360319
361-
362-
363320
## Examples
364-
The following code example shows the use of the <xref:Microsoft.CSharp.CSharpCodeProvider.GenerateCodeFromMember*> 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*> method of the <xref:System.CodeDom.Compiler.CodeDomProvider> class.
321+
The following code example shows the use of the <xref:Microsoft.CSharp.CSharpCodeProvider.GenerateCodeFromMember*> method to create a code fragment to be used in a CodeDOM graph.
365322
366323
:::code language="csharp" source="~/snippets/csharp/Microsoft.CSharp/CSharpCodeProvider/GenerateCodeFromMember/program.cs" id="Snippet3":::
367324
:::code language="vb" source="~/snippets/visualbasic/Microsoft.CSharp/CSharpCodeProvider/GenerateCodeFromMember/module1.vb" id="Snippet3":::

xml/Microsoft.Win32.SafeHandles/SafeHandleMinusOneIsInvalid.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
This class derives from the <xref:System.Runtime.InteropServices.SafeHandle?displayProperty=nameWithType> class. It describes the format of an invalid handle that uses a value of -1. Further derivations of this class (for example, file or registry handles) can specialize this further. See the <xref:Microsoft.Win32.SafeHandles.SafeFileHandle> class for an example of a class that derives from <xref:Microsoft.Win32.SafeHandles.SafeHandleMinusOneIsInvalid>.
5858
5959
> [!WARNING]
60-
> This type implements the <xref:System.IDisposable> interface. When you have finished using the type, you should dispose of it either directly or indirectly. To dispose of the type directly, call its <xref:System.IDisposable.Dispose*> method in a `try`-`catch` block. To dispose of it indirectly, use a language construct such as `using` (in C#) or `Using` (in Visual Basic). For more information, see the "Using an Object that Implements IDisposable" section in the <xref:System.IDisposable> interface topic.
60+
> This type implements the <xref:System.IDisposable> interface. When you have finished using the type, you should dispose of it either directly or indirectly. To dispose of the type directly, call its <xref:System.IDisposable.Dispose*> method in a `try`-`catch` block. To dispose of it indirectly, use a language construct such as `using` in C#.
6161
6262
]]></format>
6363
</remarks>

xml/Microsoft.Win32/FileDialog.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -813,7 +813,7 @@ Open and save file dialog boxes have a **Favorite Links** panel on the left side
813813
<format type="text/markdown"><![CDATA[
814814
815815
## Remarks
816-
This value is the <xref:Microsoft.Win32.FileDialog.FileName*> with all path information removed. Removing the paths makes the value appropriate for use in partial trust applications, since it prevents applications from discovering information about the local file system.
816+
This value is the <xref:Microsoft.Win32.FileDialog.FileName*> with all path information removed. Removing the paths prevents applications from discovering information about the local file system.
817817
818818
If more than one file name is selected (length of <xref:Microsoft.Win32.FileDialog.SafeFileNames*> is greater than one) then this property contains only the first selected file name.
819819

xml/Microsoft.Win32/OpenFileDialog.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ You cannot declare this managed class in XAML.
171171
<format type="text/markdown"><![CDATA[
172172
173173
## Remarks
174-
The file is opened with read-only permission (<xref:System.IO.FileMode.Open>, <xref:System.IO.FileAccess.Read>, and <xref:System.IO.FileShare.Read>), whether or not the Read Only checkbox is checked in the dialog. Because the file is opened without the ability to overwrite or write to the file, an application can safely load a file while executing within partial trust restrictions.
174+
The file is opened with read-only permission (<xref:System.IO.FileMode.Open>, <xref:System.IO.FileAccess.Read>, and <xref:System.IO.FileShare.Read>), whether or not the Read Only checkbox is checked in the dialog.
175175
176176
If more than one file is selected, the first selected file is opened.
177177
@@ -211,7 +211,7 @@ You cannot declare this managed class in XAML.
211211
<format type="text/markdown"><![CDATA[
212212
213213
## Remarks
214-
Each file is opened with read-only permission (<xref:System.IO.FileMode.Open>, <xref:System.IO.FileAccess.Read>, and <xref:System.IO.FileShare.Read>), whether or not the Read Only checkbox is checked in the dialog. Because each file is opened without the ability to overwrite or write to the file, an application can safely load one or more files while executing within partial trust restrictions.
214+
Each file is opened with read-only permission (<xref:System.IO.FileMode.Open>, <xref:System.IO.FileAccess.Read>, and <xref:System.IO.FileShare.Read>), whether or not the Read Only checkbox is checked in the dialog.
215215
216216
]]></format>
217217
</remarks>

0 commit comments

Comments
 (0)