diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 83930adf2e6a2..1e9dc65349681 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -25,12 +25,6 @@ "commands": [ "slngen" ] - }, - "dotnet-format": { - "version": "6.0.240501", - "commands": [ - "dotnet-format" - ] } } } diff --git a/.github/workflows/bump-chrome-version.yml b/.github/workflows/bump-chrome-version.yml index 2b496a81239f1..08654a3941d72 100644 --- a/.github/workflows/bump-chrome-version.yml +++ b/.github/workflows/bump-chrome-version.yml @@ -12,6 +12,7 @@ on: jobs: update: + if: github.repository == 'dotnet/runtime' runs-on: ubuntu-latest steps: - name: Checkout diff --git a/docs/area-owners.json b/docs/area-owners.json index 4fab21d4a68d5..1eb80f6b9255b 100644 --- a/docs/area-owners.json +++ b/docs/area-owners.json @@ -74,7 +74,8 @@ "t-mustafin", "hjleee", "JongHeonChoi", - "wscho77" + "wscho77", + "viewizard" ], "label": "os-tizen" }, diff --git a/docs/area-owners.md b/docs/area-owners.md index c51c6ce34e017..e4bedd54a41a3 100644 --- a/docs/area-owners.md +++ b/docs/area-owners.md @@ -154,17 +154,17 @@ Note: Editing this file doesn't update the mapping used by `@msftbot` for area-s ## Operating Systems -| Operating System | Lead | Owners (area experts to tag in PRs and issues) | Description | -|------------------|---------------|---------------------------------------------------------|--------------| -| os-alpine | | | | -| os-android | @steveisok | @akoeplinger | | -| os-freebsd | | | | -| os-mac-os-x | | | | -| os-maccatalyst | @steveisok | @kotlarmilos | | -| os-ios | @steveisok | @vargaz, @kotlarmilos | | -| os-tizen | @gbalykov | @hjleee, @wscho77, @clamp03, @JongHeonChoi, @t-mustafin | | -| os-tvos | @steveisok | @vargaz, @kotlarmilos | | -| os-wasi | @lewing | @pavelsavara | | +| Operating System | Lead | Owners (area experts to tag in PRs and issues) | Description | +|------------------|---------------|---------------------------------------------------------------------|--------------| +| os-alpine | | | | +| os-android | @steveisok | @akoeplinger | | +| os-freebsd | | | | +| os-mac-os-x | | | | +| os-maccatalyst | @steveisok | @kotlarmilos | | +| os-ios | @steveisok | @vargaz, @kotlarmilos | | +| os-tizen | @gbalykov | @hjleee, @wscho77, @clamp03, @JongHeonChoi, @t-mustafin, @viewizard | | +| os-tvos | @steveisok | @vargaz, @kotlarmilos | | +| os-wasi | @lewing | @pavelsavara | | ## Architectures diff --git a/docs/coding-guidelines/code-formatting-tools.md b/docs/coding-guidelines/code-formatting-tools.md index c5cb1ce48f55d..9a1175cae2e14 100644 --- a/docs/coding-guidelines/code-formatting-tools.md +++ b/docs/coding-guidelines/code-formatting-tools.md @@ -8,7 +8,7 @@ To help enable an easy workflow and reduce the number of formatting changes requ ### C#/VB -C# and VB code in the repository use the built-in Roslyn support for EditorConfig to enable auto-formatting in many IDEs. As a result, no additional tools are required to enable keeping your code formatted. If you want to use `dotnet format` to do formatting or are using the git pre-commit hook mentioned later in this document, you can run `./dotnet.cmd tool restore` or `./dotnet.sh tool restore` from the root of the repository to enable the `dotnet format` command. +C# and VB code in the repository use the built-in Roslyn support for EditorConfig to enable auto-formatting in many IDEs. As a result, no additional tools are required to enable keeping your code formatted. You can also use the `dotnet format` command from the dotnet SDK to do formatting or use the git pre-commit hook mentioned later in this document. ### C/C++ diff --git a/docs/design/mono/mono-library-mode.md b/docs/design/mono/mono-library-mode.md new file mode 100644 index 0000000000000..42288fa22a447 --- /dev/null +++ b/docs/design/mono/mono-library-mode.md @@ -0,0 +1,124 @@ +Library Mode on Mono +=== + +# Background + +For many native applications, accessibility to bountiful APIs from .NET runtime libraries can save developers from "reinventing the wheel" in the target platform's native language. That is where [interoperability](https://learn.microsoft.com/en-us/dotnet/csharp/advanced-topics/interop/) comes in handy to access modern .NET APIs from the native side. The .NET runtime libraries require the .NET runtime to function properly, and integrating the entire .NET ecosystem may prove cumbersome and unnecessary. Instead, for a smaller footprint and more seamless experience, the runtime and custom managed code invoking .NET APIs can be bundled into a library for direct consumption. In line with [Native code interop with Native AOT](https://learn.microsoft.com/en-us/dotnet/core/deploying/native-aot/interop), as of .NET 8, the [mono runtime supports a library mode](https://github.com/dotnet/runtime/issues/79377) enabling mobile developers to leverage modern .NET APIs in their mobile applications with a single static or shared library. + +Note: The library generated from Mono's Library Mode containing custom managed code and the mono runtime will, for brevity, be referred to as the mono library. + +# How it works + +The core components of mono's library mode that enables interoperability between native and managed code are as follows: +1. [UnmanagedCallersOnlyAttribute](https://learn.microsoft.com/en-us/dotnet/api/system.runtime.interopservices.unmanagedcallersonlyattribute?view=net-7.0) which allows native code to directly call managed methods. +2. [Direct Platform Invoke (P/Invoke)](https://learn.microsoft.com/en-us/dotnet/standard/native-interop/pinvoke) which allows managed code to directly call native functions. +3. The mono runtime which facilitates the above interop directions among its other responsibilities as a [managed runtime](https://learn.microsoft.com/en-us/dotnet/core/introduction#runtime). + +Being able to call managed .NET APIs from a native application has many usecases, including reducing the need to rewrite logic in the native language when there is no native counterpart. In order to call managed code leveraging these .NET APIs, the native application needs to recognize the corresponding symbols. Once custom managed code is compiled into managed assemblies, the Mono AOT Compiler processes them to generate [native-to-managed wrappers](https://github.com/dotnet/runtime/blob/43d164d8d65d163fef0de185eb11cfa0b1291919/src/mono/mono/mini/aot-compiler.c#L5446-L5498) for all methods decorated with [`UnmanagedCallersOnlyAttribute`](https://github.com/dotnet/runtime/pull/79424). These native-to-managed wrappers have entrypoint symbols specified by the corresponding `UnmanagedCallersOnlyAttribute`, allowing native code to call them directly. So once the mono library is linked/loaded into the native application, the Mono AOT Compiled assemblies should be [preloaded by the mono runtime](https://github.com/dotnet/runtime/blob/43d164d8d65d163fef0de185eb11cfa0b1291919/src/tasks/LibraryBuilder/Templates/preloaded-assemblies.c#L10) once the mono runtime is initialized in order to enable calling managed methods from the native side of the application. + +Being able to call native (unmanaged) functions from managed code is equally as important for bridging the native and managed sides. It can grant the managed side access to system-level operations and facilitates the reuse of native libraries where there are no managed counterparts. In order to call native code from managed code, the entrypoints to the native functions need to be known by the managed side. The mono runtime leverages managed-to-native wrappers to perform Direct P/Invoke by using these entrypoints to direct the native runtime to execute the corresponding native function. The Mono AOT Compiler [generates managed-to-native wrappers](https://github.com/dotnet/runtime/blob/9a33ac520a67496c8f79139dc571867726dc0e45/src/mono/mono/mini/aot-compiler.c#L5288-L5317) for p/invokes methods that are specified to be directly callable, which can be done either [altogether, by module names, or even by exactly matching module name and entrypoint name](https://github.com/dotnet/runtime/pull/79721). + +Interoperability is contingent on having a managed runtime, which in this case is the mono runtime. Though the mono runtime is [linked into the mono library](https://github.com/dotnet/runtime/blob/df6fdefa27068126794b253d4d822706221a92db/src/tasks/LibraryBuilder/LibraryBuilder.cs#L338), it needs to be running in order for interoperability to occur. By design, the mono runtime is initialized once the native application calls into the mono library, through invoking a native-to-managed wrapper's entrypoint symbol. A [`runtime-init-callback` must be set](https://github.com/dotnet/runtime/pull/82253) either manually or automatically, so that the first native-to-managed wrapper called can invoke mono's runtime init function. + +## Auto-initializing the Mono Runtime + +Auto-initialization of the mono runtime, as mentioned in [How it works](#how-it-works), occurs when using the default runtime init callback [`UsesRuntimeInitCallback=true`](https://github.com/dotnet/runtime/blob/df6fdefa27068126794b253d4d822706221a92db/src/tasks/LibraryBuilder/LibraryBuilder.cs#L81) and [`UsesCustomRuntimeInitCallback=false`](https://github.com/dotnet/runtime/blob/df6fdefa27068126794b253d4d822706221a92db/src/tasks/LibraryBuilder/LibraryBuilder.cs#L76) instead of a custom callback. It [involves several steps](https://github.com/dotnet/runtime/blob/df6fdefa27068126794b253d4d822706221a92db/src/tasks/LibraryBuilder/Templates/autoinit.c#L125-L161) to setup the mono runtime for proper behavior. Once the native application calls into the mono library through a native-to-managed wrapper entry point, the callback is invoked once in a thread safe manner. In cases where the default callback isn't appropriate, a custom callback may be set using `UsesRuntimeInitCallback=true` + `UsesCustomRuntimeInitCallback=true` + [`CustomRuntimeInitCallback=`](https://github.com/dotnet/runtime/blob/df6fdefa27068126794b253d4d822706221a92db/src/mono/msbuild/apple/build/AppleBuild.targets#L169C100-L169C125), and it is the implementor's responsibility to design a thread safe implementation of lazy runtime initialization. + +## Bundling + +As the mono library provides native applications a means to access .NET APIs, the resources corresponding to those APIs such as assemblies, their pdbs containing debugging and symbol information, satellite assemblies for localization, and other data resources like runtime configuration and timezone data need to be accessible as well. This can be achieved through having those resources on disk, but for a more out-of-the-box solution, the mono library can be [built as a self-contained library](https://github.com/dotnet/runtime/pull/84191) by bundling needed resources into the library itself. In doing so, the byte data of needed resources are stored in preallocated structs in the library that [should then be registered into the mono runtime during initialization](https://github.com/dotnet/runtime/blob/76a995afe3306863cb836b5becc33293a2e5a781/src/tasks/LibraryBuilder/Templates/autoinit.c#L130). + +# Example Workflows + +## Building from a dotnet sdk workload + +https://github.com/steveisok/library-mode-sample + +Note: The workload might be named differently depending on the sdk version, e.g. `mobile-librarybuilder`. Search for available workloads using `dotnet workload search` and passing in keywords like `mobile` or `librarybuilder`. + +## Android + +After building the mono library with `dotnet publish -r android-arm64`, it can be found as `lib.so` in the binaries folder (i.e. `library-mode-sample/ManagedProject/bin/Release/net8.0/android-arm64/Bundle/libManagedProject.so`). The mono library when built as a shared library with bundling (on by default) can be loaded and used with the following steps: + +1. Open/Create the Android native project in Android Studio. + +2. Copy the mono library into the project's `jniLibs` folder under the corresponding architecture (create directories if necessary). i.e. `app/src/main/jniLibs/arm64-v8a/libManagedProject.so` + +3. Load the mono library through Java Native Interface by creating a C++ module under `app/src/main/cpp/`. If the C++ module option is not available, create a `.cpp` file and a `CMakeLists.txt` file that should contain the following. + +C++ +```cpp +#include + +extern "C" void SayHello(); + +extern "C" +{ + JNIEXPORT void JNICALL + Java_com_example__MainActivity_SayHello(JNIEnv *env, jobject thiz) { + SayHello(); + } +} +``` + +CMake +``` +cmake_minimum_required(VERSION 3.22.1) + +project("") + +add_library( android_library_mode + SHARED + .cpp ) + +find_library( log-lib + log ) + +target_link_libraries( android_library_mode + ${log-lib} + ${CMAKE_SOURCE_DIR}/../jniLibs/arm64-v8a/libManagedProject.so) +``` + +4. Instantiate and call the Create a `Copy Files` build phase with `Frameworks` as the destination, and include the mono library. + +5. Load the library that links in the mono library (i.e. `android_library_mode` from the `.cpp` file) via `System.loadLibrary("")`. + +6. Instantiate the native methods and invoke them. + +MainActivity.java +```java +public class MainActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + System.loadLibrary("android_library_mode"); + + SayHello(); + } + + public native void SayHello(); +} +``` + +7. Building and running the Android application should reflect the additions. + +## iOS + +After building the mono library with `dotnet publish -r ios-arm64`, it can be found as `lib.dylib` in the binaries folder (i.e. `library-mode-sample/ManagedProject/bin/Release/net8.0/ios-arm64/Bundle/libManagedProject.dylib`). The mono library when built as a shared library with bundling (on by default) can be loaded and used with the following steps: + +1. Open/Create the iOS native project in XCode. + +2. Copy the mono library into the project's root directory (not creating a reference). + +3. Navigate to the project's `Build Phases` tab, and ensure that the mono library is included under the `Link Binary With Libraries` section. + +4. Create a `Copy Files` build phase with `Frameworks` as the destination, and include the mono library. + +5. Navigate to the project's `Build Settings` tab, and add the directory where the mono library was placed in step 2. to `Library Search Paths`. i.e. `$(PROJECT_DIR)` if the mono library was placed in the root directory. + +6. Instantiate and call any custom managed code built into the mono library in native code. i.e. Add `void SayHello(void);` to `main.m` and invoke it `SayHello();`. + +7. Building and running the iOS application should reflect the additions. \ No newline at end of file diff --git a/docs/design/mono/profiled-aot.md b/docs/design/mono/profiled-aot.md index 336089163086e..80e36b9e9c02b 100644 --- a/docs/design/mono/profiled-aot.md +++ b/docs/design/mono/profiled-aot.md @@ -11,10 +11,22 @@ The advantages of Profiled AOT stem from its flexibility to AOT select code path Within .NET, traces can be collected by [diagnostic tooling](https://learn.microsoft.com/en-us/dotnet/core/diagnostics/eventpipe#tools-that-use-eventpipe) that use the [EventPipe](https://learn.microsoft.com/en-us/dotnet/core/diagnostics/eventpipe) runtime component. [Existing diagnostic tooling only supports `NamedPipes`/`UnixDomainSockets`](https://github.com/dotnet/runtime/blob/main/docs/design/mono/diagnostics-tracing.md), so the [diagnostics tool dotnet-dsrouter](https://learn.microsoft.com/en-us/dotnet/core/diagnostics/dotnet-dsrouter) is required to bridge the EventPipe-based diagnostic tooling with .NET applications on mobile platforms and other remote sandboxed environments. -Events collected by EventPipe-based diagnostic tooling are emitted with a `.nettrace` file format. Among the [various events supported by Mono runtime](https://github.com/dotnet/runtime/blob/main/src/mono/mono/eventpipe/gen-eventing-event-inc.lst), [method jitting and method loading](https://github.com/dotnet/runtime/blob/096b2499fe6939d635c35edaa607a180eb578fbb/src/mono/mono/eventpipe/gen-eventing-event-inc.lst#L39-L41) are crucial to [inform the Mono AOT Compiler what methods to AOT](https://github.com/dotnet/runtime/blob/6b67caaedfbfeaf7707478e50ccc9e8bc929e591/src/mono/mono/mini/aot-compiler.c#L13818-L13880). To collect a trace containing such events, it is imperative that dotnet-trace is provided either the appropriate [event provider](https://learn.microsoft.com/en-us/dotnet/core/diagnostics/well-known-event-providers) with [keyword flags](https://github.com/dotnet/runtime/blob/c59aef7622c9a2499abb1b7d262ed0c90f4b0c7f/src/coreclr/vm/ClrEtwAll.man#L14-L92) through `--providers` or the appropriate list of keywords through `--clrevents`. That way, the [events relevant to the keywords are captured](https://github.com/dotnet/runtime/blob/c59aef7622c9a2499abb1b7d262ed0c90f4b0c7f/src/coreclr/vm/ClrEtwAll.man#L3133). In the example workflows below, `--providers Microsoft-Windows-DotNETRuntime:0x1F000080018:5` is used. +Events collected by EventPipe-based diagnostic tooling are emitted with a [`.nettrace` file format](https://github.com/microsoft/perfview/blob/main/src/TraceEvent/EventPipe/EventPipeFormat.md). Among the [various events supported by Mono runtime](https://github.com/dotnet/runtime/blob/main/src/mono/mono/eventpipe/gen-eventing-event-inc.lst), [method jitting and method loading](https://github.com/dotnet/runtime/blob/096b2499fe6939d635c35edaa607a180eb578fbb/src/mono/mono/eventpipe/gen-eventing-event-inc.lst#L39-L41) are crucial to [inform the Mono AOT Compiler what methods to AOT](https://github.com/dotnet/runtime/blob/6b67caaedfbfeaf7707478e50ccc9e8bc929e591/src/mono/mono/mini/aot-compiler.c#L13818-L13880). To collect a trace containing such events, it is imperative that dotnet-trace is provided either the appropriate [event provider](https://learn.microsoft.com/en-us/dotnet/core/diagnostics/well-known-event-providers) with [keyword flags](https://github.com/dotnet/runtime/blob/c59aef7622c9a2499abb1b7d262ed0c90f4b0c7f/src/coreclr/vm/ClrEtwAll.man#L14-L92) through `--providers` or the appropriate list of keywords through `--clrevents`. That way, the [events relevant to the keywords are captured](https://github.com/dotnet/runtime/blob/c59aef7622c9a2499abb1b7d262ed0c90f4b0c7f/src/coreclr/vm/ClrEtwAll.man#L3133). In the example workflows below, `--providers Microsoft-Windows-DotNETRuntime:0x1F000080018:5` is used. Profiles [ingested by the Mono AOT Compiler](https://github.com/dotnet/runtime/blob/6b67caaedfbfeaf7707478e50ccc9e8bc929e591/src/tasks/AotCompilerTask/MonoAOTCompiler.cs#L174) are generated through .NET runtime's [`dotnet-pgo` tool](https://github.com/dotnet/runtime/blob/main/docs/design/features/dotnet-pgo.md). As such, profiles passed to the Mono AOT Compiler are expected to adhere to the [`.mibc` file format](https://github.com/dotnet/runtime/blob/main/src/coreclr/tools/dotnet-pgo/dotnet-pgo-experiment.md#mibc-file-format). The Mono AOT Compiler [reads `.mibc` profiles](https://github.com/dotnet/runtime/blob/c59aef7622c9a2499abb1b7d262ed0c90f4b0c7f/src/mono/mono/mini/aot-compiler.c#L14085-L14162) to determine [which methods to AOT](https://github.com/dotnet/runtime/blob/6b67caaedfbfeaf7707478e50ccc9e8bc929e591/src/mono/mono/mini/aot-compiler.c#L13818-L13880) when compiling CIL assemblies. +## Mono Profiled AOT Compilation + +The Mono AOT Compiler can [directly ingest `.mibc` profiles](https://github.com/dotnet/runtime/pull/70194) to AOT compile methods contained within the profile. As the Mono AOT Compiler already had logic to AOT compile profile methods (from the legacy mono profiler), resolving [`MonoMethod`s](https://github.com/dotnet/runtime/blob/18cb172309570de25a2df8660ec2a6e3d0db610b/src/mono/mono/metadata/class-internals.h#L67) from the `.mibc` profile and [adding them for compilation](https://github.com/dotnet/runtime/blob/18cb172309570de25a2df8660ec2a6e3d0db610b/src/mono/mono/mini/aot-compiler.c#L13842-L13846) was sufficient. + +As the [`.mibc` profile](https://github.com/dotnet/runtime/blob/main/src/coreclr/tools/dotnet-pgo/dotnet-pgo-experiment.md#mibc-file-format) is a Portable Executable (PE) file, the Mono AOT Compiler leverages several mono methods to resolve the profile data as `MonoMethod`s by: + +1. Opening the `.mibc` profile as a `MonoImage` to load the `AssemblyDictionary` as a `MonoMethod`. +2. Iterating through the `AssemblyDictionary`'s IL instructions to discover tokens corresponding to `mibcGroupMethod`s within the profile. +3. Resolving each `mibcGroupMethod` discovered as a `MonoMethod`. +4. Iterating through the `mibcGroupmethod`'s IL instructions to discover tokens corresponding to method/type tokens within the `mibcGroupMethod`. +5. Resolving `MethodRef` and `MethodSpec` tokens as `MonoMethod`s corresponding to the actual method to be profile AOT'd, and inserting them into the profile methods hash table. + # Example Workflows ## Android -- Running through the [Android Profiled AOT Functional Test](https://github.com/dotnet/runtime/tree/main/src/tests/FunctionalTests/Android/Device_Emulator/AOT_PROFILED) diff --git a/eng/SourceBuild.props b/eng/SourceBuild.props index 054083f7023f7..383c4cef575d7 100644 --- a/eng/SourceBuild.props +++ b/eng/SourceBuild.props @@ -48,6 +48,7 @@ $(InnerBuildArgs) /p:OfficialBuildId=$(OfficialBuildId) $(InnerBuildArgs) /p:ContinuousIntegrationBuild=$(ContinuousIntegrationBuild) $(InnerBuildArgs) --usemonoruntime + $(InnerBuildArgs) /p:PortableBuild=$(PortableBuild) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 339ce08e6cd9c..439bfd1c4b7a9 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -12,77 +12,81 @@ https://github.com/dotnet/wcf 7f504aabb1988e9a093c1e74d8040bd52feb2f01 - + + https://github.com/dotnet/emsdk + eabee1e79eec67b4459f20ca6b56deee60c8b45b + + https://github.com/dotnet/llvm-project - e80993c0649d5e949eb4ac23fe22290b4ecb7e66 + 4db411bed3b4f48dfb4ed59629a0dc1d23e724e6 - + https://github.com/dotnet/llvm-project - e80993c0649d5e949eb4ac23fe22290b4ecb7e66 + 4db411bed3b4f48dfb4ed59629a0dc1d23e724e6 - + https://github.com/dotnet/llvm-project - e80993c0649d5e949eb4ac23fe22290b4ecb7e66 + 4db411bed3b4f48dfb4ed59629a0dc1d23e724e6 - + https://github.com/dotnet/llvm-project - e80993c0649d5e949eb4ac23fe22290b4ecb7e66 + 4db411bed3b4f48dfb4ed59629a0dc1d23e724e6 - + https://github.com/dotnet/llvm-project - e80993c0649d5e949eb4ac23fe22290b4ecb7e66 + 4db411bed3b4f48dfb4ed59629a0dc1d23e724e6 - + https://github.com/dotnet/llvm-project - e80993c0649d5e949eb4ac23fe22290b4ecb7e66 + 4db411bed3b4f48dfb4ed59629a0dc1d23e724e6 - + https://github.com/dotnet/llvm-project - e80993c0649d5e949eb4ac23fe22290b4ecb7e66 + 4db411bed3b4f48dfb4ed59629a0dc1d23e724e6 - + https://github.com/dotnet/llvm-project - e80993c0649d5e949eb4ac23fe22290b4ecb7e66 + 4db411bed3b4f48dfb4ed59629a0dc1d23e724e6 - + https://github.com/dotnet/llvm-project - e80993c0649d5e949eb4ac23fe22290b4ecb7e66 + 4db411bed3b4f48dfb4ed59629a0dc1d23e724e6 - + https://github.com/dotnet/llvm-project - e80993c0649d5e949eb4ac23fe22290b4ecb7e66 + 4db411bed3b4f48dfb4ed59629a0dc1d23e724e6 - + https://github.com/dotnet/llvm-project - e80993c0649d5e949eb4ac23fe22290b4ecb7e66 + 4db411bed3b4f48dfb4ed59629a0dc1d23e724e6 - + https://github.com/dotnet/llvm-project - e80993c0649d5e949eb4ac23fe22290b4ecb7e66 + 4db411bed3b4f48dfb4ed59629a0dc1d23e724e6 - + https://github.com/dotnet/llvm-project - e80993c0649d5e949eb4ac23fe22290b4ecb7e66 + 4db411bed3b4f48dfb4ed59629a0dc1d23e724e6 - + https://github.com/dotnet/llvm-project - e80993c0649d5e949eb4ac23fe22290b4ecb7e66 + 4db411bed3b4f48dfb4ed59629a0dc1d23e724e6 - + https://github.com/dotnet/llvm-project - e80993c0649d5e949eb4ac23fe22290b4ecb7e66 + 4db411bed3b4f48dfb4ed59629a0dc1d23e724e6 - + https://github.com/dotnet/llvm-project - e80993c0649d5e949eb4ac23fe22290b4ecb7e66 + 4db411bed3b4f48dfb4ed59629a0dc1d23e724e6 - + https://github.com/dotnet/command-line-api - 02fe27cd6a9b001c8feb7938e6ef4b3799745759 + a045dd54a4c44723c215d992288160eb1401bb7f - + https://github.com/dotnet/command-line-api - 02fe27cd6a9b001c8feb7938e6ef4b3799745759b + a045dd54a4c44723c215d992288160eb1401bb7f @@ -90,14 +94,14 @@ 45dd3a73dd5b64b010c4251303b3664bb30df029 - + https://github.com/dotnet/emsdk - a448a9c1b1ac8d0cefd0dbc0c7a8f12a3fbd1d57 + eabee1e79eec67b4459f20ca6b56deee60c8b45b - + https://github.com/dotnet/source-build-reference-packages - 947ef94c52440c781aeb6ee13e95a9ec9992e444 + 4f303e492250f07f279adce6e5e97b5707ef7c76 @@ -107,82 +111,82 @@ - + https://github.com/dotnet/arcade - a6513a141bc5cb0d7d625399918fcbca1dc8a412 + 0f16479e1811ef3b5c9fc251563c6181f9083c34 - + https://github.com/dotnet/arcade - a6513a141bc5cb0d7d625399918fcbca1dc8a412 + 0f16479e1811ef3b5c9fc251563c6181f9083c34 - + https://github.com/dotnet/arcade - a6513a141bc5cb0d7d625399918fcbca1dc8a412 + 0f16479e1811ef3b5c9fc251563c6181f9083c34 - + https://github.com/dotnet/arcade - a6513a141bc5cb0d7d625399918fcbca1dc8a412 + 0f16479e1811ef3b5c9fc251563c6181f9083c34 - + https://github.com/dotnet/arcade - a6513a141bc5cb0d7d625399918fcbca1dc8a412 + 0f16479e1811ef3b5c9fc251563c6181f9083c34 - + https://github.com/dotnet/arcade - a6513a141bc5cb0d7d625399918fcbca1dc8a412 + 0f16479e1811ef3b5c9fc251563c6181f9083c34 - + https://github.com/dotnet/arcade - a6513a141bc5cb0d7d625399918fcbca1dc8a412 + 0f16479e1811ef3b5c9fc251563c6181f9083c34 - + https://github.com/dotnet/arcade - a6513a141bc5cb0d7d625399918fcbca1dc8a412 + 0f16479e1811ef3b5c9fc251563c6181f9083c34 - + https://github.com/dotnet/arcade - a6513a141bc5cb0d7d625399918fcbca1dc8a412 + 0f16479e1811ef3b5c9fc251563c6181f9083c34 - + https://github.com/dotnet/arcade - a6513a141bc5cb0d7d625399918fcbca1dc8a412 + 0f16479e1811ef3b5c9fc251563c6181f9083c34 - + https://github.com/dotnet/arcade - a6513a141bc5cb0d7d625399918fcbca1dc8a412 + 0f16479e1811ef3b5c9fc251563c6181f9083c34 - + https://github.com/dotnet/arcade - a6513a141bc5cb0d7d625399918fcbca1dc8a412 + 0f16479e1811ef3b5c9fc251563c6181f9083c34 - + https://github.com/dotnet/arcade - a6513a141bc5cb0d7d625399918fcbca1dc8a412 + 0f16479e1811ef3b5c9fc251563c6181f9083c34 - + https://github.com/dotnet/arcade - a6513a141bc5cb0d7d625399918fcbca1dc8a412 + 0f16479e1811ef3b5c9fc251563c6181f9083c34 - + https://github.com/dotnet/arcade - a6513a141bc5cb0d7d625399918fcbca1dc8a412 + 0f16479e1811ef3b5c9fc251563c6181f9083c34 - + https://github.com/dotnet/arcade - a6513a141bc5cb0d7d625399918fcbca1dc8a412 + 0f16479e1811ef3b5c9fc251563c6181f9083c34 - + https://github.com/dotnet/arcade - a6513a141bc5cb0d7d625399918fcbca1dc8a412 + 0f16479e1811ef3b5c9fc251563c6181f9083c34 - + https://github.com/dotnet/arcade - a6513a141bc5cb0d7d625399918fcbca1dc8a412 + 0f16479e1811ef3b5c9fc251563c6181f9083c34 - + https://github.com/dotnet/arcade - a6513a141bc5cb0d7d625399918fcbca1dc8a412 + 0f16479e1811ef3b5c9fc251563c6181f9083c34 https://github.com/dotnet/runtime-assets @@ -236,61 +240,61 @@ https://github.com/dotnet/runtime-assets 525404862b5613aa96d94fd14337da930f9a7c94 - + https://github.com/dotnet/llvm-project - e80993c0649d5e949eb4ac23fe22290b4ecb7e66 + 4db411bed3b4f48dfb4ed59629a0dc1d23e724e6 - + https://github.com/dotnet/llvm-project - e80993c0649d5e949eb4ac23fe22290b4ecb7e66 + 4db411bed3b4f48dfb4ed59629a0dc1d23e724e6 - + https://github.com/dotnet/llvm-project - e80993c0649d5e949eb4ac23fe22290b4ecb7e66 + 4db411bed3b4f48dfb4ed59629a0dc1d23e724e6 - + https://github.com/dotnet/llvm-project - e80993c0649d5e949eb4ac23fe22290b4ecb7e66 + 4db411bed3b4f48dfb4ed59629a0dc1d23e724e6 - + https://github.com/dotnet/llvm-project - e80993c0649d5e949eb4ac23fe22290b4ecb7e66 + 4db411bed3b4f48dfb4ed59629a0dc1d23e724e6 - + https://github.com/dotnet/llvm-project - e80993c0649d5e949eb4ac23fe22290b4ecb7e66 + 4db411bed3b4f48dfb4ed59629a0dc1d23e724e6 - + https://github.com/dotnet/llvm-project - e80993c0649d5e949eb4ac23fe22290b4ecb7e66 + 4db411bed3b4f48dfb4ed59629a0dc1d23e724e6 - + https://github.com/dotnet/llvm-project - e80993c0649d5e949eb4ac23fe22290b4ecb7e66 + 4db411bed3b4f48dfb4ed59629a0dc1d23e724e6 - + https://github.com/dotnet/llvm-project - e80993c0649d5e949eb4ac23fe22290b4ecb7e66 + 4db411bed3b4f48dfb4ed59629a0dc1d23e724e6 - + https://github.com/dotnet/llvm-project - e80993c0649d5e949eb4ac23fe22290b4ecb7e66 + 4db411bed3b4f48dfb4ed59629a0dc1d23e724e6 - + https://github.com/dotnet/llvm-project - e80993c0649d5e949eb4ac23fe22290b4ecb7e66 + 4db411bed3b4f48dfb4ed59629a0dc1d23e724e6 - + https://github.com/dotnet/llvm-project - e80993c0649d5e949eb4ac23fe22290b4ecb7e66 + 4db411bed3b4f48dfb4ed59629a0dc1d23e724e6 - + https://github.com/dotnet/llvm-project - e80993c0649d5e949eb4ac23fe22290b4ecb7e66 + 4db411bed3b4f48dfb4ed59629a0dc1d23e724e6 - + https://github.com/dotnet/llvm-project - e80993c0649d5e949eb4ac23fe22290b4ecb7e66 + 4db411bed3b4f48dfb4ed59629a0dc1d23e724e6 https://github.com/dotnet/runtime @@ -329,9 +333,9 @@ https://github.com/dotnet/xharness e74a52e487efdf4f1dfcb7540abf5dd529ce2e4e - + https://github.com/dotnet/arcade - a6513a141bc5cb0d7d625399918fcbca1dc8a412 + 0f16479e1811ef3b5c9fc251563c6181f9083c34 https://dev.azure.com/dnceng/internal/_git/dotnet-optimization @@ -397,9 +401,9 @@ https://github.com/NuGet/NuGet.Client 8fef55f5a55a3b4f2c96cd1a9b5ddc51d4b927f8 - + https://github.com/dotnet/installer - 165040edde65911736ac5310365902003688bc24 + dccd7139095df21a5df808cf1bc9dc8b944afb03 diff --git a/eng/Versions.props b/eng/Versions.props index 912fcb31a43bc..4a322c530debc 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -82,22 +82,22 @@ 9.0.100-alpha.1.23551.3 - 9.0.0-beta.23559.3 - 9.0.0-beta.23559.3 - 9.0.0-beta.23559.3 - 9.0.0-beta.23559.3 - 9.0.0-beta.23559.3 - 9.0.0-beta.23559.3 - 2.5.3-beta.23559.3 - 9.0.0-beta.23559.3 - 9.0.0-beta.23559.3 - 9.0.0-beta.23559.3 - 9.0.0-beta.23559.3 - 9.0.0-beta.23559.3 - 9.0.0-beta.23559.3 - 9.0.0-beta.23559.3 - 9.0.0-beta.23559.3 - 9.0.0-beta.23559.3 + 9.0.0-beta.23565.1 + 9.0.0-beta.23565.1 + 9.0.0-beta.23565.1 + 9.0.0-beta.23565.1 + 9.0.0-beta.23565.1 + 9.0.0-beta.23565.1 + 2.5.3-beta.23565.1 + 9.0.0-beta.23565.1 + 9.0.0-beta.23565.1 + 9.0.0-beta.23565.1 + 9.0.0-beta.23565.1 + 9.0.0-beta.23565.1 + 9.0.0-beta.23565.1 + 9.0.0-beta.23565.1 + 9.0.0-beta.23565.1 + 9.0.0-beta.23565.1 6.0.0-preview.1.102 @@ -105,14 +105,14 @@ 6.0.0 9.0.0-alpha.1.23529.4 - 16.0.5-alpha.1.23525.1 - 16.0.5-alpha.1.23525.1 - 16.0.5-alpha.1.23525.1 - 16.0.5-alpha.1.23525.1 - 16.0.5-alpha.1.23525.1 - 16.0.5-alpha.1.23525.1 - 16.0.5-alpha.1.23525.1 - 16.0.5-alpha.1.23525.1 + 16.0.5-alpha.1.23558.11 + 16.0.5-alpha.1.23558.11 + 16.0.5-alpha.1.23558.11 + 16.0.5-alpha.1.23558.11 + 16.0.5-alpha.1.23558.11 + 16.0.5-alpha.1.23558.11 + 16.0.5-alpha.1.23558.11 + 16.0.5-alpha.1.23558.11 6.0.0 1.1.1 @@ -161,7 +161,7 @@ 1.0.0-prerelease.23559.3 16.11.29-beta1.23404.4 - 2.0.0-beta4.23307.1 + 2.0.0-beta4.23407.1 3.0.3 2.1.0 2.0.3 @@ -212,43 +212,44 @@ 2.2.3 8.0.0-alpha.1.23180.2 - 16.0.5-alpha.1.23525.1 - 16.0.5-alpha.1.23525.1 - 16.0.5-alpha.1.23525.1 - 16.0.5-alpha.1.23525.1 - 16.0.5-alpha.1.23525.1 - 16.0.5-alpha.1.23525.1 - 16.0.5-alpha.1.23525.1 - 16.0.5-alpha.1.23525.1 - 16.0.5-alpha.1.23525.1 - 16.0.5-alpha.1.23525.1 - 16.0.5-alpha.1.23525.1 - 16.0.5-alpha.1.23525.1 - 16.0.5-alpha.1.23525.1 - 16.0.5-alpha.1.23525.1 + 16.0.5-alpha.1.23558.11 + 16.0.5-alpha.1.23558.11 + 16.0.5-alpha.1.23558.11 + 16.0.5-alpha.1.23558.11 + 16.0.5-alpha.1.23558.11 + 16.0.5-alpha.1.23558.11 + 16.0.5-alpha.1.23558.11 + 16.0.5-alpha.1.23558.11 + 16.0.5-alpha.1.23558.11 + 16.0.5-alpha.1.23558.11 + 16.0.5-alpha.1.23558.11 + 16.0.5-alpha.1.23558.11 + 16.0.5-alpha.1.23558.11 + 16.0.5-alpha.1.23558.11 - 9.0.0-alpha.1.23530.1 + 9.0.0-alpha.1.23565.1 $(MicrosoftNETWorkloadEmscriptenCurrentManifest90100TransportVersion) + 9.0.0-alpha.1.23565.1 1.1.87-gba258badda 1.0.0-v3.14.0.5722 - 16.0.5-alpha.1.23525.1 - 16.0.5-alpha.1.23525.1 - 16.0.5-alpha.1.23525.1 - 16.0.5-alpha.1.23525.1 - 16.0.5-alpha.1.23525.1 - 16.0.5-alpha.1.23525.1 - 16.0.5-alpha.1.23525.1 - 16.0.5-alpha.1.23525.1 + 16.0.5-alpha.1.23558.11 + 16.0.5-alpha.1.23558.11 + 16.0.5-alpha.1.23558.11 + 16.0.5-alpha.1.23558.11 + 16.0.5-alpha.1.23558.11 + 16.0.5-alpha.1.23558.11 + 16.0.5-alpha.1.23558.11 + 16.0.5-alpha.1.23558.11 3.1.7 1.0.406601 - 9.0.100-alpha.1.23563.1 + 9.0.100-alpha.1.23564.26 $(MicrosoftDotnetSdkInternalVersion) diff --git a/eng/build.ps1 b/eng/build.ps1 index fc771e7635d1f..687d5bbc72684 100644 --- a/eng/build.ps1 +++ b/eng/build.ps1 @@ -30,7 +30,7 @@ function Get-Help() { Write-Host "Common settings:" Write-Host " -arch (-a) Target platform: x86, x64, arm, arm64, or wasm." Write-Host " Pass a comma-separated list to build for multiple architectures." - Write-Host " [Default: Your machine's architecture.]" + Write-Host (" [Default: {0} (Depends on your console's architecture.)]" -f [System.Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture.ToString().ToLowerInvariant()) Write-Host " -binaryLog (-bl) Output binary log." Write-Host " -configuration (-c) Build configuration: Debug, Release or Checked." Write-Host " Checked is exclusive to the CLR subset. It is the same as Debug, except code is" diff --git a/eng/common/cross/toolchain.cmake b/eng/common/cross/toolchain.cmake index 00288a300653a..3762640fdcf79 100644 --- a/eng/common/cross/toolchain.cmake +++ b/eng/common/cross/toolchain.cmake @@ -288,6 +288,8 @@ elseif(TARGET_ARCH_NAME MATCHES "^(arm64|x64|riscv64)$") add_toolchain_linker_flag("-Wl,--rpath-link=${CROSS_ROOTFS}/usr/lib64") add_toolchain_linker_flag("-Wl,--rpath-link=${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}") endif() +elseif(TARGET_ARCH_NAME STREQUAL "s390x") + add_toolchain_linker_flag("--target=${TOOLCHAIN}") elseif(TARGET_ARCH_NAME STREQUAL "x86") if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/i586-alpine-linux-musl) add_toolchain_linker_flag("--target=${TOOLCHAIN}") @@ -335,6 +337,8 @@ if(TARGET_ARCH_NAME MATCHES "^(arm|armel)$") if(TARGET_ARCH_NAME STREQUAL "armel") add_compile_options(-mfloat-abi=softfp) endif() +elseif(TARGET_ARCH_NAME STREQUAL "s390x") + add_compile_options("--target=${TOOLCHAIN}") elseif(TARGET_ARCH_NAME STREQUAL "x86") if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/i586-alpine-linux-musl) add_compile_options(--target=${TOOLCHAIN}) diff --git a/eng/formatting/format.sh b/eng/formatting/format.sh index ac044fef44091..a2197d696f70b 100755 --- a/eng/formatting/format.sh +++ b/eng/formatting/format.sh @@ -17,7 +17,7 @@ fi if [ -n "$MANAGED_FILES" ]; then # Format all selected files - echo "$MANAGED_FILES" | cat | xargs | sed -e 's/ /,/g' | dotnet format --no-restore --include - + echo "$MANAGED_FILES" | cat | xargs | sed -e 's/ /,/g' | dotnet format whitespace --include - --folder # Add back the modified files to staging echo "$MANAGED_FILES" | xargs git add diff --git a/eng/native/configurecompiler.cmake b/eng/native/configurecompiler.cmake index 6fc480fb20aab..2b2a6c0e0a349 100644 --- a/eng/native/configurecompiler.cmake +++ b/eng/native/configurecompiler.cmake @@ -564,6 +564,11 @@ if (CLR_CMAKE_HOST_UNIX) add_compile_options(-Wimplicit-fallthrough) endif() + # VLAs are non standard in C++, aren't available on Windows and + # are a warning by default since clang 18. + # For consistency, enable warnings for all compiler versions. + add_compile_options($<$:-Wvla>) + #These seem to indicate real issues add_compile_options($<$:-Wno-invalid-offsetof>) diff --git a/eng/pipelines/common/xplat-setup.yml b/eng/pipelines/common/xplat-setup.yml index 6a47a19b9f8b9..44d8bc2088b40 100644 --- a/eng/pipelines/common/xplat-setup.yml +++ b/eng/pipelines/common/xplat-setup.yml @@ -182,7 +182,7 @@ jobs: # Public Windows Build Pool ${{ if and(or(eq(parameters.osGroup, 'windows'), eq(parameters.jobParameters.hostedOs, 'windows')), eq(variables['System.TeamProject'], 'public')) }}: name: $(DncEngPublicBuildPool) - demands: ImageOverride -equals windows.vs2022.amd64.open + demands: ImageOverride -equals windows.vs2022preview.amd64.open ${{ if eq(parameters.helixQueuesTemplate, '') }}: diff --git a/eng/pipelines/coreclr/perf-non-wasm-jobs.yml b/eng/pipelines/coreclr/perf-non-wasm-jobs.yml index fc787e45068db..9d18284e67617 100644 --- a/eng/pipelines/coreclr/perf-non-wasm-jobs.yml +++ b/eng/pipelines/coreclr/perf-non-wasm-jobs.yml @@ -236,6 +236,39 @@ jobs: logicalmachine: 'perftiger' r2rRunType: --nor2r + # run coreclr perftiger microbenchmarks CrossBlockLocalAssertionProp perf jobs + - template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml + buildConfig: release + runtimeFlavor: coreclr + platforms: + - windows_x64 + jobParameters: + testGroup: perf + liveLibrariesBuildConfig: Release + projectFile: microbenchmarks.proj + runKind: micro + runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml + logicalmachine: 'perftiger' + experimentName: crossblocklocalassertionprop + + - template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml + buildConfig: release + runtimeFlavor: coreclr + platforms: + - linux_x64 + jobParameters: + testGroup: perf + liveLibrariesBuildConfig: Release + projectFile: microbenchmarks.proj + runKind: micro + runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml + logicalmachine: 'perftiger' + experimentName: crossblocklocalassertionprop + # run coreclr perfowl microbenchmarks perf job - template: /eng/pipelines/common/platform-matrix.yml parameters: diff --git a/eng/pipelines/coreclr/perf_slow.yml b/eng/pipelines/coreclr/perf_slow.yml index 29cf6ae2b1ef5..145900c64aeda 100644 --- a/eng/pipelines/coreclr/perf_slow.yml +++ b/eng/pipelines/coreclr/perf_slow.yml @@ -184,6 +184,24 @@ extends: timeoutInMinutes: 780 r2rRunType: --nor2r + # run coreclr Linux arm64 ampere CrossBlockLocalAssertionProp microbenchmarks perf job + - template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml + buildConfig: release + runtimeFlavor: coreclr + platforms: + - linux_arm64 + jobParameters: + testGroup: perf + liveLibrariesBuildConfig: Release + projectFile: microbenchmarks.proj + runKind: micro + runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml + logicalmachine: 'perfampere' + timeoutInMinutes: 780 + experimentName: crossblocklocalassertionprop + # run coreclr Windows arm64 microbenchmarks perf job - template: /eng/pipelines/common/platform-matrix.yml parameters: @@ -253,6 +271,24 @@ extends: r2rRunType: -NoR2R timeoutInMinutes: 780 + # run coreclr Windows arm64 ampere CrossBlockLocalAssertionProp microbenchmarks perf job + - template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/coreclr/templates/perf-job.yml + buildConfig: release + runtimeFlavor: coreclr + platforms: + - windows_arm64 + jobParameters: + testGroup: perf + liveLibrariesBuildConfig: Release + projectFile: microbenchmarks.proj + runKind: micro + runJobTemplate: /eng/pipelines/coreclr/templates/run-performance-job.yml + logicalmachine: 'perfampere' + experimentName: crossblocklocalassertionprop + timeoutInMinutes: 780 + # run coreclr cloudvm microbenchmarks perf job # this run is added temporarily for measuring AVX-512 performance - template: /eng/pipelines/common/platform-matrix.yml diff --git a/eng/pipelines/coreclr/templates/perf-job.yml b/eng/pipelines/coreclr/templates/perf-job.yml index a70612357cae3..051cd0cf8b2de 100644 --- a/eng/pipelines/coreclr/templates/perf-job.yml +++ b/eng/pipelines/coreclr/templates/perf-job.yml @@ -19,6 +19,7 @@ parameters: pgoRunType: '' physicalPromotionRunType: '' r2rRunType: '' + experimentName: '' javascriptEngine: 'NoJS' iOSLlvmBuild: 'False' iOSStripSymbols: 'False' @@ -41,8 +42,8 @@ jobs: - template: ${{ parameters.runJobTemplate }} parameters: # Compute job name from template parameters - jobName: ${{ format('perfbuild_{0}{1}_{2}_{3}_{4}_{5}_{6}_{7}_{8}_{9}_{10}_{11}_{12}_{13}_{14}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig, parameters.runtimeType, parameters.codeGenType, parameters.runKind, parameters.logicalMachine, parameters.javascriptEngine, parameters.pgoRunType, parameters.physicalPromotionRunType, parameters.r2rRunType, parameters.iosLlvmBuild, parameters.iosStripSymbols, parameters.hybridGlobalization) }} - displayName: ${{ format('Performance {0}{1} {2} {3} {4} {5} {6} {7} {8} {9} {10} {11} {12} {13} {14}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig, parameters.runtimeType, parameters.codeGenType, parameters.runKind, parameters.logicalMachine, parameters.javascriptEngine, parameters.pgoRunType, parameters.physicalPromotionRunType, parameters.r2rRunType, parameters.iosLlvmBuild, parameters.iosStripSymbols, parameters.hybridGlobalization) }} + jobName: ${{ format('perfbuild_{0}{1}_{2}_{3}_{4}_{5}_{6}_{7}_{8}_{9}_{10}_{11}_{12}_{13}_{14}_{15}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig, parameters.runtimeType, parameters.codeGenType, parameters.runKind, parameters.logicalMachine, parameters.javascriptEngine, parameters.pgoRunType, parameters.physicalPromotionRunType, parameters.r2rRunType, parameters.experimentName, parameters.iosLlvmBuild, parameters.iosStripSymbols, parameters.hybridGlobalization) }} + displayName: ${{ format('Performance {0}{1} {2} {3} {4} {5} {6} {7} {8} {9} {10} {11} {12} {13} {14} {15}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig, parameters.runtimeType, parameters.codeGenType, parameters.runKind, parameters.logicalMachine, parameters.javascriptEngine, parameters.pgoRunType, parameters.physicalPromotionRunType, parameters.r2rRunType, parameters.experimentName, parameters.iosLlvmBuild, parameters.iosStripSymbols, parameters.hybridGlobalization) }} pool: ${{ parameters.pool }} buildConfig: ${{ parameters.buildConfig }} archType: ${{ parameters.archType }} @@ -60,6 +61,7 @@ jobs: pgoRunType: ${{ parameters.pgoRunType }} physicalPromotionRunType: ${{ parameters.physicalPromotionRunType }} r2rRunType: ${{ parameters.r2rRunType }} + experimentName: ${{ parameters.experimentName }} javascriptEngine: ${{ parameters.javascriptEngine }} iosLlvmBuild: ${{ parameters.iosLlvmBuild }} iosStripSymbols: ${{ parameters.iosStripSymbols }} diff --git a/eng/pipelines/coreclr/templates/run-performance-job.yml b/eng/pipelines/coreclr/templates/run-performance-job.yml index ebad9c9f9ebc1..334c167abef3b 100644 --- a/eng/pipelines/coreclr/templates/run-performance-job.yml +++ b/eng/pipelines/coreclr/templates/run-performance-job.yml @@ -19,6 +19,7 @@ parameters: pgoRunType: '' # optional -- different PGO configurations physicalPromotionRunType: '' # optional -- different physical promotion configurations r2rRunType: '' # optional -- different R2R configurations + experimentName: '' # optional -- name of the experiment runtimeType: 'coreclr' # optional -- Sets the runtime as coreclr or mono codeGenType: 'JIT' # optional -- Decides on the codegen technology if running on mono projectFile: 'microbenchmarks.proj' # optional -- project file to build helix workitems @@ -165,11 +166,11 @@ jobs: _Framework: ${{ framework }} steps: - ${{ parameters.steps }} - - powershell: $(Build.SourcesDirectory)\eng\testing\performance\performance-setup.ps1 $(IsInternal)$(Interpreter) -Framework $(_Framework) -Kind ${{ parameters.runKind }} -LogicalMachine ${{ parameters.logicalMachine }} ${{ parameters.pgoRunType }} ${{ parameters.physicalPromotionRunType }} ${{ parameters.r2rRunType }} -UseLocalCommitTime ${{ parameters.extraSetupParameters }} + - powershell: $(Build.SourcesDirectory)\eng\testing\performance\performance-setup.ps1 $(IsInternal)$(Interpreter) -Framework $(_Framework) -Kind ${{ parameters.runKind }} -LogicalMachine ${{ parameters.logicalMachine }} ${{ parameters.pgoRunType }} ${{ parameters.physicalPromotionRunType }} ${{ parameters.r2rRunType }} -ExperimentName '${{ parameters.experimentName }}' -UseLocalCommitTime ${{ parameters.extraSetupParameters }} displayName: Performance Setup (Windows) condition: and(succeeded(), eq(variables['Agent.Os'], 'Windows_NT')) continueOnError: ${{ parameters.continueOnError }} - - script: $(Build.SourcesDirectory)/eng/testing/performance/performance-setup.sh $(IsInternal)$(Interpreter) --framework $(_Framework) --kind ${{ parameters.runKind }} --logicalmachine ${{ parameters.logicalMachine }} ${{ parameters.pgoRunType }} ${{ parameters.physicalPromotionRunType }} ${{ parameters.r2rRunType }} --uselocalcommittime ${{ parameters.extraSetupParameters }} + - script: $(Build.SourcesDirectory)/eng/testing/performance/performance-setup.sh $(IsInternal)$(Interpreter) --framework $(_Framework) --kind ${{ parameters.runKind }} --logicalmachine ${{ parameters.logicalMachine }} ${{ parameters.pgoRunType }} ${{ parameters.physicalPromotionRunType }} ${{ parameters.r2rRunType }} --experimentname '${{ parameters.experimentName }}' --uselocalcommittime ${{ parameters.extraSetupParameters }} displayName: Performance Setup (Unix) condition: and(succeeded(), ne(variables['Agent.Os'], 'Windows_NT')) continueOnError: ${{ parameters.continueOnError }} @@ -194,6 +195,6 @@ jobs: displayName: Publish Logs inputs: targetPath: $(Build.SourcesDirectory)/artifacts/log - artifactName: 'Performance_Run_$(osGroup)$(osSubgroup)_$(archType)_$(buildConfig)_${{ parameters.runtimeType }}_${{ parameters.codeGenType }}_${{ parameters.runKind }}_${{ parameters.logicalMachine }}_${{ parameters.javascriptEngine }}_${{ parameters.pgoRunType }}_${{ parameters.physicalPromotionRunType }}_${{ parameters.r2rRunType }}' + artifactName: 'Performance_Run_$(osGroup)$(osSubgroup)_$(archType)_$(buildConfig)_${{ parameters.runtimeType }}_${{ parameters.codeGenType }}_${{ parameters.runKind }}_${{ parameters.logicalMachine }}_${{ parameters.javascriptEngine }}_${{ parameters.pgoRunType }}_${{ parameters.physicalPromotionRunType }}_${{ parameters.r2rRunType }}_${{ parameters.experimentName }}' continueOnError: true condition: always() diff --git a/eng/pipelines/libraries/helix-queues-setup.yml b/eng/pipelines/libraries/helix-queues-setup.yml index 2c3ddd812dd38..3634e9c438a08 100644 --- a/eng/pipelines/libraries/helix-queues-setup.yml +++ b/eng/pipelines/libraries/helix-queues-setup.yml @@ -43,14 +43,14 @@ jobs: # Linux musl x64 - ${{ if eq(parameters.platform, 'linux_musl_x64') }}: - ${{ if or(ne(parameters.jobParameters.isExtraPlatforms, true), eq(parameters.jobParameters.includeAllPlatforms, true)) }}: - - (Alpine.315.Amd64.Open)Ubuntu.2204.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.15-helix-amd64 + - (Alpine.316.Amd64.Open)Ubuntu.2204.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.16-helix-amd64 - ${{ if or(eq(parameters.jobParameters.isExtraPlatforms, true), eq(parameters.jobParameters.includeAllPlatforms, true)) }}: - - (Alpine.317.Amd64.Open)Ubuntu.2204.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.17-helix-amd64 + - (Alpine.318.Amd64.Open)Ubuntu.2204.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.18-helix-amd64 # Linux musl arm64 - ${{ if and(eq(parameters.platform, 'linux_musl_arm64'), or(eq(parameters.jobParameters.isExtraPlatforms, true), eq(parameters.jobParameters.includeAllPlatforms, true))) }}: - - (Alpine.317.Arm64.Open)ubuntu.2004.armarch.open@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.17-helix-arm64v8 - - (Alpine.315.Arm64.Open)ubuntu.2004.armarch.open@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.15-helix-arm64v8 + - (Alpine.318.Arm64.Open)ubuntu.2004.armarch.open@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.18-helix-arm64v8 + - (Alpine.316.Arm64.Open)ubuntu.2004.armarch.open@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.16-helix-arm64v8 # Linux x64 - ${{ if eq(parameters.platform, 'linux_x64') }}: diff --git a/eng/pipelines/runtime-official.yml b/eng/pipelines/runtime-official.yml index 1ea372410ec5f..427e8ec5ea407 100644 --- a/eng/pipelines/runtime-official.yml +++ b/eng/pipelines/runtime-official.yml @@ -407,6 +407,7 @@ extends: platforms: - android_x64 - browser_wasm + - wasi_wasm - tvos_arm64 - ios_arm64 - maccatalyst_x64 @@ -428,15 +429,17 @@ extends: - linux_musl_arm64 jobParameters: buildArgs: -s mono+packs -c $(_BuildConfig) - /p:MonoCrossAOTTargetOS=android+browser /p:SkipMonoCrossJitConfigure=true /p:BuildMonoAOTCrossCompilerOnly=true + /p:MonoCrossAOTTargetOS=android+browser+wasi /p:SkipMonoCrossJitConfigure=true /p:BuildMonoAOTCrossCompilerOnly=true nameSuffix: CrossAOT_Mono runtimeVariant: crossaot dependsOn: - mono_android_offsets - mono_browser_offsets + - mono_wasi_offsets monoCrossAOTTargetOS: - android - browser + - wasi isOfficialBuild: ${{ variables.isOfficialBuild }} postBuildSteps: - template: /eng/pipelines/common/upload-intermediate-artifacts-step.yml @@ -453,15 +456,17 @@ extends: - windows_x64 jobParameters: buildArgs: -s mono+packs -c $(_BuildConfig) - /p:MonoCrossAOTTargetOS=android+browser /p:SkipMonoCrossJitConfigure=true /p:BuildMonoAOTCrossCompilerOnly=true + /p:MonoCrossAOTTargetOS=android+browser+wasi /p:SkipMonoCrossJitConfigure=true /p:BuildMonoAOTCrossCompilerOnly=true nameSuffix: CrossAOT_Mono runtimeVariant: crossaot dependsOn: - mono_android_offsets - mono_browser_offsets + - mono_wasi_offsets monoCrossAOTTargetOS: - android - browser + - wasi isOfficialBuild: ${{ variables.isOfficialBuild }} postBuildSteps: - template: /eng/pipelines/common/upload-intermediate-artifacts-step.yml @@ -478,18 +483,20 @@ extends: - osx_arm64 jobParameters: buildArgs: -s mono+packs -c $(_BuildConfig) - /p:MonoCrossAOTTargetOS=android+browser+tvos+ios+maccatalyst /p:SkipMonoCrossJitConfigure=true /p:BuildMonoAOTCrossCompilerOnly=true + /p:MonoCrossAOTTargetOS=android+browser+wasi+tvos+ios+maccatalyst /p:SkipMonoCrossJitConfigure=true /p:BuildMonoAOTCrossCompilerOnly=true nameSuffix: CrossAOT_Mono runtimeVariant: crossaot dependsOn: - mono_android_offsets - mono_browser_offsets + - mono_wasi_offsets - mono_tvos_offsets - mono_ios_offsets - mono_maccatalyst_offsets monoCrossAOTTargetOS: - android - browser + - wasi - tvos - ios - maccatalyst diff --git a/eng/pipelines/runtime.yml b/eng/pipelines/runtime.yml index 21568cd53c8ab..206b51f1f02ee 100644 --- a/eng/pipelines/runtime.yml +++ b/eng/pipelines/runtime.yml @@ -441,6 +441,7 @@ extends: platforms: - android_x64 - browser_wasm + - wasi_wasm - tvos_arm64 - ios_arm64 - maccatalyst_x64 @@ -930,9 +931,11 @@ extends: dependsOn: - mono_android_offsets - mono_browser_offsets + - mono_wasi_offsets monoCrossAOTTargetOS: - android - browser + - wasi condition: >- or( eq(dependencies.evaluate_paths.outputs['SetPathVars_mono_excluding_wasm.containsChange'], true), @@ -952,12 +955,14 @@ extends: dependsOn: - mono_android_offsets - mono_browser_offsets + - mono_wasi_offsets - mono_tvos_offsets - mono_ios_offsets - mono_maccatalyst_offsets monoCrossAOTTargetOS: - android - browser + - wasi - tvos - ios - maccatalyst diff --git a/eng/testing/performance/performance-setup.ps1 b/eng/testing/performance/performance-setup.ps1 index 91dc5c8f08bcd..56ade2711834f 100644 --- a/eng/testing/performance/performance-setup.ps1 +++ b/eng/testing/performance/performance-setup.ps1 @@ -26,6 +26,7 @@ Param( [switch] $NoDynamicPGO, [switch] $PhysicalPromotion, [switch] $NoR2R, + [string] $ExperimentName, [switch] $iOSLlvmBuild, [switch] $iOSStripSymbols, [switch] $HybridGlobalization, @@ -97,6 +98,10 @@ if ($NoR2R) { $Configurations += " R2RType=nor2r" } +if ($ExperimentName) { + $Configurations += " ExperimentName=$ExperimentName" +} + if ($iOSMono) { $Configurations += " iOSLlvmBuild=$iOSLlvmBuild" $Configurations += " iOSStripSymbols=$iOSStripSymbols" @@ -131,6 +136,10 @@ if ($NoR2R) { $SetupArguments = "$SetupArguments --no-r2r" } +if ($ExperimentName) { + $SetupArguments = "$SetupArguments --experiment-name '$ExperimentName'" +} + if ($UseLocalCommitTime) { $LocalCommitTime = (git show -s --format=%ci $CommitSha) $SetupArguments = "$SetupArguments --commit-time `"$LocalCommitTime`"" diff --git a/eng/testing/performance/performance-setup.sh b/eng/testing/performance/performance-setup.sh index 4f4367566284b..fdc9a7d23ec53 100755 --- a/eng/testing/performance/performance-setup.sh +++ b/eng/testing/performance/performance-setup.sh @@ -161,6 +161,10 @@ while (($# > 0)); do nor2r=true shift 1 ;; + --experimentname) + experimentname=$2 + shift 2 + ;; --compare) compare=true shift 1 @@ -254,6 +258,7 @@ while (($# > 0)); do echo " --nodynamicpgo Set for No dynamic PGO runs" echo " --physicalpromotion Set for runs with physical promotion" echo " --nor2r Set for No R2R runs" + echo " --experimentname Set Experiment Name" echo "" exit 1 ;; @@ -380,6 +385,10 @@ if [[ "$nor2r" == "true" ]]; then configurations="$configurations R2RType=nor2r" fi +if [[ ! -z "$experimentname" ]]; then + configurations="$configurations ExperimentName=$experimentname" +fi + if [[ "$(echo "$hybridglobalization" | tr '[:upper:]' '[:lower:]')" == "true" ]]; then # convert to lowercase to test configurations="$configurations HybridGlobalization=True" # Force True for consistency fi @@ -479,6 +488,10 @@ if [[ "$nor2r" == "true" ]]; then setup_arguments="$setup_arguments --no-r2r" fi +if [[ ! -z "$experimentname" ]]; then + setup_arguments="$setup_arguments --experiment-name '$experimentname'" +fi + if [[ "$monoaot" == "true" ]]; then monoaot_dotnet_path=$payload_directory/monoaot mv $monoaot_path $monoaot_dotnet_path diff --git a/eng/testing/tests.browser.targets b/eng/testing/tests.browser.targets index 2b383ef15054e..cb82e2c5f51d5 100644 --- a/eng/testing/tests.browser.targets +++ b/eng/testing/tests.browser.targets @@ -354,30 +354,4 @@ *******************" /> - - - - - <_AOTCrossNuGetPath>$(LibrariesShippingPackagesDir)Microsoft.NETCore.App.Runtime.AOT.$(NETCoreSdkRuntimeIdentifier).Cross.$(RuntimeIdentifier).$(PackageVersionForWorkloadManifests).nupkg - - - - <_NuGetsToBuild Include="$(LibrariesShippingPackagesDir)Microsoft.NETCore.App.Ref.$(PackageVersionForWorkloadManifests).nupkg" - Project="$(InstallerProjectRoot)pkg/sfx/Microsoft.NETCore.App\Microsoft.NETCore.App.Ref.sfxproj" - Properties="@(_DefaultPropsForNuGetBuild, ';')" - Descriptor="Ref pack"/> - - - <_PropsForAOTCrossBuild Include="@(_DefaultPropsForNuGetBuild)" /> - <_PropsForAOTCrossBuild Include="TestingWorkloads=true" /> - <_PropsForAOTCrossBuild Include="RuntimeIdentifier=$(NETCoreSdkRuntimeIdentifier)" /> - <_PropsForAOTCrossBuild Include="TargetCrossRid=$(RuntimeIdentifier)" /> - <_PropsForAOTCrossBuild Include="DisableSourceLink=true" /> - - <_NuGetsToBuild Include="$(_AOTCrossNuGetPath)" - Project="$(InstallerProjectRoot)pkg/sfx/Microsoft.NETCore.App\Microsoft.NETCore.App.MonoCrossAOT.sfxproj" - Properties="@(_PropsForAOTCrossBuild,';')" - Descriptor="AOT Cross compiler"/> - - diff --git a/eng/testing/tests.wasi.targets b/eng/testing/tests.wasi.targets index c63e05e65e9aa..4229d04241c8b 100644 --- a/eng/testing/tests.wasi.targets +++ b/eng/testing/tests.wasi.targets @@ -10,6 +10,7 @@ _GetWorkloadsToInstall;$(GetWorkloadInputsDependsOn) + _GetNugetsForAOT;$(GetNuGetsToBuildForWorkloadTestingDependsOn) $([MSBuild]::NormalizeDirectory($(MonoProjectRoot), 'wasi', 'wasi-sdk')) diff --git a/eng/testing/tests.wasm.targets b/eng/testing/tests.wasm.targets index 4dc6b71005449..ee09843f860d9 100644 --- a/eng/testing/tests.wasm.targets +++ b/eng/testing/tests.wasm.targets @@ -181,4 +181,30 @@ + + + + + <_AOTCrossNuGetPath>$(LibrariesShippingPackagesDir)Microsoft.NETCore.App.Runtime.AOT.$(NETCoreSdkRuntimeIdentifier).Cross.$(RuntimeIdentifier).$(PackageVersionForWorkloadManifests).nupkg + + + + <_NuGetsToBuild Include="$(LibrariesShippingPackagesDir)Microsoft.NETCore.App.Ref.$(PackageVersionForWorkloadManifests).nupkg" + Project="$(InstallerProjectRoot)pkg/sfx/Microsoft.NETCore.App\Microsoft.NETCore.App.Ref.sfxproj" + Properties="@(_DefaultPropsForNuGetBuild, ';')" + Descriptor="Ref pack"/> + + + <_PropsForAOTCrossBuild Include="@(_DefaultPropsForNuGetBuild)" /> + <_PropsForAOTCrossBuild Include="TestingWorkloads=true" /> + <_PropsForAOTCrossBuild Include="RuntimeIdentifier=$(NETCoreSdkRuntimeIdentifier)" /> + <_PropsForAOTCrossBuild Include="TargetCrossRid=$(RuntimeIdentifier)" /> + <_PropsForAOTCrossBuild Include="DisableSourceLink=true" /> + + <_NuGetsToBuild Include="$(_AOTCrossNuGetPath)" + Project="$(InstallerProjectRoot)pkg/sfx/Microsoft.NETCore.App\Microsoft.NETCore.App.MonoCrossAOT.sfxproj" + Properties="@(_PropsForAOTCrossBuild,';')" + Descriptor="AOT Cross compiler"/> + + diff --git a/global.json b/global.json index d1a23bfc745ec..7421bc5fc393e 100644 --- a/global.json +++ b/global.json @@ -1,16 +1,16 @@ { "sdk": { - "version": "8.0.100-rtm.23506.1", + "version": "8.0.100", "allowPrerelease": true, "rollForward": "major" }, "tools": { - "dotnet": "8.0.100-rtm.23506.1" + "dotnet": "8.0.100" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.23559.3", - "Microsoft.DotNet.Helix.Sdk": "9.0.0-beta.23559.3", - "Microsoft.DotNet.SharedFramework.Sdk": "9.0.0-beta.23559.3", + "Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.23565.1", + "Microsoft.DotNet.Helix.Sdk": "9.0.0-beta.23565.1", + "Microsoft.DotNet.SharedFramework.Sdk": "9.0.0-beta.23565.1", "Microsoft.Build.NoTargets": "3.7.0", "Microsoft.Build.Traversal": "3.4.0", "Microsoft.NET.Sdk.IL": "9.0.0-alpha.1.23529.4" diff --git a/src/coreclr/System.Private.CoreLib/src/System/ArgIterator.cs b/src/coreclr/System.Private.CoreLib/src/System/ArgIterator.cs index 42475075fcbdc..4256112ea3eb6 100644 --- a/src/coreclr/System.Private.CoreLib/src/System/ArgIterator.cs +++ b/src/coreclr/System.Private.CoreLib/src/System/ArgIterator.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Runtime.InteropServices; using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; namespace System { diff --git a/src/coreclr/System.Private.CoreLib/src/System/Array.CoreCLR.cs b/src/coreclr/System.Private.CoreLib/src/System/Array.CoreCLR.cs index 699f99c441fdf..ed56ad4b4b686 100644 --- a/src/coreclr/System.Private.CoreLib/src/System/Array.CoreCLR.cs +++ b/src/coreclr/System.Private.CoreLib/src/System/Array.CoreCLR.cs @@ -4,7 +4,6 @@ using System.Collections; using System.Collections.Generic; using System.Diagnostics; -using System.Diagnostics.CodeAnalysis; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; @@ -15,9 +14,25 @@ namespace System // IList and IReadOnlyList, where T : U dynamically. See the SZArrayHelper class for details. public abstract partial class Array : ICloneable, IList, IStructuralComparable, IStructuralEquatable { - [MethodImpl(MethodImplOptions.InternalCall)] - private static extern unsafe Array InternalCreate(RuntimeType elementType, int rank, int* pLengths, int* pLowerBounds); + [LibraryImport(RuntimeHelpers.QCall, EntryPoint = "Array_CreateInstance")] + private static unsafe partial void InternalCreate(QCallTypeHandle type, int rank, int* pLengths, int* pLowerBounds, + [MarshalAs(UnmanagedType.Bool)] bool fromArrayType, ObjectHandleOnStack retArray); + + private static unsafe Array InternalCreate(RuntimeType elementType, int rank, int* pLengths, int* pLowerBounds) + { + Array? retArray = null; + InternalCreate(new QCallTypeHandle(ref elementType), rank, pLengths, pLowerBounds, + fromArrayType: false, ObjectHandleOnStack.Create(ref retArray)); + return retArray!; + } + private static unsafe Array InternalCreateFromArrayType(RuntimeType arrayType, int rank, int* pLengths, int* pLowerBounds) + { + Array? retArray = null; + InternalCreate(new QCallTypeHandle(ref arrayType), rank, pLengths, pLowerBounds, + fromArrayType: true, ObjectHandleOnStack.Create(ref retArray)); + return retArray!; + } private static unsafe void CopyImpl(Array sourceArray, int sourceIndex, Array destinationArray, int destinationIndex, int length, bool reliable) { diff --git a/src/coreclr/System.Private.CoreLib/src/System/Collections/Generic/ArraySortHelper.CoreCLR.cs b/src/coreclr/System.Private.CoreLib/src/System/Collections/Generic/ArraySortHelper.CoreCLR.cs index 9903731a5e0ec..9ccfd2864ee03 100644 --- a/src/coreclr/System.Private.CoreLib/src/System/Collections/Generic/ArraySortHelper.CoreCLR.cs +++ b/src/coreclr/System.Private.CoreLib/src/System/Collections/Generic/ArraySortHelper.CoreCLR.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Runtime.CompilerServices; using System.Diagnostics.CodeAnalysis; +using System.Runtime.CompilerServices; namespace System.Collections.Generic { diff --git a/src/coreclr/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.CoreCLR.cs b/src/coreclr/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.CoreCLR.cs index bd4532bad2385..3fa3a14abffa3 100644 --- a/src/coreclr/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.CoreCLR.cs +++ b/src/coreclr/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.CoreCLR.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Runtime.CompilerServices; using System.Diagnostics; +using System.Runtime.CompilerServices; namespace System.Collections.Generic { diff --git a/src/coreclr/System.Private.CoreLib/src/System/Diagnostics/StackFrame.CoreCLR.cs b/src/coreclr/System.Private.CoreLib/src/System/Diagnostics/StackFrame.CoreCLR.cs index 76f445e12940d..b68e4f2884b29 100644 --- a/src/coreclr/System.Private.CoreLib/src/System/Diagnostics/StackFrame.CoreCLR.cs +++ b/src/coreclr/System.Private.CoreLib/src/System/Diagnostics/StackFrame.CoreCLR.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Text; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; +using System.Text; namespace System.Diagnostics { diff --git a/src/coreclr/System.Private.CoreLib/src/System/Diagnostics/StackFrameHelper.cs b/src/coreclr/System.Private.CoreLib/src/System/Diagnostics/StackFrameHelper.cs index 62153a43a36d3..3e9d722d98eff 100644 --- a/src/coreclr/System.Private.CoreLib/src/System/Diagnostics/StackFrameHelper.cs +++ b/src/coreclr/System.Private.CoreLib/src/System/Diagnostics/StackFrameHelper.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Threading; -using System.Reflection; using System.Diagnostics.CodeAnalysis; +using System.Reflection; +using System.Threading; namespace System.Diagnostics { diff --git a/src/coreclr/System.Private.CoreLib/src/System/Diagnostics/StackTrace.CoreCLR.cs b/src/coreclr/System.Private.CoreLib/src/System/Diagnostics/StackTrace.CoreCLR.cs index 9bef9fb72fae5..26e002f990118 100644 --- a/src/coreclr/System.Private.CoreLib/src/System/Diagnostics/StackTrace.CoreCLR.cs +++ b/src/coreclr/System.Private.CoreLib/src/System/Diagnostics/StackTrace.CoreCLR.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Runtime.CompilerServices; using System.Reflection; +using System.Runtime.CompilerServices; namespace System.Diagnostics { diff --git a/src/coreclr/System.Private.CoreLib/src/System/GC.CoreCLR.cs b/src/coreclr/System.Private.CoreLib/src/System/GC.CoreCLR.cs index e3e091bb872a2..0fd7354ce6448 100644 --- a/src/coreclr/System.Private.CoreLib/src/System/GC.CoreCLR.cs +++ b/src/coreclr/System.Private.CoreLib/src/System/GC.CoreCLR.cs @@ -12,12 +12,12 @@ ** ===========================================================*/ -using System.Diagnostics; using System.Collections.Generic; +using System.Diagnostics; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -using System.Threading; using System.Runtime.Versioning; +using System.Threading; namespace System { diff --git a/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/DynamicILGenerator.cs b/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/DynamicILGenerator.cs index 0c920d1ea12bd..2b695f1baf5b0 100644 --- a/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/DynamicILGenerator.cs +++ b/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/DynamicILGenerator.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Diagnostics.SymbolStore; -using System.Runtime.InteropServices; using System.Collections.Generic; using System.Diagnostics; +using System.Diagnostics.SymbolStore; +using System.Runtime.InteropServices; namespace System.Reflection.Emit { diff --git a/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/DynamicMethod.CoreCLR.cs b/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/DynamicMethod.CoreCLR.cs index 0a4ebb1c5140c..1e3242cc0fbe1 100644 --- a/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/DynamicMethod.CoreCLR.cs +++ b/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/DynamicMethod.CoreCLR.cs @@ -4,8 +4,8 @@ using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Globalization; -using System.Runtime.InteropServices; using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; using System.Runtime.Loader; using System.Text; using System.Threading; diff --git a/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/RuntimeTypeBuilder.cs b/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/RuntimeTypeBuilder.cs index 5e56b46210497..66733667c3af0 100644 --- a/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/RuntimeTypeBuilder.cs +++ b/src/coreclr/System.Private.CoreLib/src/System/Reflection/Emit/RuntimeTypeBuilder.cs @@ -4,8 +4,8 @@ using System.Collections.Generic; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; -using System.Runtime.InteropServices; using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; using CultureInfo = System.Globalization.CultureInfo; namespace System.Reflection.Emit diff --git a/src/coreclr/System.Private.CoreLib/src/System/Reflection/LoaderAllocator.cs b/src/coreclr/System.Private.CoreLib/src/System/Reflection/LoaderAllocator.cs index 166485dc95b88..75c219d647ccf 100644 --- a/src/coreclr/System.Private.CoreLib/src/System/Reflection/LoaderAllocator.cs +++ b/src/coreclr/System.Private.CoreLib/src/System/Reflection/LoaderAllocator.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Runtime.InteropServices; using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; namespace System.Reflection { diff --git a/src/coreclr/System.Private.CoreLib/src/System/Reflection/MdImport.cs b/src/coreclr/System.Private.CoreLib/src/System/Reflection/MdImport.cs index 9b8ac3570d5bf..d1944cbbf77ce 100644 --- a/src/coreclr/System.Private.CoreLib/src/System/Reflection/MdImport.cs +++ b/src/coreclr/System.Private.CoreLib/src/System/Reflection/MdImport.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Globalization; using System.Diagnostics; +using System.Globalization; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; diff --git a/src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimeAssembly.cs b/src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimeAssembly.cs index ba79f771324b0..b3d09ade688e1 100644 --- a/src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimeAssembly.cs +++ b/src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimeAssembly.cs @@ -1,20 +1,20 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.ComponentModel; using System.Collections.Generic; +using System.ComponentModel; +using System.Configuration.Assemblies; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; -using CultureInfo = System.Globalization.CultureInfo; using System.IO; -using System.Configuration.Assemblies; -using StackCrawlMark = System.Threading.StackCrawlMark; -using System.Runtime.Loader; -using System.Runtime.InteropServices; using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Runtime.Loader; using System.Runtime.Serialization; -using System.Threading; using System.Security; +using System.Threading; +using CultureInfo = System.Globalization.CultureInfo; +using StackCrawlMark = System.Threading.StackCrawlMark; namespace System.Reflection { diff --git a/src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimeModule.cs b/src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimeModule.cs index 5d4097807b052..f1a991eb6c6ba 100644 --- a/src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimeModule.cs +++ b/src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimeModule.cs @@ -1,12 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Collections.Generic; using System.ComponentModel; using System.Diagnostics.CodeAnalysis; +using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Serialization; -using System.Collections.Generic; -using System.Runtime.CompilerServices; namespace System.Reflection { diff --git a/src/coreclr/System.Private.CoreLib/src/System/Runtime/DependentHandle.cs b/src/coreclr/System.Private.CoreLib/src/System/Runtime/DependentHandle.cs index 027c41ae7533e..ee7a472b02410 100644 --- a/src/coreclr/System.Private.CoreLib/src/System/Runtime/DependentHandle.cs +++ b/src/coreclr/System.Private.CoreLib/src/System/Runtime/DependentHandle.cs @@ -71,7 +71,7 @@ public DependentHandle(object? target, object? dependent) /// and has not yet been disposed. /// /// This property is thread-safe. - public bool IsAllocated => (nint)_handle != 0; + public readonly bool IsAllocated => (nint)_handle != 0; /// /// Gets or sets the target object instance for the current handle. The target can only be set to a value @@ -83,7 +83,7 @@ public DependentHandle(object? target, object? dependent) /// This property is thread-safe. public object? Target { - get + readonly get { IntPtr handle = _handle; @@ -120,7 +120,7 @@ public object? Target /// This property is thread-safe. public object? Dependent { - get + readonly get { IntPtr handle = _handle; @@ -154,7 +154,7 @@ public object? Dependent /// The values of and . /// Thrown if is . /// This property is thread-safe. - public (object? Target, object? Dependent) TargetAndDependent + public readonly (object? Target, object? Dependent) TargetAndDependent { get { @@ -176,7 +176,7 @@ public object? Dependent /// /// The target object instance, if present. /// This method mirrors , but without the allocation check. - internal object? UnsafeGetTarget() + internal readonly object? UnsafeGetTarget() { return InternalGetTarget(_handle); } @@ -191,7 +191,7 @@ public object? Dependent /// The signature is also kept the same as the one for the internal call, to improve the codegen. /// Note that is required to be on the stack (or it might not be tracked). /// - internal object? UnsafeGetTargetAndDependent(out object? dependent) + internal readonly object? UnsafeGetTargetAndDependent(out object? dependent) { return InternalGetTargetAndDependent(_handle, out dependent); } @@ -200,7 +200,7 @@ public object? Dependent /// Sets the dependent object instance for the current handle to . /// /// This method mirrors the setter, but without allocation and input checks. - internal void UnsafeSetTargetToNull() + internal readonly void UnsafeSetTargetToNull() { InternalSetTargetToNull(_handle); } @@ -209,7 +209,7 @@ internal void UnsafeSetTargetToNull() /// Sets the dependent object instance for the current handle. /// /// This method mirrors , but without the allocation check. - internal void UnsafeSetDependent(object? dependent) + internal readonly void UnsafeSetDependent(object? dependent) { InternalSetDependent(_handle, dependent); } diff --git a/src/coreclr/System.Private.CoreLib/src/System/Runtime/ExceptionServices/InternalCalls.cs b/src/coreclr/System.Private.CoreLib/src/System/Runtime/ExceptionServices/InternalCalls.cs index 563c5b3704119..6a6a9a332d59e 100644 --- a/src/coreclr/System.Private.CoreLib/src/System/Runtime/ExceptionServices/InternalCalls.cs +++ b/src/coreclr/System.Private.CoreLib/src/System/Runtime/ExceptionServices/InternalCalls.cs @@ -5,8 +5,8 @@ // This is where we group together all the internal calls. // -using System.Runtime.InteropServices; using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; namespace System.Runtime.ExceptionServices { diff --git a/src/coreclr/System.Private.CoreLib/src/System/Runtime/InteropServices/ComWrappers.cs b/src/coreclr/System.Private.CoreLib/src/System/Runtime/InteropServices/ComWrappers.cs index 9a334d044d5d7..ebe5db7df86a6 100644 --- a/src/coreclr/System.Private.CoreLib/src/System/Runtime/InteropServices/ComWrappers.cs +++ b/src/coreclr/System.Private.CoreLib/src/System/Runtime/InteropServices/ComWrappers.cs @@ -4,9 +4,9 @@ using System; using System.Collections; using System.Diagnostics.CodeAnalysis; -using System.Threading; using System.Runtime.CompilerServices; using System.Runtime.Versioning; +using System.Threading; namespace System.Runtime.InteropServices { diff --git a/src/coreclr/System.Private.CoreLib/src/System/Runtime/InteropServices/ObjectiveCMarshal.CoreCLR.cs b/src/coreclr/System.Private.CoreLib/src/System/Runtime/InteropServices/ObjectiveCMarshal.CoreCLR.cs index f2435b927e982..241df40763fa1 100644 --- a/src/coreclr/System.Private.CoreLib/src/System/Runtime/InteropServices/ObjectiveCMarshal.CoreCLR.cs +++ b/src/coreclr/System.Private.CoreLib/src/System/Runtime/InteropServices/ObjectiveCMarshal.CoreCLR.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Diagnostics; -using System.Runtime.Versioning; using System.Runtime.CompilerServices; +using System.Runtime.Versioning; namespace System.Runtime.InteropServices.ObjectiveC { diff --git a/src/coreclr/System.Private.CoreLib/src/System/StartupHookProvider.CoreCLR.cs b/src/coreclr/System.Private.CoreLib/src/System/StartupHookProvider.CoreCLR.cs index 8afaddc63b45e..7809d7b355fde 100644 --- a/src/coreclr/System.Private.CoreLib/src/System/StartupHookProvider.CoreCLR.cs +++ b/src/coreclr/System.Private.CoreLib/src/System/StartupHookProvider.CoreCLR.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; using System.Diagnostics; -using System.Diagnostics.Tracing; using System.Diagnostics.CodeAnalysis; +using System.Diagnostics.Tracing; using System.IO; using System.Reflection; using System.Runtime.Loader; diff --git a/src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs b/src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs index 431c2f724a02b..3f7527f06cfc2 100644 --- a/src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs +++ b/src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Text; -using System.Runtime.InteropServices; -using System.Runtime.CompilerServices; using System.Diagnostics; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Text; namespace System.StubHelpers { diff --git a/src/coreclr/System.Private.CoreLib/src/System/TypeLoadException.CoreCLR.cs b/src/coreclr/System.Private.CoreLib/src/System/TypeLoadException.CoreCLR.cs index e755ec061a806..4de0449e86958 100644 --- a/src/coreclr/System.Private.CoreLib/src/System/TypeLoadException.CoreCLR.cs +++ b/src/coreclr/System.Private.CoreLib/src/System/TypeLoadException.CoreCLR.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Runtime.InteropServices; using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; namespace System { diff --git a/src/coreclr/classlibnative/bcltype/arraynative.cpp b/src/coreclr/classlibnative/bcltype/arraynative.cpp index 6faf613c3cf06..0c1afdcbfd8b7 100644 --- a/src/coreclr/classlibnative/bcltype/arraynative.cpp +++ b/src/coreclr/classlibnative/bcltype/arraynative.cpp @@ -720,14 +720,8 @@ FCIMPLEND // Check we're allowed to create an array with the given element type. -void ArrayNative::CheckElementType(TypeHandle elementType) +static void CheckElementType(TypeHandle elementType) { - // Checks apply recursively for arrays of arrays etc. - while (elementType.IsArray()) - { - elementType = elementType.GetArrayElementTypeHandle(); - } - // Check for simple types first. if (!elementType.IsTypeDesc()) { @@ -738,7 +732,7 @@ void ArrayNative::CheckElementType(TypeHandle elementType) COMPlusThrow(kNotSupportedException, W("NotSupported_ByRefLikeArray")); // Check for open generic types. - if (pMT->IsGenericTypeDefinition() || pMT->ContainsGenericVariables()) + if (pMT->ContainsGenericVariables()) COMPlusThrow(kNotSupportedException, W("NotSupported_OpenType")); // Check for Void. @@ -753,62 +747,67 @@ void ArrayNative::CheckElementType(TypeHandle elementType) } } -FCIMPL4(Object*, ArrayNative::CreateInstance, ReflectClassBaseObject* pElementTypeUNSAFE, INT32 rank, INT32* pLengths, INT32* pLowerBounds) +void QCALLTYPE Array_CreateInstance(QCall::TypeHandle pTypeHnd, INT32 rank, INT32* pLengths, INT32* pLowerBounds, BOOL createFromArrayType, QCall::ObjectHandleOnStack retArray) { CONTRACTL { - FCALL_CHECK; + QCALL_CHECK; PRECONDITION(rank > 0); PRECONDITION(CheckPointer(pLengths)); PRECONDITION(CheckPointer(pLowerBounds, NULL_OK)); } CONTRACTL_END; - OBJECTREF pRet = NULL; - - REFLECTCLASSBASEREF pElementType = (REFLECTCLASSBASEREF)ObjectToOBJECTREF(pElementTypeUNSAFE); - - // pLengths and pLowerBounds are pinned buffers. No need to protect them. - HELPER_METHOD_FRAME_BEGIN_RET_PROTECT(pElementType); - - TypeHandle elementType(pElementType->GetType()); + BEGIN_QCALL; - CheckElementType(elementType); + TypeHandle typeHnd = pTypeHnd.AsTypeHandle(); - CorElementType CorType = elementType.GetSignatureCorElementType(); + if (createFromArrayType) + { + _ASSERTE((INT32)typeHnd.GetRank() == rank); + _ASSERTE(typeHnd.IsArray()); - CorElementType kind = ELEMENT_TYPE_ARRAY; + if (typeHnd.GetArrayElementTypeHandle().ContainsGenericVariables()) + COMPlusThrow(kNotSupportedException, W("NotSupported_OpenType")); - // Is it ELEMENT_TYPE_SZARRAY array? - if (rank == 1 && (pLowerBounds == NULL || pLowerBounds[0] == 0) -#ifdef FEATURE_64BIT_ALIGNMENT - // On platforms where 64-bit types require 64-bit alignment and don't obtain it naturally force us - // through the slow path where this will be handled. - && (CorType != ELEMENT_TYPE_I8) - && (CorType != ELEMENT_TYPE_U8) - && (CorType != ELEMENT_TYPE_R8) -#endif - ) - { - // Shortcut for common cases - if (CorTypeInfo::IsPrimitiveType(CorType)) + if (!typeHnd.AsMethodTable()->IsMultiDimArray()) { - pRet = AllocatePrimitiveArray(CorType,pLengths[0]); + _ASSERTE(pLowerBounds == NULL || pLowerBounds[0] == 0); + + GCX_COOP(); + retArray.Set(AllocateSzArray(typeHnd, pLengths[0])); goto Done; } - else - if (CorTypeInfo::IsObjRef(CorType)) + } + else + { + CheckElementType(typeHnd); + + // Is it ELEMENT_TYPE_SZARRAY array? + if (rank == 1 && (pLowerBounds == NULL || pLowerBounds[0] == 0)) { - pRet = AllocateObjectArray(pLengths[0],elementType); - goto Done; + CorElementType corType = typeHnd.GetSignatureCorElementType(); + + // Shortcut for common cases + if (CorTypeInfo::IsPrimitiveType(corType)) + { + GCX_COOP(); + retArray.Set(AllocatePrimitiveArray(corType, pLengths[0])); + goto Done; + } + + typeHnd = ClassLoader::LoadArrayTypeThrowing(typeHnd); + + { + GCX_COOP(); + retArray.Set(AllocateSzArray(typeHnd, pLengths[0])); + goto Done; + } } - kind = ELEMENT_TYPE_SZARRAY; - pLowerBounds = NULL; + // Find the Array class... + typeHnd = ClassLoader::LoadArrayTypeThrowing(typeHnd, ELEMENT_TYPE_ARRAY, rank); } { - // Find the Array class... - TypeHandle typeHnd = ClassLoader::LoadArrayTypeThrowing(elementType, kind, rank); - _ASSERTE(rank <= MAX_RANK); // Ensures that the stack buffer size allocations below won't overflow DWORD boundsSize = 0; @@ -834,15 +833,15 @@ FCIMPL4(Object*, ArrayNative::CreateInstance, ReflectClassBaseObject* pElementTy bounds[i] = pLengths[i]; } - pRet = AllocateArrayEx(typeHnd, bounds, boundsSize); + { + GCX_COOP(); + retArray.Set(AllocateArrayEx(typeHnd, bounds, boundsSize)); + } } Done: ; - HELPER_METHOD_FRAME_END(); - - return OBJECTREFToObject(pRet); + END_QCALL; } -FCIMPLEND FCIMPL3(void, ArrayNative::SetValue, ArrayBase* refThisUNSAFE, Object* objUNSAFE, INT_PTR flattenedIndex) { diff --git a/src/coreclr/classlibnative/bcltype/arraynative.h b/src/coreclr/classlibnative/bcltype/arraynative.h index 84218d698571f..fae3038469368 100644 --- a/src/coreclr/classlibnative/bcltype/arraynative.h +++ b/src/coreclr/classlibnative/bcltype/arraynative.h @@ -30,8 +30,6 @@ class ArrayNative static FCDECL2(FC_BOOL_RET, IsSimpleCopy, ArrayBase* pSrc, ArrayBase* pDst); static FCDECL5(void, CopySlow, ArrayBase* pSrc, INT32 iSrcIndex, ArrayBase* pDst, INT32 iDstIndex, INT32 iLength); - static FCDECL4(Object*, CreateInstance, ReflectClassBaseObject* pElementTypeUNSAFE, INT32 rank, INT32* pLengths, INT32* pBounds); - // This set of methods will set a value in an array static FCDECL3(void, SetValue, ArrayBase* refThisUNSAFE, Object* objUNSAFE, INT_PTR flattenedIndex); @@ -44,9 +42,6 @@ class ArrayNative static FCDECL3_VVI(void*, GetSpanDataFrom, FCALLRuntimeFieldHandle structField, FCALLRuntimeTypeHandle targetTypeUnsafe, INT32* count); private: - // Helper for CreateInstance - static void CheckElementType(TypeHandle elementType); - // Return values for CanAssignArrayType enum AssignArrayEnum { @@ -66,6 +61,7 @@ class ArrayNative }; +extern "C" void QCALLTYPE Array_CreateInstance(QCall::TypeHandle pTypeHnd, INT32 rank, INT32* pLengths, INT32* pBounds, BOOL createFromArrayType, QCall::ObjectHandleOnStack retArray); extern "C" PCODE QCALLTYPE Array_GetElementConstructorEntrypoint(QCall::TypeHandle pArrayTypeHnd); #endif // _ARRAYNATIVE_H_ diff --git a/src/coreclr/clrdefinitions.cmake b/src/coreclr/clrdefinitions.cmake index 03615c9106bd0..c180198a4db4a 100644 --- a/src/coreclr/clrdefinitions.cmake +++ b/src/coreclr/clrdefinitions.cmake @@ -14,6 +14,8 @@ elseif (CLR_CMAKE_TARGET_ARCH_ARM) add_definitions(-D_ARM_WORKAROUND_) endif (CLR_CMAKE_HOST_WIN32 AND NOT DEFINED CLR_CROSS_COMPONENTS_BUILD) add_definitions(-DFEATURE_EMULATE_SINGLESTEP) +elseif (CLR_CMAKE_TARGET_ARCH_RISCV64) + add_definitions(-DFEATURE_EMULATE_SINGLESTEP) endif (CLR_CMAKE_TARGET_ARCH_ARM64) if (CLR_CMAKE_TARGET_UNIX) diff --git a/src/coreclr/debug/ee/controller.cpp b/src/coreclr/debug/ee/controller.cpp index 94714b9457063..5edff15a9f7ed 100644 --- a/src/coreclr/debug/ee/controller.cpp +++ b/src/coreclr/debug/ee/controller.cpp @@ -3202,7 +3202,7 @@ void DebuggerController::ApplyTraceFlag(Thread *thread) g_pEEInterface->MarkThreadForDebugStepping(thread, true); LOG((LF_CORDB,LL_INFO1000, "DC::ApplyTraceFlag marked thread for debug stepping\n")); - SetSSFlag(reinterpret_cast(context) ARM_ARG(thread) ARM64_ARG(thread)); + SetSSFlag(reinterpret_cast(context) ARM_ARG(thread) ARM64_ARG(thread) RISCV64_ARG(thread)); } // @@ -3239,7 +3239,7 @@ void DebuggerController::UnapplyTraceFlag(Thread *thread) // Always need to unmark for stepping g_pEEInterface->MarkThreadForDebugStepping(thread, false); - UnsetSSFlag(reinterpret_cast(context) ARM_ARG(thread) ARM64_ARG(thread)); + UnsetSSFlag(reinterpret_cast(context) ARM_ARG(thread) ARM64_ARG(thread) RISCV64_ARG(thread)); } void DebuggerController::EnableExceptionHook() diff --git a/src/coreclr/debug/ee/debugger.cpp b/src/coreclr/debug/ee/debugger.cpp index dedc8d652c215..538173c04b852 100644 --- a/src/coreclr/debug/ee/debugger.cpp +++ b/src/coreclr/debug/ee/debugger.cpp @@ -15770,7 +15770,7 @@ BOOL Debugger::IsThreadContextInvalid(Thread *pThread, CONTEXT *pCtx) if (success) { // Check single-step flag - if (IsSSFlagEnabled(reinterpret_cast(pCtx) ARM_ARG(pThread) ARM64_ARG(pThread))) + if (IsSSFlagEnabled(reinterpret_cast(pCtx) ARM_ARG(pThread) ARM64_ARG(pThread) RISCV64_ARG(pThread))) { // Can't hijack a thread whose SS-flag is set. This could lead to races // with the thread taking the SS-exception. diff --git a/src/coreclr/debug/ee/riscv64/primitives.cpp b/src/coreclr/debug/ee/riscv64/primitives.cpp index ef4735a9d3e1b..65f4c586238f3 100644 --- a/src/coreclr/debug/ee/riscv64/primitives.cpp +++ b/src/coreclr/debug/ee/riscv64/primitives.cpp @@ -12,3 +12,25 @@ void CopyREGDISPLAY(REGDISPLAY* pDst, REGDISPLAY* pSrc) CONTEXT tmp; CopyRegDisplay(pSrc, pDst, &tmp); } + +void SetSSFlag(DT_CONTEXT *, Thread *pThread) +{ + _ASSERTE(pThread != NULL); + + pThread->EnableSingleStep(); +} + +void UnsetSSFlag(DT_CONTEXT *, Thread *pThread) +{ + _ASSERTE(pThread != NULL); + + pThread->DisableSingleStep(); +} + +// Check if single stepping is enabled. +bool IsSSFlagEnabled(DT_CONTEXT *, Thread *pThread) +{ + _ASSERTE(pThread != NULL); + + return pThread->IsSingleStepEnabled(); +} diff --git a/src/coreclr/debug/inc/riscv64/primitives.h b/src/coreclr/debug/inc/riscv64/primitives.h index 44475ac9a7013..066397fcda714 100644 --- a/src/coreclr/debug/inc/riscv64/primitives.h +++ b/src/coreclr/debug/inc/riscv64/primitives.h @@ -49,7 +49,7 @@ inline CORDB_ADDRESS GetPatchEndAddr(CORDB_ADDRESS patchAddr) constexpr CorDebugRegister g_JITToCorDbgReg[] = { - (CorDebugRegister)(-1), // X0 is zero register that is not a real register. We need padding here for proper mapping with ICorDebugInfo::RegNum. + (CorDebugRegister)(255), // X0 is zero register that is not a real register. We need padding here for proper mapping with ICorDebugInfo::RegNum. REGISTER_RISCV64_RA, REGISTER_RISCV64_SP, REGISTER_RISCV64_GP, @@ -221,24 +221,15 @@ inline bool AddressIsBreakpoint(CORDB_ADDRESS_TYPE* address) return CORDbgGetInstruction(address) == CORDbg_BREAK_INSTRUCTION; } -inline void SetSSFlag(DT_CONTEXT *pContext) -{ - // TODO-RISCV64: RISCV64 doesn't support cpsr. - _ASSERTE(!"unimplemented on RISCV64 yet"); -} +class Thread; +// Enable single stepping. +void SetSSFlag(DT_CONTEXT *pCtx, Thread *pThread); -inline void UnsetSSFlag(DT_CONTEXT *pContext) -{ - // TODO-RISCV64: RISCV64 doesn't support cpsr. - _ASSERTE(!"unimplemented on RISCV64 yet"); -} +// Disable single stepping +void UnsetSSFlag(DT_CONTEXT *pCtx, Thread *pThread); -inline bool IsSSFlagEnabled(DT_CONTEXT * pContext) -{ - // TODO-RISCV64: RISCV64 doesn't support cpsr. - _ASSERTE(!"unimplemented on RISCV64 yet"); - return false; -} +// Check if single stepping is enabled. +bool IsSSFlagEnabled(DT_CONTEXT *pCtx, Thread *pThread); inline bool PRDIsEqual(PRD_TYPE p1, PRD_TYPE p2) diff --git a/src/coreclr/gc/env/gctoeeinterface.standalone.inl b/src/coreclr/gc/env/gctoeeinterface.standalone.inl index 0b72f3b726987..45786b01d3ef8 100644 --- a/src/coreclr/gc/env/gctoeeinterface.standalone.inl +++ b/src/coreclr/gc/env/gctoeeinterface.standalone.inl @@ -249,7 +249,7 @@ namespace standalone return ::GCToEEInterface::GetCurrentProcessCpuCount(); } - void DiagAddNewRegion(int generation, BYTE * rangeStart, BYTE * rangeEnd, BYTE * rangeEndReserved) + void DiagAddNewRegion(int generation, uint8_t* rangeStart, uint8_t* rangeEnd, uint8_t* rangeEndReserved) { ::GCToEEInterface::DiagAddNewRegion(generation, rangeStart, rangeEnd, rangeEndReserved); } diff --git a/src/coreclr/gc/unix/gcenv.unix.cpp b/src/coreclr/gc/unix/gcenv.unix.cpp index 62680cf1428e2..c211a13651940 100644 --- a/src/coreclr/gc/unix/gcenv.unix.cpp +++ b/src/coreclr/gc/unix/gcenv.unix.cpp @@ -631,9 +631,9 @@ bool GCToOSInterface::VirtualCommit(void* address, size_t size, uint16_t node) if ((int)node <= g_highestNumaNode) { int usedNodeMaskBits = g_highestNumaNode + 1; - int nodeMaskLength = (usedNodeMaskBits + sizeof(unsigned long) - 1) / sizeof(unsigned long); - unsigned long nodeMask[nodeMaskLength]; - memset(nodeMask, 0, sizeof(nodeMask)); + int nodeMaskLength = usedNodeMaskBits + sizeof(unsigned long) - 1; + unsigned long* nodeMask = (unsigned long*)alloca(nodeMaskLength); + memset(nodeMask, 0, nodeMaskLength); int index = node / sizeof(unsigned long); nodeMask[index] = ((unsigned long)1) << (node & (sizeof(unsigned long) - 1)); @@ -1189,10 +1189,10 @@ uint64_t GetAvailablePhysicalMemory() #elif defined(__FreeBSD__) size_t inactive_count = 0, laundry_count = 0, free_count = 0; size_t sz = sizeof(inactive_count); - sysctlbyname("vm.stats.vm.v_inactive_count", &inactive_count, &sz, NULL, 0); + sysctlbyname("vm.stats.vm.v_inactive_count", &inactive_count, &sz, NULL, 0); sz = sizeof(laundry_count); - sysctlbyname("vm.stats.vm.v_laundry_count", &laundry_count, &sz, NULL, 0); + sysctlbyname("vm.stats.vm.v_laundry_count", &laundry_count, &sz, NULL, 0); sz = sizeof(free_count); sysctlbyname("vm.stats.vm.v_free_count", &free_count, &sz, NULL, 0); diff --git a/src/coreclr/inc/stdmacros.h b/src/coreclr/inc/stdmacros.h index b6b50300c1615..7e4ae79c535c5 100644 --- a/src/coreclr/inc/stdmacros.h +++ b/src/coreclr/inc/stdmacros.h @@ -125,6 +125,20 @@ #define NOT_LOONGARCH64_ARG(x) , x #endif +#ifdef TARGET_RISCV64 +#define RISCV64_FIRST_ARG(x) x , +#define RISCV64_ARG(x) , x +#define RISCV64_ONLY(x) x +#define NOT_RISCV64(x) +#define NOT_RISCV64_ARG(x) +#else +#define RISCV64_FIRST_ARG(x) +#define RISCV64_ARG(x) +#define RISCV64_ONLY(x) +#define NOT_RISCV64(x) x +#define NOT_RISCV64_ARG(x) , x +#endif + #ifdef TARGET_64BIT #define LOG2_PTRSIZE 3 #else diff --git a/src/coreclr/jit/assertionprop.cpp b/src/coreclr/jit/assertionprop.cpp index 30e2db23ecd06..8eacd46beee08 100644 --- a/src/coreclr/jit/assertionprop.cpp +++ b/src/coreclr/jit/assertionprop.cpp @@ -590,12 +590,19 @@ void Compiler::optAssertionInit(bool isLocalProp) // optAssertionDep = new (this, CMK_AssertionProp) JitExpandArray(getAllocator(CMK_AssertionProp), max(1, lvaCount)); + + if (optCrossBlockLocalAssertionProp) + { + optComplementaryAssertionMap = new (this, CMK_AssertionProp) + AssertionIndex[optMaxAssertionCount + 1](); // zero-inited (NO_ASSERTION_INDEX) + } } else { // General assertion prop. // - optLocalAssertionProp = false; + optLocalAssertionProp = false; + optCrossBlockLocalAssertionProp = false; // Use a function countFunc to determine a proper maximum assertion count for the // method being compiled. The function is linear to the IL size for small and @@ -615,7 +622,6 @@ void Compiler::optAssertionInit(bool isLocalProp) } optAssertionTabPrivate = new (this, CMK_AssertionProp) AssertionDsc[optMaxAssertionCount]; - optAssertionTraitsInit(optMaxAssertionCount); optAssertionCount = 0; @@ -1641,7 +1647,8 @@ AssertionIndex Compiler::optAddAssertion(AssertionDsc* newAssertion) // if (optLocalAssertionProp) { - assert(newAssertion->op1.kind == O1K_LCLVAR); + assert((newAssertion->op1.kind == O1K_LCLVAR) || (newAssertion->op1.kind == O1K_SUBTYPE) || + (newAssertion->op1.kind == O1K_EXACT_TYPE)); unsigned lclNum = newAssertion->op1.lcl.lclNum; BitVecOps::Iter iter(apTraits, GetAssertionDep(lclNum)); @@ -1702,7 +1709,8 @@ AssertionIndex Compiler::optAddAssertion(AssertionDsc* newAssertion) // Assertion mask bits are [index + 1]. if (optLocalAssertionProp) { - assert(newAssertion->op1.kind == O1K_LCLVAR); + assert((newAssertion->op1.kind == O1K_LCLVAR) || (newAssertion->op1.kind == O1K_SUBTYPE) || + (newAssertion->op1.kind == O1K_EXACT_TYPE)); // Mark the variables this index depends on unsigned lclNum = newAssertion->op1.lcl.lclNum; @@ -1971,6 +1979,13 @@ AssertionIndex Compiler::optCreateJtrueAssertions(GenTree* op1 AssertionInfo Compiler::optCreateJTrueBoundsAssertion(GenTree* tree) { + // These assertions are VN based, so not relevant for local prop + // + if (optLocalAssertionProp) + { + return NO_ASSERTION_INDEX; + } + GenTree* relop = tree->gtGetOp1(); if (!relop->OperIsCompare()) { @@ -2138,13 +2153,7 @@ AssertionInfo Compiler::optCreateJTrueBoundsAssertion(GenTree* tree) */ AssertionInfo Compiler::optAssertionGenJtrue(GenTree* tree) { - // Only create assertions for JTRUE when we are in the global phase - if (optLocalAssertionProp) - { - return NO_ASSERTION_INDEX; - } - - GenTree* relop = tree->AsOp()->gtOp1; + GenTree* const relop = tree->AsOp()->gtOp1; if (!relop->OperIsCompare()) { return NO_ASSERTION_INDEX; @@ -2158,6 +2167,11 @@ AssertionInfo Compiler::optAssertionGenJtrue(GenTree* tree) return info; } + if (optLocalAssertionProp && !optCrossBlockLocalAssertionProp) + { + return NO_ASSERTION_INDEX; + } + // Find assertion kind. switch (relop->gtOper) { @@ -2185,53 +2199,57 @@ AssertionInfo Compiler::optAssertionGenJtrue(GenTree* tree) std::swap(op1, op2); } - ValueNum op1VN = vnStore->VNConservativeNormalValue(op1->gtVNPair); - ValueNum op2VN = vnStore->VNConservativeNormalValue(op2->gtVNPair); // If op1 is lcl and op2 is const or lcl, create assertion. if ((op1->gtOper == GT_LCL_VAR) && (op2->OperIsConst() || (op2->gtOper == GT_LCL_VAR))) // Fix for Dev10 851483 { return optCreateJtrueAssertions(op1, op2, assertionKind); } - else if (vnStore->IsVNCheckedBound(op1VN) && vnStore->IsVNInt32Constant(op2VN)) + else if (!optLocalAssertionProp) { - assert(relop->OperIs(GT_EQ, GT_NE)); + ValueNum op1VN = vnStore->VNConservativeNormalValue(op1->gtVNPair); + ValueNum op2VN = vnStore->VNConservativeNormalValue(op2->gtVNPair); - int con = vnStore->ConstantValue(op2VN); - if (con >= 0) + if (vnStore->IsVNCheckedBound(op1VN) && vnStore->IsVNInt32Constant(op2VN)) { - AssertionDsc dsc; + assert(relop->OperIs(GT_EQ, GT_NE)); - // For arr.Length != 0, we know that 0 is a valid index - // For arr.Length == con, we know that con - 1 is the greatest valid index - if (con == 0) - { - dsc.assertionKind = OAK_NOT_EQUAL; - dsc.op1.bnd.vnIdx = vnStore->VNForIntCon(0); - } - else + int con = vnStore->ConstantValue(op2VN); + if (con >= 0) { - dsc.assertionKind = OAK_EQUAL; - dsc.op1.bnd.vnIdx = vnStore->VNForIntCon(con - 1); - } + AssertionDsc dsc; - dsc.op1.vn = op1VN; - dsc.op1.kind = O1K_ARR_BND; - dsc.op1.bnd.vnLen = op1VN; - dsc.op2.vn = vnStore->VNConservativeNormalValue(op2->gtVNPair); - dsc.op2.kind = O2K_CONST_INT; - dsc.op2.u1.iconVal = 0; - dsc.op2.SetIconFlag(GTF_EMPTY); - - // when con is not zero, create an assertion on the arr.Length == con edge - // when con is zero, create an assertion on the arr.Length != 0 edge - AssertionIndex index = optAddAssertion(&dsc); - if (relop->OperIs(GT_NE) != (con == 0)) - { - return AssertionInfo::ForNextEdge(index); - } - else - { - return index; + // For arr.Length != 0, we know that 0 is a valid index + // For arr.Length == con, we know that con - 1 is the greatest valid index + if (con == 0) + { + dsc.assertionKind = OAK_NOT_EQUAL; + dsc.op1.bnd.vnIdx = vnStore->VNForIntCon(0); + } + else + { + dsc.assertionKind = OAK_EQUAL; + dsc.op1.bnd.vnIdx = vnStore->VNForIntCon(con - 1); + } + + dsc.op1.vn = op1VN; + dsc.op1.kind = O1K_ARR_BND; + dsc.op1.bnd.vnLen = op1VN; + dsc.op2.vn = vnStore->VNConservativeNormalValue(op2->gtVNPair); + dsc.op2.kind = O2K_CONST_INT; + dsc.op2.u1.iconVal = 0; + dsc.op2.SetIconFlag(GTF_EMPTY); + + // when con is not zero, create an assertion on the arr.Length == con edge + // when con is zero, create an assertion on the arr.Length != 0 edge + AssertionIndex index = optAddAssertion(&dsc); + if (relop->OperIs(GT_NE) != (con == 0)) + { + return AssertionInfo::ForNextEdge(index); + } + else + { + return index; + } } } } @@ -2260,7 +2278,7 @@ AssertionInfo Compiler::optAssertionGenJtrue(GenTree* tree) return NO_ASSERTION_INDEX; } - GenTreeCall* call = op1->AsCall(); + GenTreeCall* const call = op1->AsCall(); // Note CORINFO_HELP_READYTORUN_ISINSTANCEOF does not have the same argument pattern. // In particular, it is not possible to deduce what class is being tested from its args. @@ -5488,8 +5506,14 @@ class AssertionPropFlowCallback // lastTryBlock - the last block of the try for "block" handler;. // // Notes: - // We can jump to the handler from any instruction in the try region. - // It means we can propagate only assertions that are valid for the whole try region. + // We can jump to the handler from any instruction in the try region. It + // means we can propagate only assertions that are valid for the whole + // try region. + // + // It suffices to intersect with only the head 'try' block's assertions, + // since that block dominates all other blocks in the try, and since + // assertions are VN-based and can never become false. + // void MergeHandler(BasicBlock* block, BasicBlock* firstTryBlock, BasicBlock* lastTryBlock) { if (VerboseDataflow()) @@ -5498,11 +5522,8 @@ class AssertionPropFlowCallback Compiler::optDumpAssertionIndices("in -> ", block->bbAssertionIn, "; "); JITDUMP("firstTryBlock " FMT_BB " ", firstTryBlock->bbNum); Compiler::optDumpAssertionIndices("in -> ", firstTryBlock->bbAssertionIn, "; "); - JITDUMP("lastTryBlock " FMT_BB " ", lastTryBlock->bbNum); - Compiler::optDumpAssertionIndices("out -> ", lastTryBlock->bbAssertionOut, "\n"); } BitVecOps::IntersectionD(apTraits, block->bbAssertionIn, firstTryBlock->bbAssertionIn); - BitVecOps::IntersectionD(apTraits, block->bbAssertionIn, lastTryBlock->bbAssertionOut); } // At the end of the merge store results of the dataflow equations, in a postmerge state. diff --git a/src/coreclr/jit/block.cpp b/src/coreclr/jit/block.cpp index efa5be945ec7a..f2dc21a958ef6 100644 --- a/src/coreclr/jit/block.cpp +++ b/src/coreclr/jit/block.cpp @@ -105,6 +105,12 @@ AllSuccessorEnumerator::AllSuccessorEnumerator(Compiler* comp, BasicBlock* block FlowEdge* Compiler::BlockPredsWithEH(BasicBlock* blk) { + unsigned tryIndex; + if (!bbIsExFlowBlock(blk, &tryIndex)) + { + return blk->bbPreds; + } + BlockToFlowEdgeMap* ehPreds = GetBlockToEHPreds(); FlowEdge* res; if (ehPreds->Lookup(blk, &res)) @@ -113,76 +119,129 @@ FlowEdge* Compiler::BlockPredsWithEH(BasicBlock* blk) } res = blk->bbPreds; - unsigned tryIndex; - if (bbIsExFlowBlock(blk, &tryIndex)) - { - // Find the first block of the try. - EHblkDsc* ehblk = ehGetDsc(tryIndex); - BasicBlock* tryStart = ehblk->ebdTryBeg; - for (BasicBlock* const tryStartPredBlock : tryStart->PredBlocks()) + // Add all blocks handled by this handler (except for second blocks of BBJ_CALLFINALLY/BBJ_ALWAYS pairs; + // these cannot cause transfer to the handler...) + // TODO-Throughput: It would be nice if we could iterate just over the blocks in the try, via + // something like: + // for (BasicBlock* bb = ehblk->ebdTryBeg; bb != ehblk->ebdTryLast->Next(); bb = bb->Next()) + // (plus adding in any filter blocks outside the try whose exceptions are handled here). + // That doesn't work, however: funclets have caused us to sometimes split the body of a try into + // more than one sequence of contiguous blocks. We need to find a better way to do this. + for (BasicBlock* const bb : Blocks()) + { + if (bbInExnFlowRegions(tryIndex, bb) && !bb->isBBCallAlwaysPairTail()) { - res = new (this, CMK_FlowEdge) FlowEdge(tryStartPredBlock, res); + res = new (this, CMK_FlowEdge) FlowEdge(bb, res); #if MEASURE_BLOCK_SIZE genFlowNodeCnt += 1; genFlowNodeSize += sizeof(FlowEdge); #endif // MEASURE_BLOCK_SIZE } + } - // Now add all blocks handled by this handler (except for second blocks of BBJ_CALLFINALLY/BBJ_ALWAYS pairs; - // these cannot cause transfer to the handler...) - // TODO-Throughput: It would be nice if we could iterate just over the blocks in the try, via - // something like: - // for (BasicBlock* bb = ehblk->ebdTryBeg; bb != ehblk->ebdTryLast->Next(); bb = bb->Next()) - // (plus adding in any filter blocks outside the try whose exceptions are handled here). - // That doesn't work, however: funclets have caused us to sometimes split the body of a try into - // more than one sequence of contiguous blocks. We need to find a better way to do this. - for (BasicBlock* const bb : Blocks()) + EHblkDsc* ehblk = ehGetDsc(tryIndex); + if (ehblk->HasFinallyOrFaultHandler() && (ehblk->ebdHndBeg == blk)) + { + // block is a finally or fault handler; all enclosing filters are predecessors + unsigned enclosing = ehblk->ebdEnclosingTryIndex; + while (enclosing != EHblkDsc::NO_ENCLOSING_INDEX) { - if (bbInExnFlowRegions(tryIndex, bb) && !bb->isBBCallAlwaysPairTail()) + EHblkDsc* enclosingDsc = ehGetDsc(enclosing); + if (enclosingDsc->HasFilter()) { - res = new (this, CMK_FlowEdge) FlowEdge(bb, res); + for (BasicBlock* filterBlk = enclosingDsc->ebdFilter; filterBlk != enclosingDsc->ebdHndBeg; + filterBlk = filterBlk->Next()) + { + res = new (this, CMK_FlowEdge) FlowEdge(filterBlk, res); -#if MEASURE_BLOCK_SIZE - genFlowNodeCnt += 1; - genFlowNodeSize += sizeof(FlowEdge); -#endif // MEASURE_BLOCK_SIZE + assert(filterBlk->VisitEHSecondPassSuccs(this, [blk](BasicBlock* succ) { + return succ == blk ? BasicBlockVisit::Abort : BasicBlockVisit::Continue; + }) == BasicBlockVisit::Abort); + } } + + enclosing = enclosingDsc->ebdEnclosingTryIndex; } + } - if (ehblk->HasFinallyOrFaultHandler() && (ehblk->ebdHndBeg == blk)) +#ifdef DEBUG + unsigned hash = SsaStressHashHelper(); + if (hash != 0) + { + res = ShuffleHelper(hash, res); + } +#endif // DEBUG + ehPreds->Set(blk, res); + return res; +} + +//------------------------------------------------------------------------ +// BlockDominancePreds: +// Return list of dominance predecessors. This is the set that we know for +// sure contains a block that was fully executed before control reached +// 'blk'. +// +// Arguments: +// blk - Block to get dominance predecessors for. +// +// Returns: +// List of edges. +// +// Remarks: +// Differs from BlockPredsWithEH only in the treatment of handler blocks; +// enclosed blocks are never dominance preds, while all predecessors of +// blocks in the 'try' are (currently only the first try block expected). +// +FlowEdge* Compiler::BlockDominancePreds(BasicBlock* blk) +{ + unsigned tryIndex; + if (!bbIsExFlowBlock(blk, &tryIndex)) + { + return blk->bbPreds; + } + + EHblkDsc* ehblk = ehGetDsc(tryIndex); + if (!ehblk->HasFinallyOrFaultHandler() || (ehblk->ebdHndBeg != blk)) + { + return ehblk->ebdTryBeg->bbPreds; + } + + // Finally/fault handlers can be preceded by enclosing filters due to 2 + // pass EH, so add those and keep them cached. + BlockToFlowEdgeMap* domPreds = GetDominancePreds(); + FlowEdge* res; + if (domPreds->Lookup(blk, &res)) + { + return res; + } + + res = ehblk->ebdTryBeg->bbPreds; + if (ehblk->HasFinallyOrFaultHandler() && (ehblk->ebdHndBeg == blk)) + { + // block is a finally or fault handler; all enclosing filters are predecessors + unsigned enclosing = ehblk->ebdEnclosingTryIndex; + while (enclosing != EHblkDsc::NO_ENCLOSING_INDEX) { - // block is a finally or fault handler; all enclosing filters are predecessors - unsigned enclosing = ehblk->ebdEnclosingTryIndex; - while (enclosing != EHblkDsc::NO_ENCLOSING_INDEX) + EHblkDsc* enclosingDsc = ehGetDsc(enclosing); + if (enclosingDsc->HasFilter()) { - EHblkDsc* enclosingDsc = ehGetDsc(enclosing); - if (enclosingDsc->HasFilter()) + for (BasicBlock* filterBlk = enclosingDsc->ebdFilter; filterBlk != enclosingDsc->ebdHndBeg; + filterBlk = filterBlk->Next()) { - for (BasicBlock* filterBlk = enclosingDsc->ebdFilter; filterBlk != enclosingDsc->ebdHndBeg; - filterBlk = filterBlk->Next()) - { - res = new (this, CMK_FlowEdge) FlowEdge(filterBlk, res); - - assert(filterBlk->VisitEHSecondPassSuccs(this, [blk](BasicBlock* succ) { - return succ == blk ? BasicBlockVisit::Abort : BasicBlockVisit::Continue; - }) == BasicBlockVisit::Abort); - } - } + res = new (this, CMK_FlowEdge) FlowEdge(filterBlk, res); - enclosing = enclosingDsc->ebdEnclosingTryIndex; + assert(filterBlk->VisitEHSecondPassSuccs(this, [blk](BasicBlock* succ) { + return succ == blk ? BasicBlockVisit::Abort : BasicBlockVisit::Continue; + }) == BasicBlockVisit::Abort); + } } - } -#ifdef DEBUG - unsigned hash = SsaStressHashHelper(); - if (hash != 0) - { - res = ShuffleHelper(hash, res); + enclosing = enclosingDsc->ebdEnclosingTryIndex; } -#endif // DEBUG - ehPreds->Set(blk, res); } + + domPreds->Set(blk, res); return res; } diff --git a/src/coreclr/jit/block.h b/src/coreclr/jit/block.h index 86413ce25c40c..49b6903668403 100644 --- a/src/coreclr/jit/block.h +++ b/src/coreclr/jit/block.h @@ -1230,18 +1230,20 @@ struct BasicBlock : private LIR::Range */ union { - EXPSET_TP bbCseGen; // CSEs computed by block - ASSERT_TP bbAssertionGen; // assertions computed by block + EXPSET_TP bbCseGen; // CSEs computed by block + ASSERT_TP bbAssertionGen; // assertions created by block (global prop) + ASSERT_TP bbAssertionOutIfTrue; // assertions available on exit along true/jump edge (BBJ_COND, local prop) }; union { EXPSET_TP bbCseIn; // CSEs available on entry - ASSERT_TP bbAssertionIn; // assertions available on entry + ASSERT_TP bbAssertionIn; // assertions available on entry (global prop) }; union { - EXPSET_TP bbCseOut; // CSEs available on exit - ASSERT_TP bbAssertionOut; // assertions available on exit + EXPSET_TP bbCseOut; // CSEs available on exit + ASSERT_TP bbAssertionOut; // assertions available on exit (global prop, local prop & !BBJ_COND) + ASSERT_TP bbAssertionOutIfFalse; // assertions available on exit along false/next edge (BBJ_COND, local prop) }; void* bbEmitCookie; diff --git a/src/coreclr/jit/compiler.cpp b/src/coreclr/jit/compiler.cpp index 355403baa9268..bdc822bfef68d 100644 --- a/src/coreclr/jit/compiler.cpp +++ b/src/coreclr/jit/compiler.cpp @@ -1945,6 +1945,7 @@ void Compiler::compInit(ArenaAllocator* pAlloc, #endif m_switchDescMap = nullptr; m_blockToEHPreds = nullptr; + m_dominancePreds = nullptr; m_fieldSeqStore = nullptr; m_refAnyClass = nullptr; for (MemoryKind memoryKind : allMemoryKinds()) @@ -5739,6 +5740,7 @@ void Compiler::ResetOptAnnotations() fgResetForSsa(); vnStore = nullptr; m_blockToEHPreds = nullptr; + m_dominancePreds = nullptr; fgSsaPassesCompleted = 0; fgVNPassesCompleted = 0; fgSsaChecksEnabled = false; diff --git a/src/coreclr/jit/compiler.h b/src/coreclr/jit/compiler.h index 41ee08498d23a..ba6f8d8d76d3a 100644 --- a/src/coreclr/jit/compiler.h +++ b/src/coreclr/jit/compiler.h @@ -2372,12 +2372,8 @@ class Compiler } // Get the index to use as the cache key for sharing throw blocks #endif // !FEATURE_EH_FUNCLETS - // Returns a FlowEdge representing the "EH predecessors" of "blk". These are the normal predecessors of - // "blk", plus one special case: if "blk" is the first block of a handler, considers the predecessor(s) of the - // first block of the corresponding try region to be "EH predecessors". (If there is a single such predecessor, - // for example, we want to consider that the immediate dominator of the catch clause start block, so it's - // convenient to also consider it a predecessor.) FlowEdge* BlockPredsWithEH(BasicBlock* blk); + FlowEdge* BlockDominancePreds(BasicBlock* blk); // This table is useful for memoization of the method above. typedef JitHashTable, FlowEdge*> BlockToFlowEdgeMap; @@ -2391,6 +2387,16 @@ class Compiler return m_blockToEHPreds; } + BlockToFlowEdgeMap* m_dominancePreds; + BlockToFlowEdgeMap* GetDominancePreds() + { + if (m_dominancePreds == nullptr) + { + m_dominancePreds = new (getAllocator()) BlockToFlowEdgeMap(getAllocator()); + } + return m_dominancePreds; + } + void* ehEmitCookie(BasicBlock* block); UNATIVE_OFFSET ehCodeOffset(BasicBlock* block); @@ -7356,6 +7362,7 @@ class Compiler BitVecTraits* apTraits; ASSERT_TP apFull; ASSERT_TP apLocal; + ASSERT_TP apLocalIfTrue; enum optAssertionKind { diff --git a/src/coreclr/jit/compiler.hpp b/src/coreclr/jit/compiler.hpp index 47c9007ddee4f..3a25901f65841 100644 --- a/src/coreclr/jit/compiler.hpp +++ b/src/coreclr/jit/compiler.hpp @@ -538,69 +538,6 @@ static BasicBlockVisit VisitEHSuccessors(Compiler* comp, BasicBlock* block, TFun return block->VisitEHSecondPassSuccs(comp, func); } -//------------------------------------------------------------------------------ -// VisitSuccessorEHSuccessors: Given a block and one of its regular successors, -// if that regular successor is the beginning of a try, then also visit its -// handlers. -// -// Arguments: -// comp - Compiler instance -// block - The block -// succ - A regular successor of block -// func - Callback -// -// Returns: -// Whether or not the visiting should proceed. -// -// Remarks: -// Because we make the conservative assumption that control flow can jump -// from a try block to its handler at any time, the immediate (regular -// control flow) predecessor(s) of the first block of a try block are also -// considered to have the first block of the handler as an EH successor. -// -// As an example: for liveness this makes variables that are "live-in" to the -// handler become "live-out" for these try-predecessor block, so that they -// become live-in to the try -- which we require. -// -// TODO-Cleanup: Is the above comment true today or is this code unnecessary? -// For a block T with an EH successor E liveness takes care to consider the -// live-in set E as "volatile" variables that are fully live at all points -// within the block T, including being a part of T's live-in set. That means -// that if T is the beginning of a try, then any predecessor of T will -// naturally also have E's live-in set as part of its live-out set. -// -template -static BasicBlockVisit VisitSuccessorEHSuccessors(Compiler* comp, BasicBlock* block, BasicBlock* succ, TFunc func) -{ - if (!comp->bbIsTryBeg(succ)) - { - return BasicBlockVisit::Continue; - } - - unsigned tryIndex = succ->getTryIndex(); - if (comp->bbInExnFlowRegions(tryIndex, block)) - { - // Already yielded as an EH successor of block itself - return BasicBlockVisit::Continue; - } - - EHblkDsc* eh = comp->ehGetDsc(tryIndex); - - do - { - RETURN_ON_ABORT(func(eh->ExFlowBlock())); - - if (eh->ebdEnclosingTryIndex == EHblkDsc::NO_ENCLOSING_INDEX) - { - break; - } - - eh = comp->ehGetDsc(eh->ebdEnclosingTryIndex); - } while (eh->ebdTryBeg == succ); - - return BasicBlockVisit::Continue; -} - //------------------------------------------------------------------------------ // VisitAllSuccs: Visit all successors (including EH successors) of this block. // @@ -622,23 +559,14 @@ BasicBlockVisit BasicBlock::VisitAllSuccs(Compiler* comp, TFunc func) RETURN_ON_ABORT(func(bbJumpEhf->bbeSuccs[i])); } - RETURN_ON_ABORT(VisitEHSuccessors(comp, this, func)); - - for (unsigned i = 0; i < bbJumpEhf->bbeCount; i++) - { - RETURN_ON_ABORT(VisitSuccessorEHSuccessors(comp, this, bbJumpEhf->bbeSuccs[i], func)); - } - - break; + return VisitEHSuccessors(comp, this, func); case BBJ_CALLFINALLY: case BBJ_EHCATCHRET: case BBJ_EHFILTERRET: case BBJ_LEAVE: RETURN_ON_ABORT(func(bbJumpDest)); - RETURN_ON_ABORT(VisitEHSuccessors(comp, this, func)); - RETURN_ON_ABORT(VisitSuccessorEHSuccessors(comp, this, bbJumpDest, func)); - break; + return VisitEHSuccessors(comp, this, func); case BBJ_ALWAYS: RETURN_ON_ABORT(func(bbJumpDest)); @@ -651,14 +579,12 @@ BasicBlockVisit BasicBlock::VisitAllSuccs(Compiler* comp, TFunc func) { RETURN_ON_ABORT(VisitEHSuccessors(comp, this, func)); } - RETURN_ON_ABORT(VisitSuccessorEHSuccessors(comp, this, bbJumpDest, func)); - break; + + return BasicBlockVisit::Continue; case BBJ_NONE: RETURN_ON_ABORT(func(bbNext)); - RETURN_ON_ABORT(VisitEHSuccessors(comp, this, func)); - RETURN_ON_ABORT(VisitSuccessorEHSuccessors(comp, this, bbNext, func)); - break; + return VisitEHSuccessors(comp, this, func); case BBJ_COND: RETURN_ON_ABORT(func(bbNext)); @@ -668,14 +594,7 @@ BasicBlockVisit BasicBlock::VisitAllSuccs(Compiler* comp, TFunc func) RETURN_ON_ABORT(func(bbJumpDest)); } - RETURN_ON_ABORT(VisitEHSuccessors(comp, this, func)); - RETURN_ON_ABORT(VisitSuccessorEHSuccessors(comp, this, bbNext, func)); - - if (bbJumpDest != bbNext) - { - RETURN_ON_ABORT(VisitSuccessorEHSuccessors(comp, this, bbJumpDest, func)); - } - break; + return VisitEHSuccessors(comp, this, func); case BBJ_SWITCH: { @@ -685,27 +604,17 @@ BasicBlockVisit BasicBlock::VisitAllSuccs(Compiler* comp, TFunc func) RETURN_ON_ABORT(func(sd.nonDuplicates[i])); } - RETURN_ON_ABORT(VisitEHSuccessors(comp, this, func)); - - for (unsigned i = 0; i < sd.numDistinctSuccs; i++) - { - RETURN_ON_ABORT(VisitSuccessorEHSuccessors(comp, this, sd.nonDuplicates[i], func)); - } - - break; + return VisitEHSuccessors(comp, this, func); } case BBJ_THROW: case BBJ_RETURN: case BBJ_EHFAULTRET: - RETURN_ON_ABORT(VisitEHSuccessors(comp, this, func)); - break; + return VisitEHSuccessors(comp, this, func); default: unreached(); } - - return BasicBlockVisit::Continue; } //------------------------------------------------------------------------------ @@ -728,19 +637,18 @@ BasicBlockVisit BasicBlock::VisitRegularSuccs(Compiler* comp, TFunc func) { RETURN_ON_ABORT(func(bbJumpEhf->bbeSuccs[i])); } - break; + + return BasicBlockVisit::Continue; case BBJ_CALLFINALLY: case BBJ_EHCATCHRET: case BBJ_EHFILTERRET: case BBJ_LEAVE: case BBJ_ALWAYS: - RETURN_ON_ABORT(func(bbJumpDest)); - break; + return func(bbJumpDest); case BBJ_NONE: - RETURN_ON_ABORT(func(bbNext)); - break; + return func(bbNext); case BBJ_COND: RETURN_ON_ABORT(func(bbNext)); @@ -750,7 +658,7 @@ BasicBlockVisit BasicBlock::VisitRegularSuccs(Compiler* comp, TFunc func) RETURN_ON_ABORT(func(bbJumpDest)); } - break; + return BasicBlockVisit::Continue; case BBJ_SWITCH: { @@ -760,19 +668,17 @@ BasicBlockVisit BasicBlock::VisitRegularSuccs(Compiler* comp, TFunc func) RETURN_ON_ABORT(func(sd.nonDuplicates[i])); } - break; + return BasicBlockVisit::Continue; } case BBJ_THROW: case BBJ_RETURN: case BBJ_EHFAULTRET: - break; + return BasicBlockVisit::Continue; default: unreached(); } - - return BasicBlockVisit::Continue; } #undef RETURN_ON_ABORT diff --git a/src/coreclr/jit/dataflow.h b/src/coreclr/jit/dataflow.h index 7601b332f5b87..6f27c6a998d77 100644 --- a/src/coreclr/jit/dataflow.h +++ b/src/coreclr/jit/dataflow.h @@ -58,8 +58,7 @@ void DataFlow::ForwardAnalysis(TCallback& callback) } else { - FlowEdge* preds = m_pCompiler->BlockPredsWithEH(block); - for (FlowEdge* pred = preds; pred; pred = pred->getNextPredEdge()) + for (FlowEdge* pred : block->PredEdges()) { callback.Merge(block, pred->getSourceBlock(), pred->getDupCount()); } @@ -67,10 +66,40 @@ void DataFlow::ForwardAnalysis(TCallback& callback) if (callback.EndMerge(block)) { - block->VisitAllSuccs(m_pCompiler, [&worklist](BasicBlock* succ) { + // The clients using DataFlow (CSE, assertion prop) currently do + // not need EH successors here: + // + // 1. CSE does not CSE into handlers, so it considers no + // expressions available at the beginning of handlers; + // + // 2. Facts in global assertion prop are VN-based and can only + // become false because of control flow, so it is sufficient to + // propagate facts available into the 'try' head block, since that + // block dominates all other blocks in the 'try'. That will happen + // as part of processing handlers below. + // + block->VisitRegularSuccs(m_pCompiler, [&worklist](BasicBlock* succ) { worklist.insert(worklist.end(), succ); return BasicBlockVisit::Continue; }); } + + if (m_pCompiler->bbIsTryBeg(block)) + { + // Handlers of the try are reachable (and may require special + // handling compared to the normal "at-the-end" propagation above). + EHblkDsc* eh = m_pCompiler->ehGetDsc(block->getTryIndex()); + do + { + worklist.insert(worklist.end(), eh->ExFlowBlock()); + + if (eh->ebdEnclosingTryIndex == EHblkDsc::NO_ENCLOSING_INDEX) + { + break; + } + + eh = m_pCompiler->ehGetDsc(eh->ebdEnclosingTryIndex); + } while (eh->ebdTryBeg == block); + } } } diff --git a/src/coreclr/jit/fgopt.cpp b/src/coreclr/jit/fgopt.cpp index 97e4d4e35cc96..36c2edb386064 100644 --- a/src/coreclr/jit/fgopt.cpp +++ b/src/coreclr/jit/fgopt.cpp @@ -453,14 +453,14 @@ bool Compiler::fgRemoveUnreachableBlocks(CanRemoveBlockBody canRemoveBlock) // Make sure that the block was marked as removed */ noway_assert(block->bbFlags & BBF_REMOVED); - // Some blocks mark the end of trys and catches - // and can't be removed. We convert these into - // empty blocks of type BBJ_THROW + // Some blocks mark the end of trys and catches and can't be removed. We convert these into + // empty blocks of type BBJ_THROW. + + const bool bIsBBCallAlwaysPair = block->isBBCallAlwaysPair(); + BasicBlock* leaveBlk = bIsBBCallAlwaysPair ? block->Next() : nullptr; if (block->bbFlags & BBF_DONT_REMOVE) { - const bool bIsBBCallAlwaysPair = block->isBBCallAlwaysPair(); - // Unmark the block as removed, clear BBF_INTERNAL, and set BBJ_IMPORTED JITDUMP("Converting BBF_DONT_REMOVE block " FMT_BB " to BBJ_THROW\n", block->bbNum); @@ -472,36 +472,47 @@ bool Compiler::fgRemoveUnreachableBlocks(CanRemoveBlockBody canRemoveBlock) block->bbFlags |= BBF_IMPORTED; block->SetJumpKindAndTarget(BBJ_THROW DEBUG_ARG(this)); block->bbSetRunRarely(); + } + else + { + /* We have to call fgRemoveBlock next */ + hasUnreachableBlocks = true; + changed = true; + } - // If this is a pair, we just converted it to a BBJ_THROW. - // Get rid of the BBJ_ALWAYS block which is now dead. - if (bIsBBCallAlwaysPair) + // If this is a pair, get rid of the BBJ_ALWAYS block which is now dead. + if (bIsBBCallAlwaysPair) + { + assert(leaveBlk->KindIs(BBJ_ALWAYS)); + + if (!block->KindIs(BBJ_THROW)) { - BasicBlock* leaveBlk = block->Next(); - noway_assert(leaveBlk->KindIs(BBJ_ALWAYS)); + // We didn't convert the BBJ_CALLFINALLY to a throw, above. Since we already marked it as removed, + // change the kind to something else. Otherwise, we can hit asserts below in fgRemoveBlock that + // the leaveBlk BBJ_ALWAYS is not allowed to be a CallAlwaysPairTail. + assert(block->KindIs(BBJ_CALLFINALLY)); + block->SetJumpKind(BBJ_NONE); + } - leaveBlk->bbFlags &= ~BBF_DONT_REMOVE; + leaveBlk->bbFlags &= ~BBF_DONT_REMOVE; - for (BasicBlock* const leavePredBlock : leaveBlk->PredBlocks()) - { - fgRemoveEhfSuccessor(leavePredBlock, leaveBlk); - } - assert(leaveBlk->bbRefs == 0); - assert(leaveBlk->bbPreds == nullptr); + for (BasicBlock* const leavePredBlock : leaveBlk->PredBlocks()) + { + fgRemoveEhfSuccessor(leavePredBlock, leaveBlk); + } + assert(leaveBlk->bbRefs == 0); + assert(leaveBlk->bbPreds == nullptr); - fgRemoveBlock(leaveBlk, /* unreachable */ true); + fgRemoveBlock(leaveBlk, /* unreachable */ true); #if defined(FEATURE_EH_FUNCLETS) && defined(TARGET_ARM) - // We have to clear BBF_FINALLY_TARGET flag on the target node (of BBJ_ALWAYS). - fgClearFinallyTargetBit(leaveBlk->GetJumpDest()); + // We have to clear BBF_FINALLY_TARGET flag on the target node (of BBJ_ALWAYS). + fgClearFinallyTargetBit(leaveBlk->GetJumpDest()); #endif // defined(FEATURE_EH_FUNCLETS) && defined(TARGET_ARM) - } - } - else - { - /* We have to call fgRemoveBlock next */ - hasUnreachableBlocks = true; - changed = true; + + // Note: `changed` will already have been set to true by processing the BBJ_CALLFINALLY. + // `hasUnreachableBlocks` doesn't need to be set for the leaveBlk itself because we've already called + // `fgRemoveBlock` on it. } } diff --git a/src/coreclr/jit/hwintrinsicarm64.cpp b/src/coreclr/jit/hwintrinsicarm64.cpp index 3ac9792c8eb07..83eeb02409eee 100644 --- a/src/coreclr/jit/hwintrinsicarm64.cpp +++ b/src/coreclr/jit/hwintrinsicarm64.cpp @@ -260,6 +260,7 @@ void HWIntrinsicInfo::lookupImmBounds( case NI_AdvSimd_Arm64_LoadAndInsertScalarVector128x3: case NI_AdvSimd_Arm64_LoadAndInsertScalarVector128x4: case NI_AdvSimd_StoreSelectedScalar: + case NI_AdvSimd_Arm64_StoreSelectedScalar: case NI_AdvSimd_Arm64_DuplicateSelectedScalarToVector128: case NI_AdvSimd_Arm64_InsertSelectedScalar: immUpperBound = Compiler::getSIMDVectorLength(simdSize, baseType) - 1; @@ -1796,6 +1797,65 @@ GenTree* Compiler::impSpecialIntrinsic(NamedIntrinsic intrinsic, break; } + case NI_AdvSimd_StoreSelectedScalar: + case NI_AdvSimd_Arm64_StoreSelectedScalar: + { + assert(sig->numArgs == 3); + assert(retType == TYP_VOID); + + CORINFO_ARG_LIST_HANDLE arg1 = sig->args; + CORINFO_ARG_LIST_HANDLE arg2 = info.compCompHnd->getArgNext(arg1); + CORINFO_ARG_LIST_HANDLE arg3 = info.compCompHnd->getArgNext(arg2); + var_types argType = TYP_UNKNOWN; + CORINFO_CLASS_HANDLE argClass = NO_CLASS_HANDLE; + argType = JITtype2varType(strip(info.compCompHnd->getArgType(sig, arg3, &argClass))); + op3 = impPopStack().val; + argType = JITtype2varType(strip(info.compCompHnd->getArgType(sig, arg2, &argClass))); + op2 = impPopStack().val; + unsigned fieldCount = info.compCompHnd->getClassNumInstanceFields(argClass); + int immLowerBound = 0; + int immUpperBound = 0; + + if (op2->TypeGet() == TYP_STRUCT) + { + info.compNeedsConsecutiveRegisters = true; + + if (!op2->OperIs(GT_LCL_VAR)) + { + unsigned tmp = lvaGrabTemp(true DEBUGARG("StoreSelectedScalarN")); + + impStoreTemp(tmp, op2, CHECK_SPILL_NONE); + op2 = gtNewLclvNode(tmp, argType); + } + op2 = gtConvertTableOpToFieldList(op2, fieldCount); + } + else + { + // While storing from a single vector, both Vector128 and Vector64 API calls are in AdvSimd class. + // Thus, we get simdSize as 8 for both of the calls. We re-calculate that simd size for such API calls. + getBaseJitTypeAndSizeOfSIMDType(argClass, &simdSize); + } + + assert(HWIntrinsicInfo::isImmOp(intrinsic, op3)); + HWIntrinsicInfo::lookupImmBounds(intrinsic, simdSize, simdBaseType, &immLowerBound, &immUpperBound); + op3 = addRangeCheckIfNeeded(intrinsic, op3, (!op3->IsCnsIntOrI()), immLowerBound, immUpperBound); + argType = JITtype2varType(strip(info.compCompHnd->getArgType(sig, arg1, &argClass))); + op1 = getArgForHWIntrinsic(argType, argClass); + + if (op1->OperIs(GT_CAST)) + { + // Although the API specifies a pointer, if what we have is a BYREF, that's what + // we really want, so throw away the cast. + if (op1->gtGetOp1()->TypeGet() == TYP_BYREF) + { + op1 = op1->gtGetOp1(); + } + } + + retNode = gtNewSimdHWIntrinsicNode(retType, op1, op2, op3, intrinsic, simdBaseJitType, simdSize); + break; + } + case NI_Vector64_Sum: case NI_Vector128_Sum: { diff --git a/src/coreclr/jit/hwintrinsiccodegenarm64.cpp b/src/coreclr/jit/hwintrinsiccodegenarm64.cpp index 1bf08f24d0491..7b903a2deb0e4 100644 --- a/src/coreclr/jit/hwintrinsiccodegenarm64.cpp +++ b/src/coreclr/jit/hwintrinsiccodegenarm64.cpp @@ -493,6 +493,52 @@ void CodeGen::genHWIntrinsic(GenTreeHWIntrinsic* node) ins = varTypeIsUnsigned(intrin.baseType) ? INS_umsubl : INS_smsubl; break; + case NI_AdvSimd_StoreSelectedScalar: + case NI_AdvSimd_Arm64_StoreSelectedScalar: + { + unsigned regCount = 0; + if (intrin.op2->OperIsFieldList()) + { + GenTreeFieldList* fieldList = intrin.op2->AsFieldList(); + GenTree* firstField = fieldList->Uses().GetHead()->GetNode(); + op2Reg = firstField->GetRegNum(); + + INDEBUG(regNumber argReg = op2Reg); + for (GenTreeFieldList::Use& use : fieldList->Uses()) + { + regCount++; +#ifdef DEBUG + GenTree* argNode = use.GetNode(); + assert(argReg == argNode->GetRegNum()); + argReg = REG_NEXT(argReg); +#endif + } + } + else + { + regCount = 1; + } + + switch (regCount) + { + case 1: + ins = INS_st1; + break; + case 2: + ins = INS_st2; + break; + case 3: + ins = INS_st3; + break; + case 4: + ins = INS_st4; + break; + default: + unreached(); + } + break; + } + default: ins = HWIntrinsicInfo::lookupIns(intrin.id, intrin.baseType); break; @@ -773,7 +819,18 @@ void CodeGen::genHWIntrinsic(GenTreeHWIntrinsic* node) op1Reg); break; + case NI_AdvSimd_Arm64_StorePair: + case NI_AdvSimd_Arm64_StorePairNonTemporal: + GetEmitter()->emitIns_R_R_R(ins, emitSize, op2Reg, op3Reg, op1Reg); + break; + + case NI_AdvSimd_Arm64_StorePairScalar: + case NI_AdvSimd_Arm64_StorePairScalarNonTemporal: + GetEmitter()->emitIns_R_R_R(ins, emitTypeSize(intrin.baseType), op2Reg, op3Reg, op1Reg); + break; + case NI_AdvSimd_StoreSelectedScalar: + case NI_AdvSimd_Arm64_StoreSelectedScalar: { HWIntrinsicImmOpHelper helper(this, intrin.op3, node); @@ -783,18 +840,8 @@ void CodeGen::genHWIntrinsic(GenTreeHWIntrinsic* node) GetEmitter()->emitIns_R_R_I(ins, emitSize, op2Reg, op1Reg, elementIndex, opt); } - } - break; - - case NI_AdvSimd_Arm64_StorePair: - case NI_AdvSimd_Arm64_StorePairNonTemporal: - GetEmitter()->emitIns_R_R_R(ins, emitSize, op2Reg, op3Reg, op1Reg); - break; - - case NI_AdvSimd_Arm64_StorePairScalar: - case NI_AdvSimd_Arm64_StorePairScalarNonTemporal: - GetEmitter()->emitIns_R_R_R(ins, emitTypeSize(intrin.baseType), op2Reg, op3Reg, op1Reg); break; + } case NI_AdvSimd_StoreVector64x2AndZip: case NI_AdvSimd_StoreVector64x3AndZip: diff --git a/src/coreclr/jit/hwintrinsiclistarm64.h b/src/coreclr/jit/hwintrinsiclistarm64.h index 699184d7a9973..1a6c8cd48081b 100644 --- a/src/coreclr/jit/hwintrinsiclistarm64.h +++ b/src/coreclr/jit/hwintrinsiclistarm64.h @@ -478,7 +478,7 @@ HARDWARE_INTRINSIC(AdvSimd, SignExtendWideningLower, HARDWARE_INTRINSIC(AdvSimd, SignExtendWideningUpper, 16, 1, true, {INS_sxtl2, INS_invalid, INS_sxtl2, INS_invalid, INS_sxtl2, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_BaseTypeFromFirstArg) HARDWARE_INTRINSIC(AdvSimd, SqrtScalar, 8, 1, true, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_fsqrt, INS_fsqrt}, HW_Category_SIMD, HW_Flag_SIMDScalar) HARDWARE_INTRINSIC(AdvSimd, Store, -1, 2, true, {INS_st1, INS_st1, INS_st1, INS_st1, INS_st1, INS_st1, INS_st1, INS_st1, INS_st1, INS_st1}, HW_Category_Helper, HW_Flag_SpecialImport|HW_Flag_BaseTypeFromSecondArg|HW_Flag_NoCodeGen) -HARDWARE_INTRINSIC(AdvSimd, StoreSelectedScalar, -1, 3, true, {INS_st1, INS_st1, INS_st1, INS_st1, INS_st1, INS_st1, INS_st1, INS_st1, INS_st1, INS_st1}, HW_Category_MemoryStore, HW_Flag_BaseTypeFromSecondArg|HW_Flag_HasImmediateOperand|HW_Flag_SIMDScalar|HW_Flag_SpecialCodeGen) +HARDWARE_INTRINSIC(AdvSimd, StoreSelectedScalar, 8, 3, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_MemoryStore, HW_Flag_BaseTypeFromFirstArg|HW_Flag_HasImmediateOperand|HW_Flag_SIMDScalar|HW_Flag_SpecialCodeGen|HW_Flag_SpecialImport|HW_Flag_NeedsConsecutiveRegisters) HARDWARE_INTRINSIC(AdvSimd, StoreVector64x2AndZip, 8, 2, true, {INS_st2, INS_st2, INS_st2, INS_st2, INS_st2, INS_st2, INS_invalid, INS_invalid, INS_st2, INS_invalid}, HW_Category_MemoryStore, HW_Flag_BaseTypeFromFirstArg|HW_Flag_SpecialImport|HW_Flag_SpecialCodeGen|HW_Flag_NeedsConsecutiveRegisters) HARDWARE_INTRINSIC(AdvSimd, StoreVector64x3AndZip, 8, 2, true, {INS_st3, INS_st3, INS_st3, INS_st3, INS_st3, INS_st3, INS_invalid, INS_invalid, INS_st3, INS_invalid}, HW_Category_MemoryStore, HW_Flag_BaseTypeFromFirstArg|HW_Flag_SpecialImport|HW_Flag_SpecialCodeGen|HW_Flag_NeedsConsecutiveRegisters) HARDWARE_INTRINSIC(AdvSimd, StoreVector64x4AndZip, 8, 2, true, {INS_st4, INS_st4, INS_st4, INS_st4, INS_st4, INS_st4, INS_invalid, INS_invalid, INS_st4, INS_invalid}, HW_Category_MemoryStore, HW_Flag_BaseTypeFromFirstArg|HW_Flag_SpecialImport|HW_Flag_SpecialCodeGen|HW_Flag_NeedsConsecutiveRegisters) @@ -676,6 +676,7 @@ HARDWARE_INTRINSIC(AdvSimd_Arm64, StorePair, HARDWARE_INTRINSIC(AdvSimd_Arm64, StorePairScalar, 8, 3, true, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_stp, INS_stp, INS_invalid, INS_invalid, INS_stp, INS_invalid}, HW_Category_MemoryStore, HW_Flag_BaseTypeFromSecondArg|HW_Flag_SpecialCodeGen) HARDWARE_INTRINSIC(AdvSimd_Arm64, StorePairScalarNonTemporal, 8, 3, true, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_stnp, INS_stnp, INS_invalid, INS_invalid, INS_stnp, INS_invalid}, HW_Category_MemoryStore, HW_Flag_BaseTypeFromSecondArg|HW_Flag_SpecialCodeGen) HARDWARE_INTRINSIC(AdvSimd_Arm64, StorePairNonTemporal, -1, 3, true, {INS_stnp, INS_stnp, INS_stnp, INS_stnp, INS_stnp, INS_stnp, INS_stnp, INS_stnp, INS_stnp, INS_stp}, HW_Category_MemoryStore, HW_Flag_BaseTypeFromSecondArg|HW_Flag_SpecialCodeGen) +HARDWARE_INTRINSIC(AdvSimd_Arm64, StoreSelectedScalar, 16, 3, false, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid}, HW_Category_MemoryStore, HW_Flag_BaseTypeFromFirstArg|HW_Flag_HasImmediateOperand|HW_Flag_SIMDScalar|HW_Flag_SpecialCodeGen|HW_Flag_SpecialImport|HW_Flag_NeedsConsecutiveRegisters) HARDWARE_INTRINSIC(AdvSimd_Arm64, StoreVector128x2AndZip, 16, 2, true, {INS_st2, INS_st2, INS_st2, INS_st2, INS_st2, INS_st2, INS_st2, INS_st2, INS_st2, INS_st2}, HW_Category_MemoryStore, HW_Flag_BaseTypeFromFirstArg|HW_Flag_SpecialImport|HW_Flag_SpecialCodeGen|HW_Flag_NeedsConsecutiveRegisters) HARDWARE_INTRINSIC(AdvSimd_Arm64, StoreVector128x3AndZip, 16, 2, true, {INS_st3, INS_st3, INS_st3, INS_st3, INS_st3, INS_st3, INS_st3, INS_st3, INS_st3, INS_st3}, HW_Category_MemoryStore, HW_Flag_BaseTypeFromFirstArg|HW_Flag_SpecialImport|HW_Flag_SpecialCodeGen|HW_Flag_NeedsConsecutiveRegisters) HARDWARE_INTRINSIC(AdvSimd_Arm64, StoreVector128x4AndZip, 16, 2, true, {INS_st4, INS_st4, INS_st4, INS_st4, INS_st4, INS_st4, INS_st4, INS_st4, INS_st4, INS_st4}, HW_Category_MemoryStore, HW_Flag_BaseTypeFromFirstArg|HW_Flag_SpecialImport|HW_Flag_SpecialCodeGen|HW_Flag_NeedsConsecutiveRegisters) diff --git a/src/coreclr/jit/lowerarmarch.cpp b/src/coreclr/jit/lowerarmarch.cpp index 0ef5399dff06d..9a314539fd9f9 100644 --- a/src/coreclr/jit/lowerarmarch.cpp +++ b/src/coreclr/jit/lowerarmarch.cpp @@ -3035,6 +3035,7 @@ void Lowering::ContainCheckHWIntrinsic(GenTreeHWIntrinsic* node) case NI_AdvSimd_ExtractVector64: case NI_AdvSimd_ExtractVector128: case NI_AdvSimd_StoreSelectedScalar: + case NI_AdvSimd_Arm64_StoreSelectedScalar: assert(hasImmediateOperand); assert(varTypeIsIntegral(intrin.op3)); if (intrin.op3->IsCnsIntOrI()) diff --git a/src/coreclr/jit/lsraarm64.cpp b/src/coreclr/jit/lsraarm64.cpp index 8d4eee488dd00..0b4b383c491b5 100644 --- a/src/coreclr/jit/lsraarm64.cpp +++ b/src/coreclr/jit/lsraarm64.cpp @@ -1412,6 +1412,7 @@ int LinearScan::BuildHWIntrinsic(GenTreeHWIntrinsic* intrinsicTree, int* pDstCou case NI_AdvSimd_ExtractVector64: case NI_AdvSimd_ExtractVector128: case NI_AdvSimd_StoreSelectedScalar: + case NI_AdvSimd_Arm64_StoreSelectedScalar: needBranchTargetReg = !intrin.op3->isContainedIntOrIImmed(); break; @@ -1577,6 +1578,7 @@ int LinearScan::BuildHWIntrinsic(GenTreeHWIntrinsic* intrinsicTree, int* pDstCou { case NI_AdvSimd_VectorTableLookup: case NI_AdvSimd_Arm64_VectorTableLookup: + { assert(intrin.op2 != nullptr); srcCount += BuildOperandUses(intrin.op2); assert(dstCount == 1); @@ -1584,9 +1586,11 @@ int LinearScan::BuildHWIntrinsic(GenTreeHWIntrinsic* intrinsicTree, int* pDstCou BuildDef(intrinsicTree); *pDstCount = 1; break; + } case NI_AdvSimd_VectorTableLookupExtension: case NI_AdvSimd_Arm64_VectorTableLookupExtension: + { assert(intrin.op2 != nullptr); assert(intrin.op3 != nullptr); assert(isRMW); @@ -1597,6 +1601,23 @@ int LinearScan::BuildHWIntrinsic(GenTreeHWIntrinsic* intrinsicTree, int* pDstCou BuildDef(intrinsicTree); *pDstCount = 1; break; + } + + case NI_AdvSimd_StoreSelectedScalar: + case NI_AdvSimd_Arm64_StoreSelectedScalar: + { + assert(intrin.op1 != nullptr); + assert(intrin.op3 != nullptr); + srcCount += BuildConsecutiveRegistersForUse(intrin.op2); + if (!intrin.op3->isContainedIntOrIImmed()) + { + srcCount += BuildOperandUses(intrin.op3); + } + assert(dstCount == 0); + buildInternalRegisterUses(); + *pDstCount = 0; + break; + } case NI_AdvSimd_StoreVector64x2AndZip: case NI_AdvSimd_StoreVector64x3AndZip: @@ -1610,12 +1631,14 @@ int LinearScan::BuildHWIntrinsic(GenTreeHWIntrinsic* intrinsicTree, int* pDstCou case NI_AdvSimd_Arm64_StoreVector128x2: case NI_AdvSimd_Arm64_StoreVector128x3: case NI_AdvSimd_Arm64_StoreVector128x4: + { assert(intrin.op1 != nullptr); srcCount += BuildConsecutiveRegistersForUse(intrin.op2); assert(dstCount == 0); buildInternalRegisterUses(); *pDstCount = 0; break; + } case NI_AdvSimd_LoadAndInsertScalarVector64x2: case NI_AdvSimd_LoadAndInsertScalarVector64x3: @@ -1623,6 +1646,7 @@ int LinearScan::BuildHWIntrinsic(GenTreeHWIntrinsic* intrinsicTree, int* pDstCou case NI_AdvSimd_Arm64_LoadAndInsertScalarVector128x2: case NI_AdvSimd_Arm64_LoadAndInsertScalarVector128x3: case NI_AdvSimd_Arm64_LoadAndInsertScalarVector128x4: + { assert(intrin.op2 != nullptr); assert(intrin.op3 != nullptr); assert(isRMW); @@ -1634,6 +1658,8 @@ int LinearScan::BuildHWIntrinsic(GenTreeHWIntrinsic* intrinsicTree, int* pDstCou assert(intrinsicTree->OperIsMemoryLoadOrStore()); srcCount += BuildAddrUses(intrin.op3); FALLTHROUGH; + } + case NI_AdvSimd_LoadVector64x2AndUnzip: case NI_AdvSimd_LoadVector64x3AndUnzip: case NI_AdvSimd_LoadVector64x4AndUnzip: diff --git a/src/coreclr/jit/morph.cpp b/src/coreclr/jit/morph.cpp index 58c74e955f91f..1d8d532a437ad 100644 --- a/src/coreclr/jit/morph.cpp +++ b/src/coreclr/jit/morph.cpp @@ -12903,22 +12903,21 @@ void Compiler::fgAssertionGen(GenTree* tree) INDEBUG(unsigned oldAssertionCount = optAssertionCount;); optAssertionGen(tree); - if (tree->GeneratesAssertion()) - { - AssertionIndex const apIndex = tree->GetAssertionInfo().GetAssertionIndex(); - unsigned const bvIndex = apIndex - 1; - + // Helper to note when an existing assertion has been + // brought back to life. + // + auto announce = [&](AssertionIndex apIndex, const char* condition) { #ifdef DEBUG if (verbose) { if (oldAssertionCount == optAssertionCount) { - if (!BitVecOps::IsMember(apTraits, apLocal, bvIndex)) + if (!BitVecOps::IsMember(apTraits, apLocal, apIndex - 1)) { // This tree resurrected an existing assertion. // We call that out here since assertion prop won't. // - printf("GenTreeNode creates assertion:\n"); + printf("GenTreeNode creates %sassertion:\n", condition); gtDispTree(tree, nullptr, nullptr, true); printf("In " FMT_BB " New Local ", compCurBB->bbNum); optPrintAssertion(optGetAssertion(apIndex), apIndex); @@ -12935,7 +12934,69 @@ void Compiler::fgAssertionGen(GenTree* tree) } } #endif + }; + + // For BBJ_COND nodes, we have two assertion out BVs. + // apLocal will be stored on bbAssertionOutIfFalse and be used for false successors. + // apLocalIfTrue will be stored on bbAssertionOutIfTrue and be used for true successors. + // + const bool doCondUpdates = tree->OperIs(GT_JTRUE) && compCurBB->KindIs(BBJ_COND) && (compCurBB->NumSucc() == 2); + + // Intialize apLocalIfTrue if we might look for it later, + // even if it ends up identical to apLocal. + // + if (doCondUpdates) + { + apLocalIfTrue = BitVecOps::MakeCopy(apTraits, apLocal); + } + + if (!tree->GeneratesAssertion()) + { + return; + } + + AssertionInfo info = tree->GetAssertionInfo(); + + if (doCondUpdates) + { + // Update apLocal and apIfTrue with suitable assertions + // from the JTRUE + // + assert(optCrossBlockLocalAssertionProp); + + AssertionIndex ifFalseAssertionIndex; + AssertionIndex ifTrueAssertionIndex; + + if (info.IsNextEdgeAssertion()) + { + ifFalseAssertionIndex = info.GetAssertionIndex(); + ifTrueAssertionIndex = optFindComplementary(ifFalseAssertionIndex); + } + else + { + ifTrueAssertionIndex = info.GetAssertionIndex(); + ifFalseAssertionIndex = optFindComplementary(ifTrueAssertionIndex); + } + + if (ifTrueAssertionIndex != NO_ASSERTION_INDEX) + { + announce(ifTrueAssertionIndex, " [if true]"); + unsigned const bvIndex = ifTrueAssertionIndex - 1; + BitVecOps::AddElemD(apTraits, apLocalIfTrue, bvIndex); + } + if (ifFalseAssertionIndex != NO_ASSERTION_INDEX) + { + announce(ifFalseAssertionIndex, " [if false]"); + unsigned const bvIndex = ifFalseAssertionIndex - 1; + BitVecOps::AddElemD(apTraits, apLocal, ifFalseAssertionIndex - 1); + } + } + else + { + AssertionIndex const apIndex = tree->GetAssertionInfo().GetAssertionIndex(); + announce(apIndex, ""); + unsigned const bvIndex = apIndex - 1; BitVecOps::AddElemD(apTraits, apLocal, bvIndex); } } @@ -13833,17 +13894,44 @@ void Compiler::fgMorphBlock(BasicBlock* block, unsigned highestReachablePostorde continue; } - // Yes, pred assertions are available. If this is the first pred, copy. + // Yes, pred assertions are available. + // If the pred is (a non-degenerate) BBJ_COND, fetch the appropriate out set. + // + ASSERT_TP assertionsOut = pred->bbAssertionOut; + + if (pred->KindIs(BBJ_COND) && (pred->NumSucc() == 2)) + { + if (block == pred->GetJumpDest()) + { + JITDUMP("Using `if true` assertions from pred " FMT_BB "\n", pred->bbNum); + assertionsOut = pred->bbAssertionOutIfTrue; + } + else + { + assert(block == pred->Next()); + JITDUMP("Using `if false` assertions from pred " FMT_BB "\n", pred->bbNum); + assertionsOut = pred->bbAssertionOutIfFalse; + } + } + + // If this is the first pred, copy (or share, when block is the only successor). // If this is a subsequent pred, intersect. // if (!hasPredAssertions) { - apLocal = BitVecOps::MakeCopy(apTraits, pred->bbAssertionOut); + if (block->NumSucc() == 1) + { + apLocal = assertionsOut; + } + else + { + apLocal = BitVecOps::MakeCopy(apTraits, assertionsOut); + } hasPredAssertions = true; } else { - BitVecOps::IntersectionD(apTraits, apLocal, pred->bbAssertionOut); + BitVecOps::IntersectionD(apTraits, apLocal, assertionsOut); } } @@ -13884,7 +13972,19 @@ void Compiler::fgMorphBlock(BasicBlock* block, unsigned highestReachablePostorde if (optCrossBlockLocalAssertionProp && (block->NumSucc() > 0)) { assert(optLocalAssertionProp); - block->bbAssertionOut = BitVecOps::MakeCopy(apTraits, apLocal); + + if (block->KindIs(BBJ_COND)) + { + // We don't need to make a copy of the if true set; this BV + // was freshly copied in fgAssertionGen + // + block->bbAssertionOutIfTrue = apLocalIfTrue; + block->bbAssertionOutIfFalse = BitVecOps::MakeCopy(apTraits, apLocal); + } + else + { + block->bbAssertionOut = BitVecOps::MakeCopy(apTraits, apLocal); + } } compCurBB = nullptr; diff --git a/src/coreclr/jit/ssabuilder.cpp b/src/coreclr/jit/ssabuilder.cpp index 2ad8108c9cd9a..5601d58864ab1 100644 --- a/src/coreclr/jit/ssabuilder.cpp +++ b/src/coreclr/jit/ssabuilder.cpp @@ -231,12 +231,10 @@ void SsaBuilder::ComputeImmediateDom(BasicBlock** postOrder, int count) JITDUMP("[SsaBuilder::ComputeImmediateDom]\n"); // Add entry point to visited as its IDom is NULL. - BitVecOps::ClearD(&m_visitedTraits, m_visited); - BitVecOps::AddElemD(&m_visitedTraits, m_visited, m_pCompiler->fgFirstBB->bbNum); - assert(postOrder[count - 1] == m_pCompiler->fgFirstBB); - bool changed = true; + unsigned numIters = 0; + bool changed = true; while (changed) { changed = false; @@ -248,40 +246,28 @@ void SsaBuilder::ComputeImmediateDom(BasicBlock** postOrder, int count) DBG_SSA_JITDUMP("Visiting in reverse post order: " FMT_BB ".\n", block->bbNum); - // Find the first processed predecessor block. - BasicBlock* predBlock = nullptr; - for (FlowEdge* pred = m_pCompiler->BlockPredsWithEH(block); pred; pred = pred->getNextPredEdge()) + // Intersect DOM, if computed, for all predecessors. + BasicBlock* bbIDom = nullptr; + for (FlowEdge* pred = m_pCompiler->BlockDominancePreds(block); pred; pred = pred->getNextPredEdge()) { - if (BitVecOps::IsMember(&m_visitedTraits, m_visited, pred->getSourceBlock()->bbNum)) + BasicBlock* domPred = pred->getSourceBlock(); + if ((domPred->bbPostorderNum >= (unsigned)count) || (postOrder[domPred->bbPostorderNum] != domPred)) { - predBlock = pred->getSourceBlock(); - break; + continue; // Unreachable pred } - } - // There could just be a single basic block, so just check if there were any preds. - if (predBlock != nullptr) - { - DBG_SSA_JITDUMP("Pred block is " FMT_BB ".\n", predBlock->bbNum); - } + if ((numIters <= 0) && (domPred->bbPostorderNum <= (unsigned)i)) + { + continue; // Pred not yet visited + } - // Intersect DOM, if computed, for all predecessors. - BasicBlock* bbIDom = predBlock; - for (FlowEdge* pred = m_pCompiler->BlockPredsWithEH(block); pred; pred = pred->getNextPredEdge()) - { - if (predBlock != pred->getSourceBlock()) + if (bbIDom == nullptr) { - BasicBlock* domAncestor = IntersectDom(pred->getSourceBlock(), bbIDom); - // The result may be NULL if "block" and "pred->getBlock()" are part of a - // cycle -- neither is guaranteed ordered wrt the other in reverse postorder, - // so we may be computing the IDom of "block" before the IDom of "pred->getBlock()" has - // been computed. But that's OK -- if they're in a cycle, they share the same immediate - // dominator, so the contribution of "pred->getBlock()" is not necessary to compute - // the result. - if (domAncestor != nullptr) - { - bbIDom = domAncestor; - } + bbIDom = domPred; + } + else + { + bbIDom = IntersectDom(bbIDom, domPred); } } @@ -295,11 +281,10 @@ void SsaBuilder::ComputeImmediateDom(BasicBlock** postOrder, int count) block->bbIDom = bbIDom; } - // Mark the current block as visited. - BitVecOps::AddElemD(&m_visitedTraits, m_visited, block->bbNum); - DBG_SSA_JITDUMP("Marking block " FMT_BB " as processed.\n", block->bbNum); } + + numIters++; } } @@ -341,8 +326,10 @@ void SsaBuilder::ComputeDominanceFrontiers(BasicBlock** postOrder, int count, Bl FlowEdge* blockPreds = m_pCompiler->BlockPredsWithEH(block); - // If block has 0/1 predecessor, skip. - if ((blockPreds == nullptr) || (blockPreds->getNextPredEdge() == nullptr)) + // If block has 0/1 predecessor, skip, apart from handler entry blocks + // that are always in the dominance frontier of its enclosed blocks. + if (!m_pCompiler->bbIsHandlerBeg(block) && + ((blockPreds == nullptr) || (blockPreds->getNextPredEdge() == nullptr))) { DBG_SSA_JITDUMP(" Has %d preds; skipping.\n", blockPreds == nullptr ? 0 : 1); continue; @@ -1310,7 +1297,7 @@ void SsaBuilder::AddPhiArgsToSuccessors(BasicBlock* block) GenTreePhi* phi = tree->AsLclVar()->Data()->AsPhi(); unsigned ssaNum = m_renameStack.Top(lclNum); - AddPhiArg(handlerStart, stmt, phi, lclNum, ssaNum, block); + AddPhiArg(handlerStart, stmt, phi, lclNum, ssaNum, succ); } // Now handle memory. diff --git a/src/coreclr/nativeaot/.editorconfig b/src/coreclr/nativeaot/.editorconfig new file mode 100644 index 0000000000000..18d8e0338b447 --- /dev/null +++ b/src/coreclr/nativeaot/.editorconfig @@ -0,0 +1,4 @@ +### Code Style Analyzers + +[*.cs] +dotnet_separate_import_directive_groups = true diff --git a/src/coreclr/nativeaot/Common/src/Internal/Runtime/TypeLoader/ExternalReferencesTable.cs b/src/coreclr/nativeaot/Common/src/Internal/Runtime/TypeLoader/ExternalReferencesTable.cs index dcc61676bea58..1dd762b489d7f 100644 --- a/src/coreclr/nativeaot/Common/src/Internal/Runtime/TypeLoader/ExternalReferencesTable.cs +++ b/src/coreclr/nativeaot/Common/src/Internal/Runtime/TypeLoader/ExternalReferencesTable.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; + using Internal.Runtime.Augments; namespace Internal.Runtime.TypeLoader diff --git a/src/coreclr/nativeaot/Common/src/System/Collections/Concurrent/ConcurrentUnifier.cs b/src/coreclr/nativeaot/Common/src/System/Collections/Concurrent/ConcurrentUnifier.cs index 73c81ddf45797..a790e0aeb5010 100644 --- a/src/coreclr/nativeaot/Common/src/System/Collections/Concurrent/ConcurrentUnifier.cs +++ b/src/coreclr/nativeaot/Common/src/System/Collections/Concurrent/ConcurrentUnifier.cs @@ -2,10 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Threading; -using System.Diagnostics; using System.Collections; using System.Collections.Generic; +using System.Diagnostics; +using System.Threading; namespace System.Collections.Concurrent { diff --git a/src/coreclr/nativeaot/Common/src/System/Collections/Concurrent/ConcurrentUnifierW.cs b/src/coreclr/nativeaot/Common/src/System/Collections/Concurrent/ConcurrentUnifierW.cs index 321419e4aa5c0..69cfde1e48e3b 100644 --- a/src/coreclr/nativeaot/Common/src/System/Collections/Concurrent/ConcurrentUnifierW.cs +++ b/src/coreclr/nativeaot/Common/src/System/Collections/Concurrent/ConcurrentUnifierW.cs @@ -2,10 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Threading; -using System.Diagnostics; using System.Collections; using System.Collections.Generic; +using System.Diagnostics; +using System.Threading; namespace System.Collections.Concurrent { diff --git a/src/coreclr/nativeaot/Common/src/System/Collections/Concurrent/ConcurrentUnifierWKeyed.cs b/src/coreclr/nativeaot/Common/src/System/Collections/Concurrent/ConcurrentUnifierWKeyed.cs index ca6e5c05ae06b..9ce60a5151857 100644 --- a/src/coreclr/nativeaot/Common/src/System/Collections/Concurrent/ConcurrentUnifierWKeyed.cs +++ b/src/coreclr/nativeaot/Common/src/System/Collections/Concurrent/ConcurrentUnifierWKeyed.cs @@ -2,10 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Threading; -using System.Diagnostics; using System.Collections; using System.Collections.Generic; +using System.Diagnostics; +using System.Threading; namespace System.Collections.Concurrent { diff --git a/src/coreclr/nativeaot/Common/src/System/Collections/Concurrent/IKeyedItem.cs b/src/coreclr/nativeaot/Common/src/System/Collections/Concurrent/IKeyedItem.cs index e5c965af32656..7d4c17fe0c42d 100644 --- a/src/coreclr/nativeaot/Common/src/System/Collections/Concurrent/IKeyedItem.cs +++ b/src/coreclr/nativeaot/Common/src/System/Collections/Concurrent/IKeyedItem.cs @@ -2,9 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Diagnostics; using System.Collections; using System.Collections.Generic; +using System.Diagnostics; namespace System.Collections.Concurrent { diff --git a/src/coreclr/nativeaot/Common/src/System/Collections/Generic/Empty.cs b/src/coreclr/nativeaot/Common/src/System/Collections/Generic/Empty.cs index bef0bfde53d33..c2b9bbae1c6ea 100644 --- a/src/coreclr/nativeaot/Common/src/System/Collections/Generic/Empty.cs +++ b/src/coreclr/nativeaot/Common/src/System/Collections/Generic/Empty.cs @@ -2,9 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Diagnostics; using System.Collections; using System.Collections.Generic; +using System.Diagnostics; namespace System.Collections.Generic { diff --git a/src/coreclr/nativeaot/Runtime.Base/src/System/Runtime/ExceptionHandling.cs b/src/coreclr/nativeaot/Runtime.Base/src/System/Runtime/ExceptionHandling.cs index 6afba425d789b..ee9f7f4824257 100644 --- a/src/coreclr/nativeaot/Runtime.Base/src/System/Runtime/ExceptionHandling.cs +++ b/src/coreclr/nativeaot/Runtime.Base/src/System/Runtime/ExceptionHandling.cs @@ -4,6 +4,7 @@ using System.Diagnostics; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; + #if NATIVEAOT using Internal.Runtime; #else diff --git a/src/coreclr/nativeaot/Runtime.Base/src/System/Runtime/InternalCalls.cs b/src/coreclr/nativeaot/Runtime.Base/src/System/Runtime/InternalCalls.cs index c47770bed0947..f39cce128aa99 100644 --- a/src/coreclr/nativeaot/Runtime.Base/src/System/Runtime/InternalCalls.cs +++ b/src/coreclr/nativeaot/Runtime.Base/src/System/Runtime/InternalCalls.cs @@ -5,8 +5,8 @@ // This is where we group together all the internal calls. // -using System.Runtime.InteropServices; using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; using Internal.Runtime; diff --git a/src/coreclr/nativeaot/Runtime.Base/src/System/Runtime/RuntimeExports.cs b/src/coreclr/nativeaot/Runtime.Base/src/System/Runtime/RuntimeExports.cs index bfa94ec8ca39f..b1092eb2aca6d 100644 --- a/src/coreclr/nativeaot/Runtime.Base/src/System/Runtime/RuntimeExports.cs +++ b/src/coreclr/nativeaot/Runtime.Base/src/System/Runtime/RuntimeExports.cs @@ -6,8 +6,8 @@ // using System.Diagnostics; -using System.Runtime.InteropServices; using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; using Internal.Runtime; diff --git a/src/coreclr/nativeaot/Runtime.Base/src/System/Runtime/TypeCast.cs b/src/coreclr/nativeaot/Runtime.Base/src/System/Runtime/TypeCast.cs index 95dbc8d7e9318..3dcf2bae02f24 100644 --- a/src/coreclr/nativeaot/Runtime.Base/src/System/Runtime/TypeCast.cs +++ b/src/coreclr/nativeaot/Runtime.Base/src/System/Runtime/TypeCast.cs @@ -5,6 +5,7 @@ using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Threading; + using Internal.Runtime; namespace System.Runtime diff --git a/src/coreclr/nativeaot/Runtime.Base/src/System/Runtime/__Finalizer.cs b/src/coreclr/nativeaot/Runtime.Base/src/System/Runtime/__Finalizer.cs index dc9de9f17cc8e..b88c8033eb8f8 100644 --- a/src/coreclr/nativeaot/Runtime.Base/src/System/Runtime/__Finalizer.cs +++ b/src/coreclr/nativeaot/Runtime.Base/src/System/Runtime/__Finalizer.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Runtime.InteropServices; using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; // // Implements the single finalizer thread for a Redhawk instance. Essentially waits for an event to fire diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/IntrinsicSupport/EqualityComparerHelpers.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/IntrinsicSupport/EqualityComparerHelpers.cs index dc63cad6caeb6..b35bee1fca61d 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/IntrinsicSupport/EqualityComparerHelpers.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/IntrinsicSupport/EqualityComparerHelpers.cs @@ -11,6 +11,7 @@ using System; using System.Collections.Generic; using System.Runtime.CompilerServices; + using Internal.Runtime.Augments; namespace Internal.IntrinsicSupport diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Reflection/Augments/ReflectionAugments.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Reflection/Augments/ReflectionAugments.cs index d7202294d1055..cc42a78d9da2c 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Reflection/Augments/ReflectionAugments.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Reflection/Augments/ReflectionAugments.cs @@ -17,11 +17,11 @@ // Reflection.Core.dll using System; -using System.Reflection; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Numerics; +using System.Reflection; using EETypeElementType = Internal.Runtime.EETypeElementType; diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Reflection/Core/AssemblyBinder.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Reflection/Core/AssemblyBinder.cs index 9646731da80c2..a59701eb8c85b 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Reflection/Core/AssemblyBinder.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Reflection/Core/AssemblyBinder.cs @@ -4,11 +4,12 @@ using System; using System.Collections.Generic; using System.Reflection; -using Internal.Metadata.NativeFormat; using System.Reflection.Runtime.General; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; +using Internal.Metadata.NativeFormat; + namespace Internal.Reflection.Core { // Auto StructLayout used to suppress warning that order of fields is not guaranteed in partial structs diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Reflection/Core/Execution/ExecutionEnvironment.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Reflection/Core/Execution/ExecutionEnvironment.cs index 7ff7da80f79d5..b990dac4712eb 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Reflection/Core/Execution/ExecutionEnvironment.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Reflection/Core/Execution/ExecutionEnvironment.cs @@ -2,18 +2,19 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.IO; -using System.Reflection; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; +using System.IO; using System.Numerics; +using System.Reflection; using System.Reflection.Runtime.General; +using System.Reflection.Runtime.MethodInfos; using System.Reflection.Runtime.TypeInfos; using System.Runtime.CompilerServices; + using Internal.Metadata.NativeFormat; using OpenMethodInvoker = System.Reflection.Runtime.MethodInfos.OpenMethodInvoker; -using System.Reflection.Runtime.MethodInfos; namespace Internal.Reflection.Core.Execution { diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Reflection/Core/Execution/FieldAccessor.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Reflection/Core/Execution/FieldAccessor.cs index af157f4ee504e..b378d139bc0ee 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Reflection/Core/Execution/FieldAccessor.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Reflection/Core/Execution/FieldAccessor.cs @@ -2,9 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Reflection; -using System.Diagnostics; using System.Collections.Generic; +using System.Diagnostics; +using System.Reflection; using System.Runtime.CompilerServices; namespace Internal.Reflection.Core.Execution diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Reflection/Core/Execution/MethodBaseInvoker.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Reflection/Core/Execution/MethodBaseInvoker.cs index 19589a2be4e6c..78fc4d99d2792 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Reflection/Core/Execution/MethodBaseInvoker.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Reflection/Core/Execution/MethodBaseInvoker.cs @@ -2,9 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Reflection; using System.Diagnostics; using System.Globalization; +using System.Reflection; using System.Reflection.Runtime.General; using System.Runtime.CompilerServices; diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Reflection/Core/Execution/ReflectionCoreExecution.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Reflection/Core/Execution/ReflectionCoreExecution.cs index 83bdd90d08f5c..5825786d73645 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Reflection/Core/Execution/ReflectionCoreExecution.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Reflection/Core/Execution/ReflectionCoreExecution.cs @@ -2,9 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Reflection; using System.Collections.Generic; using System.Diagnostics; +using System.Reflection; using System.Reflection.Runtime.General; using System.Runtime.CompilerServices; diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Reflection/Core/NonPortable/RuntimeTypeUnifier.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Reflection/Core/NonPortable/RuntimeTypeUnifier.cs index 9a6d68bdd5ea8..c5773c6beb145 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Reflection/Core/NonPortable/RuntimeTypeUnifier.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Reflection/Core/NonPortable/RuntimeTypeUnifier.cs @@ -2,9 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Diagnostics; -using System.Collections.Generic; using System.Collections.Concurrent; +using System.Collections.Generic; +using System.Diagnostics; using System.Runtime.CompilerServices; using Internal.Runtime; diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Reflection/Extensions/NonPortable/CustomAttributeInheritanceRules.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Reflection/Extensions/NonPortable/CustomAttributeInheritanceRules.cs index bb7d373739edc..49f8da7bc28bc 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Reflection/Extensions/NonPortable/CustomAttributeInheritanceRules.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Reflection/Extensions/NonPortable/CustomAttributeInheritanceRules.cs @@ -2,11 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Reflection; -using System.Diagnostics; using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; +using System.Diagnostics; +using System.Reflection; using Internal.Reflection.Augments; diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Reflection/Extensions/NonPortable/CustomAttributeInstantiator.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Reflection/Extensions/NonPortable/CustomAttributeInstantiator.cs index 8c1ee196f32ea..622ce2c83c7e1 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Reflection/Extensions/NonPortable/CustomAttributeInstantiator.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Reflection/Extensions/NonPortable/CustomAttributeInstantiator.cs @@ -2,12 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Reflection; -using System.Diagnostics; -using System.Diagnostics.CodeAnalysis; using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; +using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; +using System.Reflection; using Internal.Runtime.Augments; @@ -126,8 +126,6 @@ public static Attribute Instantiate(this CustomAttributeData cad) // // Convert the argument value reported by Reflection into an actual object. // - [UnconditionalSuppressMessage("AotAnalysis", "IL3050:RequiresDynamicCode", - Justification = "The AOT compiler ensures array types required by custom attribute blobs are generated.")] private static object? Convert(this CustomAttributeTypedArgument typedArgument) { Type argumentType = typedArgument.ArgumentType; @@ -144,8 +142,7 @@ public static Attribute Instantiate(this CustomAttributeData cad) IList? typedElements = (IList?)(typedArgument.Value); if (typedElements == null) return null; - Type? elementType = argumentType.GetElementType(); - Array array = Array.CreateInstance(elementType, typedElements.Count); + Array array = Array.CreateInstanceFromArrayType(argumentType, typedElements.Count); for (int i = 0; i < typedElements.Count; i++) { object? elementValue = typedElements[i].Convert(); diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Reflection/Extensions/NonPortable/CustomAttributeSearcher.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Reflection/Extensions/NonPortable/CustomAttributeSearcher.cs index 7f188812d1779..89ede0e6d92fe 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Reflection/Extensions/NonPortable/CustomAttributeSearcher.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Reflection/Extensions/NonPortable/CustomAttributeSearcher.cs @@ -2,11 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Reflection; -using System.Diagnostics; using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; +using System.Diagnostics; +using System.Reflection; //================================================================================================================== // Dependency note: diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/Augments/RuntimeAugments.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/Augments/RuntimeAugments.cs index f6e4cb4586a5b..61472759604d6 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/Augments/RuntimeAugments.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/Augments/RuntimeAugments.cs @@ -17,13 +17,13 @@ // Reflection.Execution.dll using System; -using System.Reflection; -using System.Runtime; +using System.Collections.Generic; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; -using System.Collections.Generic; -using System.Runtime.InteropServices; +using System.Reflection; +using System.Runtime; using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; using System.Threading; using Internal.Runtime.CompilerHelpers; diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/Augments/StackTraceMetadataCallbacks.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/Augments/StackTraceMetadataCallbacks.cs index fbfb2172541fb..655c460352de3 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/Augments/StackTraceMetadataCallbacks.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/Augments/StackTraceMetadataCallbacks.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; + using Internal.Runtime.CompilerServices; namespace Internal.Runtime.Augments diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/Augments/TypeLoaderCallbacks.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/Augments/TypeLoaderCallbacks.cs index 796b55c0bb311..7dc7641435e5e 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/Augments/TypeLoaderCallbacks.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/Augments/TypeLoaderCallbacks.cs @@ -2,12 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Runtime; using System.Collections.Generic; +using System.Runtime; -using Internal.Runtime.CompilerServices; -using Internal.NativeFormat; using Internal.Metadata.NativeFormat; +using Internal.NativeFormat; +using Internal.Runtime.CompilerServices; namespace Internal.Runtime.Augments { diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/CompilerHelpers/ArrayHelpers.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/CompilerHelpers/ArrayHelpers.cs index dd32b1afad699..31d845248548c 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/CompilerHelpers/ArrayHelpers.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/CompilerHelpers/ArrayHelpers.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Runtime; using System.Diagnostics.CodeAnalysis; +using System.Runtime; using Debug = System.Diagnostics.Debug; diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/CompilerHelpers/RuntimeInteropData.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/CompilerHelpers/RuntimeInteropData.cs index e85687dd037f4..b0f16ff7997f6 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/CompilerHelpers/RuntimeInteropData.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/CompilerHelpers/RuntimeInteropData.cs @@ -4,10 +4,11 @@ using System; using System.Runtime; +using System.Runtime.InteropServices; + +using Internal.NativeFormat; using Internal.Runtime.Augments; using Internal.Runtime.TypeLoader; -using Internal.NativeFormat; -using System.Runtime.InteropServices; namespace Internal.Runtime.CompilerHelpers { diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/CompilerServices/FunctionPointerOps.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/CompilerServices/FunctionPointerOps.cs index eb4cb2437dfa1..a0f5312c92304 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/CompilerServices/FunctionPointerOps.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/CompilerServices/FunctionPointerOps.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; using System.Runtime.InteropServices; + using Internal.Runtime.Augments; namespace Internal.Runtime.CompilerServices diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/CompilerServices/OpenMethodResolver.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/CompilerServices/OpenMethodResolver.cs index ba71680b302e6..d3f21f5b6da98 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/CompilerServices/OpenMethodResolver.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/CompilerServices/OpenMethodResolver.cs @@ -4,9 +4,9 @@ using System; using System.Collections.Generic; using System.Diagnostics; -using System.Runtime.InteropServices; -using System.Runtime.CompilerServices; using System.Runtime; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; using Internal.Runtime.Augments; diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/CompilerServices/RuntimeMethodHandleInfo.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/CompilerServices/RuntimeMethodHandleInfo.cs index 7cb1f976ff61e..4952972b59ba8 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/CompilerServices/RuntimeMethodHandleInfo.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/CompilerServices/RuntimeMethodHandleInfo.cs @@ -1,11 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System; +using System.Diagnostics; using System.Reflection; using System.Runtime.InteropServices; -using System; + using Internal.Runtime.Augments; -using System.Diagnostics; namespace Internal.Runtime.CompilerServices { diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/CompilerServices/RuntimeSignature.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/CompilerServices/RuntimeSignature.cs index 7e372818fd3de..97e7c4a25a520 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/CompilerServices/RuntimeSignature.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/CompilerServices/RuntimeSignature.cs @@ -2,8 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Runtime; using System.Diagnostics; +using System.Runtime; + using Internal.Runtime.Augments; namespace Internal.Runtime.CompilerServices diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/ThreadStatics.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/ThreadStatics.cs index 33b4ce5fcb60a..2c58b4c1aa228 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/ThreadStatics.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/ThreadStatics.cs @@ -5,6 +5,7 @@ using System.Runtime; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; + using Internal.Runtime.CompilerHelpers; using Debug = System.Diagnostics.Debug; diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Activator.NativeAot.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Activator.NativeAot.cs index 982a9190840e7..5567f3a52fb08 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Activator.NativeAot.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Activator.NativeAot.cs @@ -10,9 +10,9 @@ using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Reflection; +using System.Runtime; using System.Runtime.CompilerServices; using System.Runtime.Remoting; -using System.Runtime; using Internal.Reflection.Augments; using Internal.Runtime.CompilerServices; diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/ActivatorImplementation.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/ActivatorImplementation.cs index b5ff4f3480157..7a0eb2762e860 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/ActivatorImplementation.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/ActivatorImplementation.cs @@ -1,12 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Reflection; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Globalization; -using System.Reflection.Runtime.General; +using System.Reflection; using System.Reflection.Runtime.BindingFlagSupport; +using System.Reflection.Runtime.General; using Internal.Runtime.Augments; diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Array.NativeAot.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Array.NativeAot.cs index 8115756c8dca5..b3128634dadc9 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Array.NativeAot.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Array.NativeAot.cs @@ -1,23 +1,24 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Runtime; -using System.Threading; using System.Collections; -using System.Diagnostics; -using System.Diagnostics.CodeAnalysis; using System.Collections.Generic; using System.Collections.ObjectModel; +using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Reflection; -using System.Runtime.InteropServices; +using System.Runtime; using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Threading; +using Internal.IntrinsicSupport; +using Internal.Reflection.Core.NonPortable; using Internal.Runtime.Augments; using Internal.Runtime.CompilerServices; -using Internal.Reflection.Core.NonPortable; -using Internal.IntrinsicSupport; -using MethodTable = Internal.Runtime.MethodTable; + using EETypeElementType = Internal.Runtime.EETypeElementType; +using MethodTable = Internal.Runtime.MethodTable; namespace System { @@ -58,7 +59,12 @@ internal unsafe bool IsSzArray [RequiresDynamicCode("The code for an array of the specified type might not be available.")] private static unsafe Array InternalCreate(RuntimeType elementType, int rank, int* pLengths, int* pLowerBounds) { - ValidateElementType(elementType); + if (elementType.IsByRef || elementType.IsByRefLike) + throw new NotSupportedException(SR.NotSupported_ByRefLikeArray); + if (elementType == typeof(void)) + throw new NotSupportedException(SR.NotSupported_VoidArray); + if (elementType.ContainsGenericParameters) + throw new NotSupportedException(SR.NotSupported_OpenType); if (pLowerBounds != null) { @@ -72,34 +78,59 @@ private static unsafe Array InternalCreate(RuntimeType elementType, int rank, in if (rank == 1) { return RuntimeImports.RhNewArray(elementType.MakeArrayType().TypeHandle.ToEETypePtr(), pLengths[0]); - } else { - // Create a local copy of the lengths that cannot be motified by the caller + Type arrayType = elementType.MakeArrayType(rank); + + // Create a local copy of the lengths that cannot be modified by the caller int* pImmutableLengths = stackalloc int[rank]; for (int i = 0; i < rank; i++) pImmutableLengths[i] = pLengths[i]; - return NewMultiDimArray(elementType.MakeArrayType(rank).TypeHandle.ToEETypePtr(), pImmutableLengths, rank); + return NewMultiDimArray(arrayType.TypeHandle.ToEETypePtr(), pImmutableLengths, rank); } } -#pragma warning disable CA1859 // https://github.com/dotnet/roslyn-analyzers/issues/6451 - private static void ValidateElementType(Type elementType) + [UnconditionalSuppressMessage("AotAnalysis", "IL3050:RequiresDynamicCode", + Justification = "The compiler ensures that if we have a TypeHandle of a Rank-1 MdArray, we also generated the SzArray.")] + private static unsafe Array InternalCreateFromArrayType(RuntimeType arrayType, int rank, int* pLengths, int* pLowerBounds) { - while (elementType.IsArray) + Debug.Assert(arrayType.IsArray); + Debug.Assert(arrayType.GetArrayRank() == rank); + + if (arrayType.ContainsGenericParameters) + throw new NotSupportedException(SR.NotSupported_OpenType); + + if (pLowerBounds != null) { - elementType = elementType.GetElementType()!; + for (int i = 0; i < rank; i++) + { + if (pLowerBounds[i] != 0) + throw new PlatformNotSupportedException(SR.PlatformNotSupported_NonZeroLowerBound); + } + } + + EETypePtr eeType = arrayType.TypeHandle.ToEETypePtr(); + if (rank == 1) + { + // Multidimensional array of rank 1 with 0 lower bounds gets actually allocated + // as an SzArray. SzArray is castable to MdArray rank 1. + if (!eeType.IsSzArray) + eeType = arrayType.GetElementType().MakeArrayType().TypeHandle.ToEETypePtr(); + + return RuntimeImports.RhNewArray(eeType, pLengths[0]); + } + else + { + // Create a local copy of the lengths that cannot be modified by the caller + int* pImmutableLengths = stackalloc int[rank]; + for (int i = 0; i < rank; i++) + pImmutableLengths[i] = pLengths[i]; + + return NewMultiDimArray(eeType, pImmutableLengths, rank); } - if (elementType.IsByRef || elementType.IsByRefLike) - throw new NotSupportedException(SR.NotSupported_ByRefLikeArray); - if (elementType == typeof(void)) - throw new NotSupportedException(SR.NotSupported_VoidArray); - if (elementType.ContainsGenericParameters) - throw new NotSupportedException(SR.NotSupported_OpenType); } -#pragma warning restore CA1859 public unsafe void Initialize() { diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Buffer.NativeAot.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Buffer.NativeAot.cs index 4dd685c522136..caf6d9b7089a3 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Buffer.NativeAot.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Buffer.NativeAot.cs @@ -4,6 +4,7 @@ using System.Diagnostics; using System.Runtime; using System.Runtime.CompilerServices; + using Internal.Runtime.CompilerServices; namespace System diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/ArraySortHelper.NativeAot.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/ArraySortHelper.NativeAot.cs index 682cf4e75c505..41fb6dc70d7d1 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/ArraySortHelper.NativeAot.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Collections/Generic/ArraySortHelper.NativeAot.cs @@ -2,9 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. #nullable enable +using System.Diagnostics; using System.Globalization; using System.Runtime.CompilerServices; -using System.Diagnostics; using System.Runtime.Versioning; namespace System.Collections.Generic diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/CrashInfo.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/CrashInfo.cs index dd5593140e0ec..43c098161607e 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/CrashInfo.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/CrashInfo.cs @@ -5,6 +5,7 @@ using System.Runtime; using System.Runtime.CompilerServices; using System.Text; + using Internal.DeveloperExperience; namespace System diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Delegate.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Delegate.cs index c58523b07d547..a427896ac230c 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Delegate.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Delegate.cs @@ -1,14 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Text; -using System.Runtime; -using System.Reflection; -using System.Runtime.Serialization; -using System.Runtime.InteropServices; -using System.Runtime.CompilerServices; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; +using System.Reflection; +using System.Runtime; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Runtime.Serialization; +using System.Text; + using Internal.Reflection.Augments; using Internal.Runtime.Augments; using Internal.Runtime.CompilerServices; diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Diagnostics/Debug.NativeAot.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Diagnostics/Debug.NativeAot.cs index 9c94f1965b053..c77b5d7a93a33 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Diagnostics/Debug.NativeAot.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Diagnostics/Debug.NativeAot.cs @@ -1,10 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Internal.DeveloperExperience; using System.Runtime.CompilerServices; using System.Security; +using Internal.DeveloperExperience; + namespace System.Diagnostics { // .NET Native-specific Debug implementation diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Diagnostics/Eventing/NativeRuntimeEventSource.Threading.NativeSinks.NativeAot.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Diagnostics/Eventing/NativeRuntimeEventSource.Threading.NativeSinks.NativeAot.cs index b7db6c9618df9..69e0dbadf06f3 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Diagnostics/Eventing/NativeRuntimeEventSource.Threading.NativeSinks.NativeAot.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Diagnostics/Eventing/NativeRuntimeEventSource.Threading.NativeSinks.NativeAot.cs @@ -1,11 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Diagnostics.Tracing; using System.Runtime; +using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Threading; -using System.Diagnostics.Tracing; -using System.Runtime.CompilerServices; using Internal.Runtime; using Internal.Runtime.CompilerServices; diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/EETypePtr.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/EETypePtr.cs index 28d30d0e4eaed..22a53bda439b4 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/EETypePtr.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/EETypePtr.cs @@ -10,17 +10,17 @@ ** ===========================================================*/ -using System.Runtime; using System.Diagnostics; -using System.Runtime.InteropServices; +using System.Runtime; using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; using Internal.Runtime.CompilerServices; +using CorElementType = System.Reflection.CorElementType; +using EETypeElementType = Internal.Runtime.EETypeElementType; using MethodTable = Internal.Runtime.MethodTable; using MethodTableList = Internal.Runtime.MethodTableList; -using EETypeElementType = Internal.Runtime.EETypeElementType; -using CorElementType = System.Reflection.CorElementType; namespace System { diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Enum.NativeAot.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Enum.NativeAot.cs index cda0ea30b4dc0..15c6d8eb65097 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Enum.NativeAot.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Enum.NativeAot.cs @@ -8,9 +8,10 @@ using System.Runtime; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; + +using Internal.Reflection.Augments; using Internal.Runtime.Augments; using Internal.Runtime.CompilerServices; -using Internal.Reflection.Augments; using CorElementType = System.Reflection.CorElementType; using EETypeElementType = Internal.Runtime.EETypeElementType; diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Environment.NativeAot.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Environment.NativeAot.cs index 857d69d67e296..777e4e99dba78 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Environment.NativeAot.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Environment.NativeAot.cs @@ -2,12 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Diagnostics; -using System.Diagnostics.Contracts; using System.Diagnostics.CodeAnalysis; +using System.Diagnostics.Contracts; +using System.Runtime; using System.Runtime.CompilerServices; using System.Threading; + using Internal.DeveloperExperience; -using System.Runtime; namespace System { diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/GC.NativeAot.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/GC.NativeAot.cs index 8ecade80ffc25..62ed9a722671a 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/GC.NativeAot.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/GC.NativeAot.cs @@ -12,8 +12,8 @@ using System.Runtime.InteropServices; using System.Threading; -using Internal.Runtime.CompilerServices; using Internal.Runtime; +using Internal.Runtime.CompilerServices; namespace System { diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Assembly.NativeAot.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Assembly.NativeAot.cs index 1c75477ab2bbb..2bff51acfea36 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Assembly.NativeAot.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Assembly.NativeAot.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Configuration.Assemblies; -using System.Runtime.Serialization; using System.IO; +using System.Runtime.Serialization; using Internal.Reflection.Augments; using Internal.Reflection.Core.NonPortable; diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/AssemblyRuntimeNameHelpers.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/AssemblyRuntimeNameHelpers.cs index 1a7023789dc1b..f5f7aa621614b 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/AssemblyRuntimeNameHelpers.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/AssemblyRuntimeNameHelpers.cs @@ -2,10 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; +using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; -using System.Collections.Generic; namespace System.Reflection { diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Attribute.NativeAot.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Attribute.NativeAot.cs index fe6505f24c9c9..a619095037b5c 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Attribute.NativeAot.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Attribute.NativeAot.cs @@ -1,9 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Reflection; -using System.Diagnostics.CodeAnalysis; using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; +using System.Reflection; + using Internal.LowLevelLinq; using Internal.Reflection.Extensions.NonPortable; diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/ConstructorInvoker.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/ConstructorInvoker.cs index 0d98883bfaa9d..80ee1fe141b5c 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/ConstructorInvoker.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/ConstructorInvoker.cs @@ -1,10 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Internal.Reflection.Core.Execution; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Reflection.Runtime.MethodInfos; + +using Internal.Reflection.Core.Execution; + using static System.Reflection.DynamicInvokeInfo; namespace System.Reflection diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Emit/AssemblyBuilder.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Emit/AssemblyBuilder.cs index 0325a60f818e2..3695bcbdc7863 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Emit/AssemblyBuilder.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Emit/AssemblyBuilder.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Diagnostics.CodeAnalysis; using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; using System.IO; namespace System.Reflection.Emit diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/MethodBase.NativeAot.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/MethodBase.NativeAot.cs index 37db7595ab585..f8deb6ea6bd61 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/MethodBase.NativeAot.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/MethodBase.NativeAot.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Diagnostics.CodeAnalysis; + using Internal.Reflection.Augments; namespace System.Reflection diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/MethodInvoker.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/MethodInvoker.cs index 4d617f522ab21..1c22e82687285 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/MethodInvoker.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/MethodInvoker.cs @@ -1,10 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Internal.Reflection.Core.Execution; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Reflection.Runtime.MethodInfos; + +using Internal.Reflection.Core.Execution; + using static System.Reflection.DynamicInvokeInfo; namespace System.Reflection diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/Assemblies/NativeFormat/NativeFormatRuntimeAssembly.GetTypeCore.CaseSensitive.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/Assemblies/NativeFormat/NativeFormatRuntimeAssembly.GetTypeCore.CaseSensitive.cs index 859f18cc7445a..34a045281fd52 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/Assemblies/NativeFormat/NativeFormatRuntimeAssembly.GetTypeCore.CaseSensitive.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/Assemblies/NativeFormat/NativeFormatRuntimeAssembly.GetTypeCore.CaseSensitive.cs @@ -5,8 +5,8 @@ using System.Reflection.Runtime.General; using System.Reflection.Runtime.TypeInfos; -using Internal.Reflection.Core; using Internal.Metadata.NativeFormat; +using Internal.Reflection.Core; namespace System.Reflection.Runtime.Assemblies.NativeFormat { diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/BindingFlagSupport/ConstructorPolicies.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/BindingFlagSupport/ConstructorPolicies.cs index d2a513a81db07..3faf9f9633e3d 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/BindingFlagSupport/ConstructorPolicies.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/BindingFlagSupport/ConstructorPolicies.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Collections.Generic; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; -using System.Collections.Generic; using System.Reflection.Runtime.TypeInfos; namespace System.Reflection.Runtime.BindingFlagSupport diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/BindingFlagSupport/EventPolicies.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/BindingFlagSupport/EventPolicies.cs index 056eb843b78eb..ddbd29557ec94 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/BindingFlagSupport/EventPolicies.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/BindingFlagSupport/EventPolicies.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Collections.Generic; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; -using System.Collections.Generic; using System.Reflection.Runtime.TypeInfos; namespace System.Reflection.Runtime.BindingFlagSupport diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/BindingFlagSupport/FieldPolicies.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/BindingFlagSupport/FieldPolicies.cs index b038fc89056d7..e60e8d7711137 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/BindingFlagSupport/FieldPolicies.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/BindingFlagSupport/FieldPolicies.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Collections.Generic; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; -using System.Collections.Generic; using System.Reflection.Runtime.TypeInfos; namespace System.Reflection.Runtime.BindingFlagSupport diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/BindingFlagSupport/MemberPolicies.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/BindingFlagSupport/MemberPolicies.cs index b765a8394ad9f..b15bd39962428 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/BindingFlagSupport/MemberPolicies.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/BindingFlagSupport/MemberPolicies.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Diagnostics; using System.Collections.Generic; +using System.Diagnostics; using System.Reflection.Runtime.TypeInfos; namespace System.Reflection.Runtime.BindingFlagSupport diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/BindingFlagSupport/MethodPolicies.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/BindingFlagSupport/MethodPolicies.cs index ccb2883c061cc..0ab6d3af53181 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/BindingFlagSupport/MethodPolicies.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/BindingFlagSupport/MethodPolicies.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Collections.Generic; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; -using System.Collections.Generic; using System.Reflection.Runtime.TypeInfos; namespace System.Reflection.Runtime.BindingFlagSupport diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/BindingFlagSupport/NameFilter.NativeFormat.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/BindingFlagSupport/NameFilter.NativeFormat.cs index 88962ffc1d002..68ff0cc338e65 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/BindingFlagSupport/NameFilter.NativeFormat.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/BindingFlagSupport/NameFilter.NativeFormat.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Globalization; + using Internal.Metadata.NativeFormat; namespace System.Reflection.Runtime.BindingFlagSupport diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/BindingFlagSupport/NestedTypePolicies.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/BindingFlagSupport/NestedTypePolicies.cs index a6b8e54793e16..1e4a74bfc26f0 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/BindingFlagSupport/NestedTypePolicies.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/BindingFlagSupport/NestedTypePolicies.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Collections.Generic; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; -using System.Collections.Generic; using System.Reflection.Runtime.TypeInfos; namespace System.Reflection.Runtime.BindingFlagSupport diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/BindingFlagSupport/PropertyPolicies.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/BindingFlagSupport/PropertyPolicies.cs index 55d1892ec624a..28eb0627c2fe6 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/BindingFlagSupport/PropertyPolicies.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/BindingFlagSupport/PropertyPolicies.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Collections.Generic; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; -using System.Collections.Generic; using System.Reflection.Runtime.TypeInfos; namespace System.Reflection.Runtime.BindingFlagSupport diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/BindingFlagSupport/QueriedMemberList.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/BindingFlagSupport/QueriedMemberList.cs index d1816e113ffb6..c0f3cbc9344fb 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/BindingFlagSupport/QueriedMemberList.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/BindingFlagSupport/QueriedMemberList.cs @@ -2,9 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Diagnostics; -using System.Runtime.CompilerServices; using System.Reflection.Runtime.General; using System.Reflection.Runtime.TypeInfos; +using System.Runtime.CompilerServices; using Internal.Reflection.Core.Execution; diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/BindingFlagSupport/QueryResult.Enumerator.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/BindingFlagSupport/QueryResult.Enumerator.cs index d3826a2010bc7..ac503ffeda681 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/BindingFlagSupport/QueryResult.Enumerator.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/BindingFlagSupport/QueryResult.Enumerator.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Diagnostics; using System.Collections.Generic; +using System.Diagnostics; using System.Runtime.CompilerServices; namespace System.Reflection.Runtime.BindingFlagSupport diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/BindingFlagSupport/QueryResult.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/BindingFlagSupport/QueryResult.cs index 6288b58c40521..432b36f021586 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/BindingFlagSupport/QueryResult.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/BindingFlagSupport/QueryResult.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Diagnostics; using System.Collections.Generic; +using System.Diagnostics; namespace System.Reflection.Runtime.BindingFlagSupport { diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/CustomAttributes/NativeFormat/NativeFormatCustomAttributeData.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/CustomAttributes/NativeFormat/NativeFormatCustomAttributeData.cs index efd3fe866235f..10c49ffe177bb 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/CustomAttributes/NativeFormat/NativeFormatCustomAttributeData.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/CustomAttributes/NativeFormat/NativeFormatCustomAttributeData.cs @@ -2,23 +2,23 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Reflection; -using System.Diagnostics; -using System.Diagnostics.CodeAnalysis; using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; +using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; +using System.Reflection; using System.Reflection.Runtime.General; -using System.Reflection.Runtime.TypeInfos; -using System.Reflection.Runtime.TypeInfos.NativeFormat; using System.Reflection.Runtime.MethodInfos; using System.Reflection.Runtime.MethodInfos.NativeFormat; +using System.Reflection.Runtime.TypeInfos; +using System.Reflection.Runtime.TypeInfos.NativeFormat; using Internal.LowLevelLinq; -using Internal.Reflection.Core; +using Internal.Metadata.NativeFormat; using Internal.Reflection.Augments; +using Internal.Reflection.Core; using Internal.Reflection.Core.Execution; -using Internal.Metadata.NativeFormat; namespace System.Reflection.Runtime.CustomAttributes.NativeFormat { diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/CustomAttributes/RuntimePseudoCustomAttributeData.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/CustomAttributes/RuntimePseudoCustomAttributeData.cs index a055fd068214d..bf6db91ba9fc1 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/CustomAttributes/RuntimePseudoCustomAttributeData.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/CustomAttributes/RuntimePseudoCustomAttributeData.cs @@ -2,11 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Reflection; -using System.Diagnostics; -using System.Diagnostics.CodeAnalysis; using System.Collections.Generic; using System.Collections.ObjectModel; +using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; +using System.Reflection; using System.Reflection.Runtime.General; using System.Reflection.Runtime.TypeInfos; diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/Dispensers/DispenserThatAlwaysReuses.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/Dispensers/DispenserThatAlwaysReuses.cs index e140e99a186f0..b63919b931891 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/Dispensers/DispenserThatAlwaysReuses.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/Dispensers/DispenserThatAlwaysReuses.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Diagnostics; using System.Collections.Concurrent; +using System.Diagnostics; namespace System.Reflection.Runtime.Dispensers { diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/Dispensers/DispenserThatReusesAsLongAsValueIsAlive.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/Dispensers/DispenserThatReusesAsLongAsValueIsAlive.cs index 5c28e17c5cad2..351448483902d 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/Dispensers/DispenserThatReusesAsLongAsValueIsAlive.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/Dispensers/DispenserThatReusesAsLongAsValueIsAlive.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Diagnostics; using System.Collections.Concurrent; +using System.Diagnostics; namespace System.Reflection.Runtime.Dispensers { diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/EventInfos/NativeFormat/NativeFormatRuntimeEventInfo.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/EventInfos/NativeFormat/NativeFormatRuntimeEventInfo.cs index 59245c5ca5bd4..43dc9103043a4 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/EventInfos/NativeFormat/NativeFormatRuntimeEventInfo.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/EventInfos/NativeFormat/NativeFormatRuntimeEventInfo.cs @@ -2,23 +2,23 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Reflection; -using System.Diagnostics; using System.Collections.Generic; -using System.Runtime.CompilerServices; +using System.Diagnostics; +using System.Reflection; +using System.Reflection.Runtime.CustomAttributes; using System.Reflection.Runtime.General; -using System.Reflection.Runtime.TypeInfos; -using System.Reflection.Runtime.TypeInfos.NativeFormat; using System.Reflection.Runtime.MethodInfos; using System.Reflection.Runtime.MethodInfos.NativeFormat; using System.Reflection.Runtime.ParameterInfos; -using System.Reflection.Runtime.CustomAttributes; +using System.Reflection.Runtime.TypeInfos; +using System.Reflection.Runtime.TypeInfos.NativeFormat; +using System.Runtime.CompilerServices; using Internal.Metadata.NativeFormat; -using NativeFormatMethodSemanticsAttributes = global::Internal.Metadata.NativeFormat.MethodSemanticsAttributes; - using Internal.Reflection.Core.Execution; +using NativeFormatMethodSemanticsAttributes = global::Internal.Metadata.NativeFormat.MethodSemanticsAttributes; + namespace System.Reflection.Runtime.EventInfos.NativeFormat { [DebuggerDisplay("{_debugName}")] diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/EventInfos/RuntimeEventInfo.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/EventInfos/RuntimeEventInfo.cs index e3e77767b2b14..c76651833ae97 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/EventInfos/RuntimeEventInfo.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/EventInfos/RuntimeEventInfo.cs @@ -2,14 +2,14 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Reflection; -using System.Diagnostics; using System.Collections.Generic; -using System.Runtime.CompilerServices; +using System.Diagnostics; +using System.Reflection; +using System.Reflection.Runtime.CustomAttributes; using System.Reflection.Runtime.General; -using System.Reflection.Runtime.TypeInfos; using System.Reflection.Runtime.ParameterInfos; -using System.Reflection.Runtime.CustomAttributes; +using System.Reflection.Runtime.TypeInfos; +using System.Runtime.CompilerServices; using Internal.Reflection.Core.Execution; diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/FieldInfos/NativeFormat/NativeFormatRuntimeFieldInfo.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/FieldInfos/NativeFormat/NativeFormatRuntimeFieldInfo.cs index 3318076edfc22..fb70095f66ab0 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/FieldInfos/NativeFormat/NativeFormatRuntimeFieldInfo.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/FieldInfos/NativeFormat/NativeFormatRuntimeFieldInfo.cs @@ -2,25 +2,22 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Reflection; +using System.Collections.Generic; using System.Diagnostics; using System.Globalization; -using System.Collections.Generic; -using System.Runtime.CompilerServices; - +using System.Reflection; +using System.Reflection.Runtime.BindingFlagSupport; +using System.Reflection.Runtime.CustomAttributes; using System.Reflection.Runtime.FieldInfos; using System.Reflection.Runtime.General; using System.Reflection.Runtime.General.NativeFormat; using System.Reflection.Runtime.TypeInfos; using System.Reflection.Runtime.TypeInfos.NativeFormat; -using System.Reflection.Runtime.CustomAttributes; -using System.Reflection.Runtime.BindingFlagSupport; +using System.Runtime.CompilerServices; using Internal.Metadata.NativeFormat; - using Internal.Reflection.Core; using Internal.Reflection.Core.Execution; - using Internal.Runtime.Augments; namespace System.Reflection.Runtime.FieldInfos.NativeFormat diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/FieldInfos/RuntimeFieldInfo.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/FieldInfos/RuntimeFieldInfo.cs index 60e4a9a932d5a..1672c9843b2bf 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/FieldInfos/RuntimeFieldInfo.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/FieldInfos/RuntimeFieldInfo.cs @@ -2,17 +2,16 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Reflection; +using System.Collections.Generic; using System.Diagnostics; using System.Globalization; -using System.Collections.Generic; -using System.Runtime.InteropServices; -using System.Runtime.CompilerServices; - +using System.Reflection; +using System.Reflection.Runtime.BindingFlagSupport; +using System.Reflection.Runtime.CustomAttributes; using System.Reflection.Runtime.General; using System.Reflection.Runtime.TypeInfos; -using System.Reflection.Runtime.CustomAttributes; -using System.Reflection.Runtime.BindingFlagSupport; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; using Internal.Reflection.Core; using Internal.Reflection.Core.Execution; diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/General/Assignability.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/General/Assignability.cs index cb0625d6e2d01..076428939a58c 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/General/Assignability.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/General/Assignability.cs @@ -2,9 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Reflection; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; +using System.Reflection; using System.Reflection.Runtime.TypeInfos; using Internal.Reflection.Core; diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/General/Dispensers.NativeFormat.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/General/Dispensers.NativeFormat.cs index 662f7dcab69db..6f40c67fc2f9a 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/General/Dispensers.NativeFormat.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/General/Dispensers.NativeFormat.cs @@ -1,22 +1,20 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.IO; using System.Collections.Generic; - -using System.Reflection.Runtime.General; -using System.Reflection.Runtime.TypeInfos; -using System.Reflection.Runtime.TypeInfos.NativeFormat; +using System.IO; using System.Reflection.Runtime.Assemblies; using System.Reflection.Runtime.Assemblies.NativeFormat; using System.Reflection.Runtime.Dispensers; +using System.Reflection.Runtime.General; using System.Reflection.Runtime.PropertyInfos; +using System.Reflection.Runtime.TypeInfos; +using System.Reflection.Runtime.TypeInfos.NativeFormat; +using Internal.Metadata.NativeFormat; using Internal.Reflection.Core; using Internal.Reflection.Core.Execution; -using Internal.Metadata.NativeFormat; - //================================================================================================================= // This file collects the various chokepoints that create the various Runtime*Info objects. This allows // easy reviewing of the overall caching and unification policy. diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/General/Dispensers.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/General/Dispensers.cs index fb3829f5bdf89..060a59536ca8a 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/General/Dispensers.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/General/Dispensers.cs @@ -1,14 +1,13 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.IO; using System.Collections.Generic; - -using System.Reflection.Runtime.General; -using System.Reflection.Runtime.TypeInfos; +using System.IO; using System.Reflection.Runtime.Assemblies; using System.Reflection.Runtime.Dispensers; +using System.Reflection.Runtime.General; using System.Reflection.Runtime.PropertyInfos; +using System.Reflection.Runtime.TypeInfos; using Internal.Reflection.Core; using Internal.Reflection.Core.Execution; diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/General/Helpers.NativeFormat.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/General/Helpers.NativeFormat.cs index 0a9dbc85cff6d..e11f7b23e57b6 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/General/Helpers.NativeFormat.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/General/Helpers.NativeFormat.cs @@ -2,9 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Diagnostics; -using System.Runtime.CompilerServices; using System.Reflection.Runtime.TypeInfos; using System.Reflection.Runtime.TypeInfos.NativeFormat; +using System.Runtime.CompilerServices; namespace System.Reflection.Runtime.General { diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/General/Helpers.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/General/Helpers.cs index fc563fe05f875..584279cd66a52 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/General/Helpers.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/General/Helpers.cs @@ -1,23 +1,23 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Text; -using System.Reflection; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Globalization; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.CompilerServices; -using System.Reflection.Runtime.TypeInfos; +using System.Reflection; using System.Reflection.Runtime.Assemblies; using System.Reflection.Runtime.MethodInfos; +using System.Reflection.Runtime.TypeInfos; +using System.Runtime.CompilerServices; +using System.Text; using Internal.LowLevelLinq; -using Internal.Runtime.Augments; using Internal.Reflection.Augments; using Internal.Reflection.Core.Execution; using Internal.Reflection.Extensions.NonPortable; +using Internal.Runtime.Augments; namespace System.Reflection.Runtime.General { diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/General/LegacyCustomAttributeApis.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/General/LegacyCustomAttributeApis.cs index 1e424de53cba3..37b4d54081839 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/General/LegacyCustomAttributeApis.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/General/LegacyCustomAttributeApis.cs @@ -14,9 +14,9 @@ // using System; +using System.Collections.Generic; using System.IO; using System.Reflection; -using System.Collections.Generic; using System.Reflection.Runtime.General; using Internal.LowLevelLinq; diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/General/MetadataReaderExtensions.NativeFormat.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/General/MetadataReaderExtensions.NativeFormat.cs index f97125bef3b27..509c6bc7c053e 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/General/MetadataReaderExtensions.NativeFormat.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/General/MetadataReaderExtensions.NativeFormat.cs @@ -2,21 +2,20 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Text; -using System.Reflection; -using System.Diagnostics; -using System.Diagnostics.CodeAnalysis; using System.Collections; using System.Collections.Generic; +using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; +using System.Reflection; using System.Reflection.Runtime.Assemblies; using System.Runtime.CompilerServices; +using System.Text; using Internal.LowLevelLinq; +using Internal.Metadata.NativeFormat; using Internal.Reflection.Core; - using Internal.Runtime.Augments; -using Internal.Metadata.NativeFormat; using NativeFormatAssemblyFlags = global::Internal.Metadata.NativeFormat.AssemblyFlags; using NativeFormatModifiedType = global::Internal.Metadata.NativeFormat.ModifiedType; diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/General/MetadataReaderExtensions.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/General/MetadataReaderExtensions.cs index cf1ccdbacf6db..7c39eb06f3303 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/General/MetadataReaderExtensions.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/General/MetadataReaderExtensions.cs @@ -3,14 +3,14 @@ using System; -using System.Reflection; using System.Collections.Generic; +using System.Reflection; using System.Runtime.CompilerServices; using Internal.Metadata.NativeFormat; -using Debug = System.Diagnostics.Debug; using AssemblyFlags = Internal.Metadata.NativeFormat.AssemblyFlags; +using Debug = System.Diagnostics.Debug; namespace System.Reflection.Runtime.General { diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/General/NamespaceChain.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/General/NamespaceChain.cs index dd52a03e6b5af..26b05e0a02cf4 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/General/NamespaceChain.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/General/NamespaceChain.cs @@ -2,10 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Text; -using System.Reflection; -using System.Diagnostics; using System.Collections.Generic; +using System.Diagnostics; +using System.Reflection; +using System.Text; using Internal.Metadata.NativeFormat; diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/General/NativeFormat/DefaultValueParser.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/General/NativeFormat/DefaultValueParser.cs index 35931ee8b540f..5b86da9cc8e10 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/General/NativeFormat/DefaultValueParser.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/General/NativeFormat/DefaultValueParser.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Collections.Generic; + using Internal.Metadata.NativeFormat; namespace System.Reflection.Runtime.General.NativeFormat diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/General/ReflectionCoreCallbacksImplementation.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/General/ReflectionCoreCallbacksImplementation.cs index c7d7eabd56ac3..25b32c05a068c 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/General/ReflectionCoreCallbacksImplementation.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/General/ReflectionCoreCallbacksImplementation.cs @@ -2,26 +2,26 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Reflection; +using System.Collections.Generic; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Globalization; -using System.Collections.Generic; -using System.Reflection.Runtime.General; -using System.Reflection.Runtime.TypeInfos; -using System.Reflection.Runtime.TypeInfos.NativeFormat; +using System.Reflection; using System.Reflection.Runtime.Assemblies; +using System.Reflection.Runtime.BindingFlagSupport; using System.Reflection.Runtime.FieldInfos; using System.Reflection.Runtime.FieldInfos.NativeFormat; +using System.Reflection.Runtime.General; using System.Reflection.Runtime.MethodInfos; -using System.Reflection.Runtime.BindingFlagSupport; using System.Reflection.Runtime.Modules; +using System.Reflection.Runtime.TypeInfos; +using System.Reflection.Runtime.TypeInfos.NativeFormat; +using System.Runtime.CompilerServices; -using Internal.Runtime.Augments; +using Internal.Metadata.NativeFormat; using Internal.Reflection.Augments; using Internal.Reflection.Core.Execution; -using Internal.Metadata.NativeFormat; -using System.Runtime.CompilerServices; +using Internal.Runtime.Augments; namespace System.Reflection.Runtime.General { diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/General/RuntimeTypeHandleKey.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/General/RuntimeTypeHandleKey.cs index 620fd3d636161..7a109a5565bed 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/General/RuntimeTypeHandleKey.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/General/RuntimeTypeHandleKey.cs @@ -2,9 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Reflection; -using System.Diagnostics; using System.Collections.Generic; +using System.Diagnostics; +using System.Reflection; namespace System.Reflection.Runtime.General { diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/General/ThunkedApis.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/General/ThunkedApis.cs index 9c920ca8221e3..f547ee47a9f35 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/General/ThunkedApis.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/General/ThunkedApis.cs @@ -7,12 +7,12 @@ // keep the main files less cluttered. // -using System.IO; -using System.Text; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Globalization; +using System.IO; using System.Reflection.Runtime.General; +using System.Text; using Internal.LowLevelLinq; diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/General/TypeResolver.NativeFormat.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/General/TypeResolver.NativeFormat.cs index ee5995b3610ce..44be913b0195c 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/General/TypeResolver.NativeFormat.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/General/TypeResolver.NativeFormat.cs @@ -1,15 +1,14 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Diagnostics.CodeAnalysis; using System.Collections.Generic; - -using System.Reflection.Runtime.TypeInfos; +using System.Diagnostics.CodeAnalysis; using System.Reflection.Runtime.Assemblies; +using System.Reflection.Runtime.TypeInfos; +using Internal.Metadata.NativeFormat; using Internal.Reflection.Core.Execution; -using Internal.Metadata.NativeFormat; using NativeFormatModifiedType = global::Internal.Metadata.NativeFormat.ModifiedType; namespace System.Reflection.Runtime.General diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/General/TypeUnifier.NativeFormat.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/General/TypeUnifier.NativeFormat.cs index fe06816cf93e3..543bc5d58b4dd 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/General/TypeUnifier.NativeFormat.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/General/TypeUnifier.NativeFormat.cs @@ -2,14 +2,14 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Reflection; -using System.Diagnostics; using System.Collections.Concurrent; -using System.Runtime.CompilerServices; +using System.Diagnostics; +using System.Reflection; using System.Reflection.Runtime.General; +using System.Reflection.Runtime.MethodInfos; using System.Reflection.Runtime.TypeInfos; using System.Reflection.Runtime.TypeInfos.NativeFormat; -using System.Reflection.Runtime.MethodInfos; +using System.Runtime.CompilerServices; using Internal.Metadata.NativeFormat; using Internal.Reflection.Core.Execution; diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/General/TypeUnifier.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/General/TypeUnifier.cs index e1c2ac3855396..61b55f25a4d19 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/General/TypeUnifier.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/General/TypeUnifier.cs @@ -2,13 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Reflection; -using System.Diagnostics; using System.Collections.Concurrent; -using System.Runtime.CompilerServices; +using System.Diagnostics; +using System.Reflection; using System.Reflection.Runtime.General; -using System.Reflection.Runtime.TypeInfos; using System.Reflection.Runtime.MethodInfos; +using System.Reflection.Runtime.TypeInfos; +using System.Runtime.CompilerServices; using Internal.Reflection.Core.Execution; diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/MethodInfos/CustomMethodInvoker.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/MethodInfos/CustomMethodInvoker.cs index ead65e3d6b15b..fbf56e6e4603d 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/MethodInfos/CustomMethodInvoker.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/MethodInfos/CustomMethodInvoker.cs @@ -3,8 +3,8 @@ using System.Diagnostics; -using Internal.Runtime.Augments; using Internal.Reflection.Core.Execution; +using Internal.Runtime.Augments; namespace System.Reflection.Runtime.MethodInfos { diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/MethodInfos/CustomMethodMapper.Nullable.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/MethodInfos/CustomMethodMapper.Nullable.cs index 2b3c78ff34270..8749452fb8f8c 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/MethodInfos/CustomMethodMapper.Nullable.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/MethodInfos/CustomMethodMapper.Nullable.cs @@ -2,9 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Collections.Generic; -using System.Runtime.CompilerServices; -using System.Reflection.Runtime.General; using System.Diagnostics.CodeAnalysis; +using System.Reflection.Runtime.General; +using System.Runtime.CompilerServices; namespace System.Reflection.Runtime.MethodInfos { diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/MethodInfos/CustomMethodMapper.String.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/MethodInfos/CustomMethodMapper.String.cs index 19596609b74b5..60a31b9651c55 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/MethodInfos/CustomMethodMapper.String.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/MethodInfos/CustomMethodMapper.String.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Text; using System.Collections.Generic; +using System.Text; namespace System.Reflection.Runtime.MethodInfos { diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/MethodInfos/CustomMethodMapper.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/MethodInfos/CustomMethodMapper.cs index 0469a7bd2ed2b..9ebc2ece2c007 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/MethodInfos/CustomMethodMapper.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/MethodInfos/CustomMethodMapper.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Collections.Generic; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; -using System.Collections.Generic; using Internal.Reflection.Core.Execution; diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/MethodInfos/IRuntimeMethodCommon.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/MethodInfos/IRuntimeMethodCommon.cs index 142c1d4fdca4c..8a10db118a075 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/MethodInfos/IRuntimeMethodCommon.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/MethodInfos/IRuntimeMethodCommon.cs @@ -2,13 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Text; -using System.Reflection; -using System.Diagnostics; using System.Collections.Generic; +using System.Diagnostics; +using System.Reflection; using System.Reflection.Runtime.General; -using System.Reflection.Runtime.TypeInfos; using System.Reflection.Runtime.ParameterInfos; +using System.Reflection.Runtime.TypeInfos; +using System.Text; using Internal.Reflection.Core; using Internal.Reflection.Core.Execution; diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/MethodInfos/NativeFormat/NativeFormatMethodCommon.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/MethodInfos/NativeFormat/NativeFormatMethodCommon.cs index b735f5304c388..be611feddba3a 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/MethodInfos/NativeFormat/NativeFormatMethodCommon.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/MethodInfos/NativeFormat/NativeFormatMethodCommon.cs @@ -1,20 +1,20 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Diagnostics; using System.Collections.Generic; +using System.Diagnostics; +using System.Reflection.Runtime.CustomAttributes; using System.Reflection.Runtime.General; -using System.Reflection.Runtime.TypeInfos; -using System.Reflection.Runtime.TypeInfos.NativeFormat; using System.Reflection.Runtime.ParameterInfos; using System.Reflection.Runtime.ParameterInfos.NativeFormat; -using System.Reflection.Runtime.CustomAttributes; +using System.Reflection.Runtime.TypeInfos; +using System.Reflection.Runtime.TypeInfos.NativeFormat; +using Internal.Metadata.NativeFormat; using Internal.Reflection.Core.Execution; using Internal.Runtime; using Internal.Runtime.Augments; using Internal.Runtime.CompilerServices; -using Internal.Metadata.NativeFormat; namespace System.Reflection.Runtime.MethodInfos.NativeFormat { diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/MethodInfos/OpenMethodInvoker.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/MethodInfos/OpenMethodInvoker.cs index 5a8b74225ee16..e6e8f0b99d333 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/MethodInfos/OpenMethodInvoker.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/MethodInfos/OpenMethodInvoker.cs @@ -2,11 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Reflection; -using System.Diagnostics; using System.Collections.Generic; -using System.Reflection.Runtime.TypeInfos; +using System.Diagnostics; +using System.Reflection; using System.Reflection.Runtime.ParameterInfos; +using System.Reflection.Runtime.TypeInfos; using Internal.Reflection.Core.Execution; diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/MethodInfos/RuntimeConstructedGenericMethodInfo.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/MethodInfos/RuntimeConstructedGenericMethodInfo.cs index 793e85fd935e7..e8269845fe525 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/MethodInfos/RuntimeConstructedGenericMethodInfo.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/MethodInfos/RuntimeConstructedGenericMethodInfo.cs @@ -2,13 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Reflection; +using System.Collections.Generic; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; -using System.Collections.Generic; +using System.Reflection; using System.Reflection.Runtime.General; -using System.Reflection.Runtime.TypeInfos; using System.Reflection.Runtime.ParameterInfos; +using System.Reflection.Runtime.TypeInfos; using Internal.Reflection.Core.Execution; diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/MethodInfos/RuntimeConstructorInfo.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/MethodInfos/RuntimeConstructorInfo.cs index d41c672a5161a..b83ee94bc3732 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/MethodInfos/RuntimeConstructorInfo.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/MethodInfos/RuntimeConstructorInfo.cs @@ -1,13 +1,14 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Internal.Reflection.Core.Execution; +using System.Collections.Generic; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Globalization; -using System.Collections.Generic; using System.Reflection.Runtime.ParameterInfos; +using Internal.Reflection.Core.Execution; + namespace System.Reflection.Runtime.MethodInfos { // diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/MethodInfos/RuntimeDummyMethodInfo.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/MethodInfos/RuntimeDummyMethodInfo.cs index ddf736da1be64..28350f39e1814 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/MethodInfos/RuntimeDummyMethodInfo.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/MethodInfos/RuntimeDummyMethodInfo.cs @@ -5,6 +5,7 @@ using System.Diagnostics.CodeAnalysis; using System.Reflection.Runtime.ParameterInfos; using System.Reflection.Runtime.TypeInfos; + using Internal.Reflection.Core.Execution; namespace System.Reflection.Runtime.MethodInfos diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/MethodInfos/RuntimeMethodHelpers.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/MethodInfos/RuntimeMethodHelpers.cs index 4d11e1a011f2c..d4ded4d8bfa2e 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/MethodInfos/RuntimeMethodHelpers.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/MethodInfos/RuntimeMethodHelpers.cs @@ -2,13 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Text; -using System.Reflection; -using System.Diagnostics; using System.Collections.Generic; +using System.Diagnostics; +using System.Reflection; using System.Reflection.Runtime.General; -using System.Reflection.Runtime.TypeInfos; using System.Reflection.Runtime.ParameterInfos; +using System.Reflection.Runtime.TypeInfos; +using System.Text; using Internal.Reflection.Core; using Internal.Reflection.Core.Execution; diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/MethodInfos/RuntimeMethodInfo.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/MethodInfos/RuntimeMethodInfo.cs index 8d4bbf9b341a5..bb5139b32499b 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/MethodInfos/RuntimeMethodInfo.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/MethodInfos/RuntimeMethodInfo.cs @@ -2,16 +2,16 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Reflection; +using System.Collections.Generic; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Globalization; -using System.Collections.Generic; -using System.Runtime.CompilerServices; +using System.Reflection; +using System.Reflection.Runtime.BindingFlagSupport; using System.Reflection.Runtime.General; -using System.Reflection.Runtime.TypeInfos; using System.Reflection.Runtime.ParameterInfos; -using System.Reflection.Runtime.BindingFlagSupport; +using System.Reflection.Runtime.TypeInfos; +using System.Runtime.CompilerServices; using Internal.Reflection.Core.Execution; using Internal.Runtime.Augments; diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/MethodInfos/RuntimeNamedMethodInfo.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/MethodInfos/RuntimeNamedMethodInfo.cs index 1be7751cdbc9e..2d398b8bb966b 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/MethodInfos/RuntimeNamedMethodInfo.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/MethodInfos/RuntimeNamedMethodInfo.cs @@ -2,15 +2,15 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Reflection; +using System.Collections.Generic; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; -using System.Collections.Generic; -using System.Runtime.InteropServices; +using System.Reflection; +using System.Reflection.Runtime.CustomAttributes; using System.Reflection.Runtime.General; -using System.Reflection.Runtime.TypeInfos; using System.Reflection.Runtime.ParameterInfos; -using System.Reflection.Runtime.CustomAttributes; +using System.Reflection.Runtime.TypeInfos; +using System.Runtime.InteropServices; using Internal.Reflection.Core.Execution; diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/MethodInfos/RuntimePlainConstructorInfo.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/MethodInfos/RuntimePlainConstructorInfo.cs index b6e645c9def1a..baa00623f3ea4 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/MethodInfos/RuntimePlainConstructorInfo.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/MethodInfos/RuntimePlainConstructorInfo.cs @@ -2,13 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Reflection; +using System.Collections.Generic; using System.Diagnostics; using System.Globalization; -using System.Collections.Generic; +using System.Reflection; using System.Reflection.Runtime.General; -using System.Reflection.Runtime.TypeInfos; using System.Reflection.Runtime.ParameterInfos; +using System.Reflection.Runtime.TypeInfos; using Internal.Reflection.Core.Execution; diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/MethodInfos/RuntimeSyntheticConstructorInfo.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/MethodInfos/RuntimeSyntheticConstructorInfo.cs index 294dbe4625568..275244347ddd1 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/MethodInfos/RuntimeSyntheticConstructorInfo.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/MethodInfos/RuntimeSyntheticConstructorInfo.cs @@ -2,13 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Reflection; +using System.Collections.Generic; using System.Diagnostics; using System.Globalization; -using System.Collections.Generic; +using System.Reflection; using System.Reflection.Runtime.General; -using System.Reflection.Runtime.TypeInfos; using System.Reflection.Runtime.ParameterInfos; +using System.Reflection.Runtime.TypeInfos; using Internal.Reflection.Core.Execution; diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/MethodInfos/RuntimeSyntheticMethodInfo.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/MethodInfos/RuntimeSyntheticMethodInfo.cs index b1721ead3946b..94305f352b59a 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/MethodInfos/RuntimeSyntheticMethodInfo.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/MethodInfos/RuntimeSyntheticMethodInfo.cs @@ -2,13 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Reflection; +using System.Collections.Generic; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; -using System.Collections.Generic; +using System.Reflection; using System.Reflection.Runtime.General; -using System.Reflection.Runtime.TypeInfos; using System.Reflection.Runtime.ParameterInfos; +using System.Reflection.Runtime.TypeInfos; using Internal.Reflection.Core.Execution; diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/MethodInfos/SyntheticMethodId.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/MethodInfos/SyntheticMethodId.cs index dd23f9a7623c6..d04ef633f91bb 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/MethodInfos/SyntheticMethodId.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/MethodInfos/SyntheticMethodId.cs @@ -2,11 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Reflection; -using System.Diagnostics; using System.Collections.Generic; -using System.Reflection.Runtime.TypeInfos; +using System.Diagnostics; +using System.Reflection; using System.Reflection.Runtime.ParameterInfos; +using System.Reflection.Runtime.TypeInfos; using Internal.Reflection.Core; using Internal.Reflection.Core.Execution; diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/MethodInfos/VirtualRuntimeParameterInfoArray.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/MethodInfos/VirtualRuntimeParameterInfoArray.cs index 22e3e405f0af4..db837130ec921 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/MethodInfos/VirtualRuntimeParameterInfoArray.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/MethodInfos/VirtualRuntimeParameterInfoArray.cs @@ -2,13 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Text; -using System.Reflection; -using System.Diagnostics; using System.Collections.Generic; +using System.Diagnostics; +using System.Reflection; using System.Reflection.Runtime.General; -using System.Reflection.Runtime.TypeInfos; using System.Reflection.Runtime.ParameterInfos; +using System.Reflection.Runtime.TypeInfos; +using System.Text; using Internal.Reflection.Core; using Internal.Reflection.Core.Execution; diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/Modules/NativeFormat/NativeFormatRuntimeModule.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/Modules/NativeFormat/NativeFormatRuntimeModule.cs index 9a6ae02b363f5..43d1fc5a55f15 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/Modules/NativeFormat/NativeFormatRuntimeModule.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/Modules/NativeFormat/NativeFormatRuntimeModule.cs @@ -1,15 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; -using System.Reflection.Runtime.General; +using System.Reflection.Runtime.Assemblies.NativeFormat; using System.Reflection.Runtime.CustomAttributes; -using System.Collections.Generic; +using System.Reflection.Runtime.General; +using System.Reflection.Runtime.TypeInfos; -using Internal.Reflection.Core; using Internal.Metadata.NativeFormat; -using System.Reflection.Runtime.Assemblies.NativeFormat; -using System.Reflection.Runtime.TypeInfos; +using Internal.Reflection.Core; namespace System.Reflection.Runtime.Modules.NativeFormat { diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/Modules/RuntimeModule.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/Modules/RuntimeModule.cs index c6081b4afdbad..9812c65b0590c 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/Modules/RuntimeModule.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/Modules/RuntimeModule.cs @@ -1,12 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Collections.Generic; using System.ComponentModel; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; -using System.Runtime.Serialization; using System.Reflection.Runtime.Assemblies; -using System.Collections.Generic; +using System.Runtime.Serialization; namespace System.Reflection.Runtime.Modules { diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/ParameterInfos/NativeFormat/NativeFormatMethodParameterInfo.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/ParameterInfos/NativeFormat/NativeFormatMethodParameterInfo.cs index e14fd67f2bf2c..c0ea6dbfe3643 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/ParameterInfos/NativeFormat/NativeFormatMethodParameterInfo.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/ParameterInfos/NativeFormat/NativeFormatMethodParameterInfo.cs @@ -2,18 +2,17 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Reflection; -using System.Diagnostics; using System.Collections.Generic; +using System.Diagnostics; +using System.Reflection; +using System.Reflection.Runtime.CustomAttributes; using System.Reflection.Runtime.General; using System.Reflection.Runtime.General.NativeFormat; -using System.Reflection.Runtime.CustomAttributes; +using Internal.Metadata.NativeFormat; using Internal.Reflection.Core; using Internal.Reflection.Core.Execution; -using Internal.Metadata.NativeFormat; - namespace System.Reflection.Runtime.ParameterInfos.NativeFormat { // diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/ParameterInfos/RuntimeFatMethodParameterInfo.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/ParameterInfos/RuntimeFatMethodParameterInfo.cs index 8859a0770c499..6a1c5a4c50918 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/ParameterInfos/RuntimeFatMethodParameterInfo.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/ParameterInfos/RuntimeFatMethodParameterInfo.cs @@ -1,11 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Diagnostics; using System.Collections.Generic; -using System.Runtime.InteropServices; -using System.Reflection.Runtime.General; +using System.Diagnostics; using System.Reflection.Runtime.CustomAttributes; +using System.Reflection.Runtime.General; +using System.Runtime.InteropServices; namespace System.Reflection.Runtime.ParameterInfos { diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/ParameterInfos/RuntimeMethodParameterInfo.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/ParameterInfos/RuntimeMethodParameterInfo.cs index 8edc0fb11a283..85e746270a615 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/ParameterInfos/RuntimeMethodParameterInfo.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/ParameterInfos/RuntimeMethodParameterInfo.cs @@ -2,9 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Reflection; -using System.Diagnostics; using System.Collections.Generic; +using System.Diagnostics; +using System.Reflection; using System.Reflection.Runtime.General; using Internal.Reflection.Core; diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/ParameterInfos/RuntimeParameterInfo.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/ParameterInfos/RuntimeParameterInfo.cs index 2707ed7f41c27..e42095d9db2b9 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/ParameterInfos/RuntimeParameterInfo.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/ParameterInfos/RuntimeParameterInfo.cs @@ -2,9 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Reflection; -using System.Diagnostics; using System.Collections.Generic; +using System.Diagnostics; +using System.Reflection; namespace System.Reflection.Runtime.ParameterInfos { diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/ParameterInfos/RuntimePropertyIndexParameterInfo.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/ParameterInfos/RuntimePropertyIndexParameterInfo.cs index 8a2a1a2591d31..e6a4a2333f584 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/ParameterInfos/RuntimePropertyIndexParameterInfo.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/ParameterInfos/RuntimePropertyIndexParameterInfo.cs @@ -2,9 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Reflection; -using System.Diagnostics; using System.Collections.Generic; +using System.Diagnostics; +using System.Reflection; using System.Reflection.Runtime.PropertyInfos; namespace System.Reflection.Runtime.ParameterInfos diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/ParameterInfos/RuntimeSyntheticParameterInfo.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/ParameterInfos/RuntimeSyntheticParameterInfo.cs index e754cd1142a28..d96fa29c6f427 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/ParameterInfos/RuntimeSyntheticParameterInfo.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/ParameterInfos/RuntimeSyntheticParameterInfo.cs @@ -2,13 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Reflection; -using System.Diagnostics; using System.Collections.Generic; - +using System.Diagnostics; +using System.Reflection; +using System.Reflection.Runtime.CustomAttributes; using System.Reflection.Runtime.General; using System.Reflection.Runtime.TypeInfos; -using System.Reflection.Runtime.CustomAttributes; using Internal.Reflection.Core; using Internal.Reflection.Core.Execution; diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/ParameterInfos/RuntimeThinMethodParameterInfo.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/ParameterInfos/RuntimeThinMethodParameterInfo.cs index a93368402a4bc..7c0bad8a64ec5 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/ParameterInfos/RuntimeThinMethodParameterInfo.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/ParameterInfos/RuntimeThinMethodParameterInfo.cs @@ -2,9 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Reflection; -using System.Diagnostics; using System.Collections.Generic; +using System.Diagnostics; +using System.Reflection; using System.Reflection.Runtime.General; using Internal.Reflection.Core; diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/PropertyInfos/NativeFormat/NativeFormatRuntimePropertyInfo.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/PropertyInfos/NativeFormat/NativeFormatRuntimePropertyInfo.cs index 813a40073a2c9..0a87f69cf6ffd 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/PropertyInfos/NativeFormat/NativeFormatRuntimePropertyInfo.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/PropertyInfos/NativeFormat/NativeFormatRuntimePropertyInfo.cs @@ -2,25 +2,25 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Text; -using System.Reflection; +using System.Collections.Generic; using System.Diagnostics; using System.Globalization; -using System.Collections.Generic; -using System.Runtime.CompilerServices; +using System.Reflection; +using System.Reflection.Runtime.CustomAttributes; using System.Reflection.Runtime.General; using System.Reflection.Runtime.General.NativeFormat; -using System.Reflection.Runtime.TypeInfos; -using System.Reflection.Runtime.TypeInfos.NativeFormat; using System.Reflection.Runtime.MethodInfos; using System.Reflection.Runtime.MethodInfos.NativeFormat; using System.Reflection.Runtime.ParameterInfos; -using System.Reflection.Runtime.CustomAttributes; +using System.Reflection.Runtime.TypeInfos; +using System.Reflection.Runtime.TypeInfos.NativeFormat; +using System.Runtime.CompilerServices; +using System.Text; +using Internal.Metadata.NativeFormat; using Internal.Reflection.Core; using Internal.Reflection.Core.Execution; -using Internal.Metadata.NativeFormat; using NativeFormatMethodSemanticsAttributes = global::Internal.Metadata.NativeFormat.MethodSemanticsAttributes; namespace System.Reflection.Runtime.PropertyInfos.NativeFormat diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/PropertyInfos/RuntimePropertyInfo.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/PropertyInfos/RuntimePropertyInfo.cs index 141c838900e3a..55c832c5420e7 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/PropertyInfos/RuntimePropertyInfo.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/PropertyInfos/RuntimePropertyInfo.cs @@ -2,17 +2,17 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Text; -using System.Reflection; +using System.Collections.Generic; using System.Diagnostics; using System.Globalization; -using System.Collections.Generic; -using System.Runtime.CompilerServices; +using System.Reflection; +using System.Reflection.Runtime.CustomAttributes; using System.Reflection.Runtime.General; -using System.Reflection.Runtime.TypeInfos; using System.Reflection.Runtime.MethodInfos; using System.Reflection.Runtime.ParameterInfos; -using System.Reflection.Runtime.CustomAttributes; +using System.Reflection.Runtime.TypeInfos; +using System.Runtime.CompilerServices; +using System.Text; using Internal.Reflection.Core; using Internal.Reflection.Core.Execution; diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/NativeFormat/NativeFormatRuntimeGenericParameterTypeInfo.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/NativeFormat/NativeFormatRuntimeGenericParameterTypeInfo.cs index da0551de1db8d..3cad4287b6f4f 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/NativeFormat/NativeFormatRuntimeGenericParameterTypeInfo.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/NativeFormat/NativeFormatRuntimeGenericParameterTypeInfo.cs @@ -2,14 +2,14 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Reflection; -using System.Diagnostics; -using System.Collections.Generic; using System.Collections.Concurrent; +using System.Collections.Generic; +using System.Diagnostics; +using System.Reflection; +using System.Reflection.Runtime.CustomAttributes; using System.Reflection.Runtime.General; using System.Reflection.Runtime.MethodInfos; using System.Reflection.Runtime.TypeInfos; -using System.Reflection.Runtime.CustomAttributes; using Internal.Metadata.NativeFormat; diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/NativeFormat/NativeFormatRuntimeGenericParameterTypeInfoForMethods.UnificationKey.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/NativeFormat/NativeFormatRuntimeGenericParameterTypeInfoForMethods.UnificationKey.cs index 941483a2bd9d1..310521f5da552 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/NativeFormat/NativeFormatRuntimeGenericParameterTypeInfoForMethods.UnificationKey.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/NativeFormat/NativeFormatRuntimeGenericParameterTypeInfoForMethods.UnificationKey.cs @@ -2,10 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Reflection; -using System.Diagnostics; -using System.Collections.Generic; using System.Collections.Concurrent; +using System.Collections.Generic; +using System.Diagnostics; +using System.Reflection; using System.Reflection.Runtime.General; using System.Reflection.Runtime.MethodInfos; using System.Reflection.Runtime.TypeInfos; diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/NativeFormat/NativeFormatRuntimeGenericParameterTypeInfoForMethods.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/NativeFormat/NativeFormatRuntimeGenericParameterTypeInfoForMethods.cs index 628c3eddc50f2..3e949cb09890e 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/NativeFormat/NativeFormatRuntimeGenericParameterTypeInfoForMethods.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/NativeFormat/NativeFormatRuntimeGenericParameterTypeInfoForMethods.cs @@ -2,10 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Reflection; -using System.Diagnostics; -using System.Collections.Generic; using System.Collections.Concurrent; +using System.Collections.Generic; +using System.Diagnostics; +using System.Reflection; using System.Reflection.Runtime.General; using System.Reflection.Runtime.MethodInfos; using System.Reflection.Runtime.TypeInfos; diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/NativeFormat/NativeFormatRuntimeGenericParameterTypeInfoForTypes.UnificationKey.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/NativeFormat/NativeFormatRuntimeGenericParameterTypeInfoForTypes.UnificationKey.cs index 047e71112c9cb..7d35a7b45a8a6 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/NativeFormat/NativeFormatRuntimeGenericParameterTypeInfoForTypes.UnificationKey.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/NativeFormat/NativeFormatRuntimeGenericParameterTypeInfoForTypes.UnificationKey.cs @@ -2,9 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Reflection; -using System.Diagnostics; using System.Collections.Generic; +using System.Diagnostics; +using System.Reflection; using System.Reflection.Runtime.General; using System.Reflection.Runtime.TypeInfos; diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/NativeFormat/NativeFormatRuntimeGenericParameterTypeInfoForTypes.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/NativeFormat/NativeFormatRuntimeGenericParameterTypeInfoForTypes.cs index b82e6b3a7d890..dcf9a0de2b0c4 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/NativeFormat/NativeFormatRuntimeGenericParameterTypeInfoForTypes.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/NativeFormat/NativeFormatRuntimeGenericParameterTypeInfoForTypes.cs @@ -2,9 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Reflection; -using System.Diagnostics; using System.Collections.Generic; +using System.Diagnostics; +using System.Reflection; using System.Reflection.Runtime.General; using System.Reflection.Runtime.TypeInfos; diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/NativeFormat/NativeFormatRuntimeNamedTypeInfo.UnificationKey.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/NativeFormat/NativeFormatRuntimeNamedTypeInfo.UnificationKey.cs index fe9c58c2200f1..aa1b48202cf2d 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/NativeFormat/NativeFormatRuntimeNamedTypeInfo.UnificationKey.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/NativeFormat/NativeFormatRuntimeNamedTypeInfo.UnificationKey.cs @@ -2,10 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Reflection; -using System.Diagnostics; using System.Collections.Generic; - +using System.Diagnostics; +using System.Reflection; using System.Reflection.Runtime.TypeInfos; using Internal.Metadata.NativeFormat; diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/NativeFormat/NativeFormatRuntimeNamedTypeInfo.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/NativeFormat/NativeFormatRuntimeNamedTypeInfo.cs index acb9bdb346396..0551f69e04f85 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/NativeFormat/NativeFormatRuntimeNamedTypeInfo.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/NativeFormat/NativeFormatRuntimeNamedTypeInfo.cs @@ -1,13 +1,13 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Text; -using System.Reflection; -using System.Diagnostics; using System.Collections.Generic; +using System.Diagnostics; +using System.Reflection; using System.Reflection.Runtime.Assemblies; -using System.Reflection.Runtime.General; using System.Reflection.Runtime.CustomAttributes; +using System.Reflection.Runtime.General; +using System.Text; using Internal.Metadata.NativeFormat; diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/NativeFormat/NativeFormatRuntimeTypeInfo.CoreGetDeclared.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/NativeFormat/NativeFormatRuntimeTypeInfo.CoreGetDeclared.cs index 82fec6b596842..56a6034510435 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/NativeFormat/NativeFormatRuntimeTypeInfo.CoreGetDeclared.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/NativeFormat/NativeFormatRuntimeTypeInfo.CoreGetDeclared.cs @@ -1,18 +1,19 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Diagnostics; using System.Collections.Generic; +using System.Diagnostics; +using System.Reflection.Runtime.EventInfos.NativeFormat; +using System.Reflection.Runtime.FieldInfos.NativeFormat; using System.Reflection.Runtime.General; using System.Reflection.Runtime.MethodInfos; using System.Reflection.Runtime.MethodInfos.NativeFormat; -using System.Reflection.Runtime.FieldInfos.NativeFormat; using System.Reflection.Runtime.PropertyInfos.NativeFormat; -using System.Reflection.Runtime.EventInfos.NativeFormat; -using NameFilter = System.Reflection.Runtime.BindingFlagSupport.NameFilter; using Internal.Metadata.NativeFormat; +using NameFilter = System.Reflection.Runtime.BindingFlagSupport.NameFilter; + namespace System.Reflection.Runtime.TypeInfos.NativeFormat { internal sealed partial class NativeFormatRuntimeNamedTypeInfo diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeArrayTypeInfo.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeArrayTypeInfo.cs index 657bf949877db..ab9fd61a3587e 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeArrayTypeInfo.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeArrayTypeInfo.cs @@ -2,12 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Reflection; -using System.Diagnostics; using System.Collections.Generic; +using System.Diagnostics; +using System.Reflection; using System.Reflection.Runtime.General; -using System.Reflection.Runtime.TypeInfos; using System.Reflection.Runtime.MethodInfos; +using System.Reflection.Runtime.TypeInfos; using Internal.Reflection.Core; using Internal.Reflection.Core.Execution; diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeByRefTypeInfo.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeByRefTypeInfo.cs index 2194e8ae663d0..438a3a67270c3 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeByRefTypeInfo.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeByRefTypeInfo.cs @@ -2,9 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Reflection; -using System.Diagnostics; using System.Collections.Generic; +using System.Diagnostics; +using System.Reflection; using System.Reflection.Runtime.General; namespace System.Reflection.Runtime.TypeInfos diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeConstructedGenericTypeInfo.UnificationKey.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeConstructedGenericTypeInfo.UnificationKey.cs index 9dd8dfc5b92a2..f486a77265045 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeConstructedGenericTypeInfo.UnificationKey.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeConstructedGenericTypeInfo.UnificationKey.cs @@ -2,10 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Reflection; -using System.Diagnostics; -using System.Collections.Generic; using System.Collections.Concurrent; +using System.Collections.Generic; +using System.Diagnostics; +using System.Reflection; namespace System.Reflection.Runtime.TypeInfos { diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeConstructedGenericTypeInfo.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeConstructedGenericTypeInfo.cs index 8f9c65c820bdf..4eaf089573fb1 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeConstructedGenericTypeInfo.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeConstructedGenericTypeInfo.cs @@ -2,13 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Text; -using System.Reflection; -using System.Diagnostics; -using System.Collections.Generic; using System.Collections.Concurrent; +using System.Collections.Generic; +using System.Diagnostics; +using System.Reflection; using System.Reflection.Runtime.General; using System.Reflection.Runtime.TypeInfos; +using System.Text; using Internal.Reflection.Core.Execution; diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeFunctionPointerTypeInfo.UnificationKey.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeFunctionPointerTypeInfo.UnificationKey.cs index 9752ae7744be9..9c23632df3ee4 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeFunctionPointerTypeInfo.UnificationKey.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeFunctionPointerTypeInfo.UnificationKey.cs @@ -2,10 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Reflection; -using System.Diagnostics; -using System.Collections.Generic; using System.Collections.Concurrent; +using System.Collections.Generic; +using System.Diagnostics; +using System.Reflection; namespace System.Reflection.Runtime.TypeInfos { diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeGenericParameterTypeInfo.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeGenericParameterTypeInfo.cs index ccf63e40a8b43..3462bde38cf7a 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeGenericParameterTypeInfo.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeGenericParameterTypeInfo.cs @@ -2,13 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Reflection; -using System.Diagnostics; using System.Collections.Generic; -using System.Runtime.InteropServices; +using System.Diagnostics; +using System.Reflection; +using System.Reflection.Runtime.CustomAttributes; using System.Reflection.Runtime.General; using System.Reflection.Runtime.MethodInfos; -using System.Reflection.Runtime.CustomAttributes; +using System.Runtime.InteropServices; using Internal.Reflection.Core; using Internal.Reflection.Core.Execution; diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeHasElementTypeInfo.UnificationKey.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeHasElementTypeInfo.UnificationKey.cs index 1f148774ea904..582c2c751b30f 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeHasElementTypeInfo.UnificationKey.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeHasElementTypeInfo.UnificationKey.cs @@ -2,10 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Reflection; -using System.Diagnostics; -using System.Collections.Generic; using System.Collections.Concurrent; +using System.Collections.Generic; +using System.Diagnostics; +using System.Reflection; namespace System.Reflection.Runtime.TypeInfos { diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeHasElementTypeInfo.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeHasElementTypeInfo.cs index 25f294fcc7345..af7c5a4d5a622 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeHasElementTypeInfo.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeHasElementTypeInfo.cs @@ -2,13 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Reflection; -using System.Diagnostics; -using System.Collections.Generic; using System.Collections.Concurrent; -using System.Runtime.InteropServices; +using System.Collections.Generic; +using System.Diagnostics; +using System.Reflection; using System.Reflection.Runtime.General; using System.Reflection.Runtime.TypeInfos; +using System.Runtime.InteropServices; namespace System.Reflection.Runtime.TypeInfos { diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeNamedTypeInfo.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeNamedTypeInfo.cs index 8c244735a90b8..c97870827805d 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeNamedTypeInfo.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeNamedTypeInfo.cs @@ -1,12 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Diagnostics; -using System.Collections.Generic; using System.Collections.Concurrent; -using System.Runtime.InteropServices; -using System.Reflection.Runtime.General; +using System.Collections.Generic; +using System.Diagnostics; using System.Reflection.Runtime.CustomAttributes; +using System.Reflection.Runtime.General; +using System.Runtime.InteropServices; #pragma warning disable CA1067 // override Equals because it implements IEquatable diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimePointerTypeInfo.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimePointerTypeInfo.cs index 1893a2f668dd2..fa0a46b4fa194 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimePointerTypeInfo.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimePointerTypeInfo.cs @@ -2,9 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Reflection; -using System.Diagnostics; using System.Collections.Generic; +using System.Diagnostics; +using System.Reflection; using System.Reflection.Runtime.General; namespace System.Reflection.Runtime.TypeInfos diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeTypeDefinitionTypeInfo.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeTypeDefinitionTypeInfo.cs index 95281c03fcf6f..c88d28755f087 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeTypeDefinitionTypeInfo.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeTypeDefinitionTypeInfo.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Runtime.CompilerServices; using System.Reflection.Runtime.General; +using System.Runtime.CompilerServices; using Internal.Runtime.Augments; diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeTypeInfo.BindingFlags.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeTypeInfo.BindingFlags.cs index ae9c3745817ab..ec8dbdbaef4ce 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeTypeInfo.BindingFlags.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeTypeInfo.BindingFlags.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Diagnostics; -using System.Reflection.Runtime.General; using System.Reflection.Runtime.BindingFlagSupport; +using System.Reflection.Runtime.General; namespace System.Reflection.Runtime.TypeInfos { diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeTypeInfo.CoreGetDeclared.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeTypeInfo.CoreGetDeclared.cs index 3dcbe559c0e2b..85a912891adfe 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeTypeInfo.CoreGetDeclared.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeTypeInfo.CoreGetDeclared.cs @@ -1,17 +1,18 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Diagnostics; using System.Collections.Generic; +using System.Diagnostics; +using System.Reflection.Runtime.EventInfos; +using System.Reflection.Runtime.FieldInfos; using System.Reflection.Runtime.General; using System.Reflection.Runtime.MethodInfos; -using System.Reflection.Runtime.FieldInfos; using System.Reflection.Runtime.PropertyInfos; -using System.Reflection.Runtime.EventInfos; -using NameFilter = System.Reflection.Runtime.BindingFlagSupport.NameFilter; using Internal.Reflection.Core.Execution; +using NameFilter = System.Reflection.Runtime.BindingFlagSupport.NameFilter; + // // The CoreGet() methods on RuntimeTypeInfo provide the raw source material for the Type.Get*() family of apis. // diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeTypeInfo.GetMember.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeTypeInfo.GetMember.cs index cc93bc1c2f6b9..f9fce53c126d1 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeTypeInfo.GetMember.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeTypeInfo.GetMember.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Collections.Generic; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; -using System.Collections.Generic; using System.Reflection.Runtime.BindingFlagSupport; using System.Reflection.Runtime.General; diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeTypeInfo.InvokeMember.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeTypeInfo.InvokeMember.cs index 4d39ceaf00005..5383dc1f8ed68 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeTypeInfo.InvokeMember.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeTypeInfo.InvokeMember.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Collections.Generic; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Globalization; -using System.Collections.Generic; using System.Reflection.Runtime.BindingFlagSupport; using System.Reflection.Runtime.General; diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeTypeInfo.TypeComponentsCache.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeTypeInfo.TypeComponentsCache.cs index bc49e276810f6..d78f2b7ddf68e 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeTypeInfo.TypeComponentsCache.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeTypeInfo.TypeComponentsCache.cs @@ -1,14 +1,14 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Threading; +using System.Collections.Concurrent; +using System.Collections.Generic; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; -using System.Collections.Generic; -using System.Collections.Concurrent; using System.Reflection; -using System.Reflection.Runtime.General; using System.Reflection.Runtime.BindingFlagSupport; +using System.Reflection.Runtime.General; +using System.Threading; using Internal.Reflection.Core.Execution; diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeTypeInfo.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeTypeInfo.cs index c1469830cb318..ae4d21b5c4fe0 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeTypeInfo.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/RuntimeTypeInfo.cs @@ -1,17 +1,17 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Collections.Generic; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; -using System.Collections.Generic; -using System.Runtime.CompilerServices; using System.Reflection; using System.Reflection.Runtime.General; using System.Reflection.Runtime.MethodInfos; +using System.Runtime.CompilerServices; +using Internal.Reflection.Augments; using Internal.Reflection.Core.Execution; using Internal.Reflection.Core.NonPortable; -using Internal.Reflection.Augments; using Internal.Runtime.Augments; using StructLayoutAttribute = System.Runtime.InteropServices.StructLayoutAttribute; diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/RuntimeAssemblyName.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/RuntimeAssemblyName.cs index 5360c98b301c2..ee76c4a5e302d 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/RuntimeAssemblyName.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/RuntimeAssemblyName.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Diagnostics; using System.Collections.Generic; +using System.Diagnostics; namespace System.Reflection { diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Resources/ManifestBasedResourceGroveler.NativeAot.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Resources/ManifestBasedResourceGroveler.NativeAot.cs index 4439ead68b7ea..f16c1ba389238 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Resources/ManifestBasedResourceGroveler.NativeAot.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Resources/ManifestBasedResourceGroveler.NativeAot.cs @@ -7,6 +7,7 @@ using System.IO; using System.Reflection; using System.Text; + using Internal.Reflection.Augments; namespace System.Resources diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/CompilerServices/ClassConstructorRunner.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/CompilerServices/ClassConstructorRunner.cs index 7e8293e1a1653..ff06464f400a9 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/CompilerServices/ClassConstructorRunner.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/CompilerServices/ClassConstructorRunner.cs @@ -2,10 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Threading; -using System.Diagnostics; using System.Collections.Generic; +using System.Diagnostics; using System.Runtime.InteropServices; +using System.Threading; using Internal.Runtime; using Internal.Runtime.CompilerHelpers; diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/CompilerServices/RuntimeHelpers.NativeAot.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/CompilerServices/RuntimeHelpers.NativeAot.cs index cc0a8d2753f62..7895376c608ec 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/CompilerServices/RuntimeHelpers.NativeAot.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/CompilerServices/RuntimeHelpers.NativeAot.cs @@ -1,14 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Diagnostics.CodeAnalysis; +using System.Runtime.InteropServices; +using System.Runtime.Serialization; +using System.Threading; + using Internal.Reflection.Augments; using Internal.Reflection.Core.Execution; using Internal.Runtime; using Internal.Runtime.Augments; -using System.Diagnostics.CodeAnalysis; -using System.Runtime.Serialization; -using System.Runtime.InteropServices; -using System.Threading; using Debug = System.Diagnostics.Debug; diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/CompilerServices/StaticClassConstructionContext.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/CompilerServices/StaticClassConstructionContext.cs index a07e6e9bbc212..c458a7d04a12a 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/CompilerServices/StaticClassConstructionContext.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/CompilerServices/StaticClassConstructionContext.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Threading; using System.Runtime; using System.Runtime.InteropServices; +using System.Threading; namespace System.Runtime.CompilerServices { diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/InteropServices/InteropExtensions.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/InteropServices/InteropExtensions.cs index cd397aca57f99..8fc9c37a9dd1b 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/InteropServices/InteropExtensions.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/InteropServices/InteropExtensions.cs @@ -2,9 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Runtime.CompilerServices; using System.Collections.Generic; using System.Diagnostics; +using System.Runtime.CompilerServices; using System.Threading; using Internal.Runtime.Augments; diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/InteropServices/MemoryMarshal.NativeAot.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/InteropServices/MemoryMarshal.NativeAot.cs index 616936963ce4a..ec7f199fb54b4 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/InteropServices/MemoryMarshal.NativeAot.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/InteropServices/MemoryMarshal.NativeAot.cs @@ -3,6 +3,7 @@ using System.Runtime.CompilerServices; using System.Runtime.Versioning; + using Internal.Runtime.CompilerServices; namespace System.Runtime.InteropServices diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/InteropServices/PInvokeMarshal.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/InteropServices/PInvokeMarshal.cs index 61ed1dd6ec08d..a69bf21febbd7 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/InteropServices/PInvokeMarshal.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/InteropServices/PInvokeMarshal.cs @@ -1,17 +1,18 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Security; -using Debug = System.Diagnostics.Debug; +using System.Buffers; using System.Collections.Generic; -using System.Threading; using System.Runtime.CompilerServices; +using System.Security; +using System.Text; +using System.Threading; using Internal.Runtime.Augments; using Internal.Runtime.CompilerHelpers; using Internal.Runtime.CompilerServices; -using System.Text; -using System.Buffers; + +using Debug = System.Diagnostics.Debug; namespace System.Runtime.InteropServices { diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/InteropServices/TrackerObjectManager.NativeAot.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/InteropServices/TrackerObjectManager.NativeAot.cs index 658e894870a6b..2e2674fb0e1f8 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/InteropServices/TrackerObjectManager.NativeAot.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/InteropServices/TrackerObjectManager.NativeAot.cs @@ -5,6 +5,7 @@ using System.Diagnostics; using System.Runtime.CompilerServices; using System.Threading; + using static System.Runtime.InteropServices.ComWrappers; namespace System.Runtime.InteropServices diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/RuntimeImports.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/RuntimeImports.cs index 957badf100ed8..733fdece37f1c 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/RuntimeImports.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/RuntimeImports.cs @@ -4,8 +4,8 @@ using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Diagnostics.Tracing; -using System.Runtime.InteropServices; using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; using Internal.Runtime; using Internal.Runtime.CompilerServices; diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/TypeLoaderExports.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/TypeLoaderExports.cs index c49220b95672d..c7fa5b35d1dbf 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/TypeLoaderExports.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/TypeLoaderExports.cs @@ -2,12 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using Internal.Runtime.Augments; using System.Diagnostics; -using System.Threading; +using System.Numerics; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -using System.Numerics; +using System.Threading; + +using Internal.Runtime.Augments; namespace System.Runtime { diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/RuntimeFieldHandle.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/RuntimeFieldHandle.cs index 7f8b164ba2b35..db507507496ce 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/RuntimeFieldHandle.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/RuntimeFieldHandle.cs @@ -3,9 +3,9 @@ using System.ComponentModel; using System.Reflection; +using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Serialization; -using System.Runtime.CompilerServices; using Internal.Runtime.Augments; diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/RuntimeMethodHandle.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/RuntimeMethodHandle.cs index ba7843ba7c75e..139b61b3bbcdb 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/RuntimeMethodHandle.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/RuntimeMethodHandle.cs @@ -3,13 +3,13 @@ using System.ComponentModel; using System.Reflection; +using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Serialization; -using System.Runtime.CompilerServices; +using Internal.Reflection.Augments; using Internal.Runtime.Augments; using Internal.Runtime.CompilerServices; -using Internal.Reflection.Augments; namespace System { diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/RuntimeTypeHandle.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/RuntimeTypeHandle.cs index f259e57d575de..cf48b0aedc754 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/RuntimeTypeHandle.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/RuntimeTypeHandle.cs @@ -2,11 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.ComponentModel; +using System.Diagnostics; using System.Runtime; -using System.Runtime.InteropServices; using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; using System.Runtime.Serialization; -using System.Diagnostics; using Internal.Runtime; using Internal.Runtime.Augments; diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/String.Intern.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/String.Intern.cs index 19e5b740d8a58..ed8093d4e6463 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/String.Intern.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/String.Intern.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Threading; + using Internal.TypeSystem; namespace System diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Threading/Interlocked.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Threading/Interlocked.cs index a81051a58ba17..702d21dcc030c 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Threading/Interlocked.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Threading/Interlocked.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Diagnostics.CodeAnalysis; using System.Runtime; using System.Runtime.CompilerServices; -using System.Diagnostics.CodeAnalysis; namespace System.Threading { diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Threading/ObjectHeader.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Threading/ObjectHeader.cs index d411f997ee11a..44ffec51a7e25 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Threading/ObjectHeader.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Threading/ObjectHeader.cs @@ -1,10 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Internal.Runtime; using System.Diagnostics; using System.Runtime.CompilerServices; +using Internal.Runtime; + namespace System.Threading { /// diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Threading/Thread.NativeAot.Unix.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Threading/Thread.NativeAot.Unix.cs index 0a1da5a67a5a3..06fb9c4ffc9e9 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Threading/Thread.NativeAot.Unix.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Threading/Thread.NativeAot.Unix.cs @@ -1,11 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Diagnostics; using System.Runtime; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; + namespace System.Threading { public sealed partial class Thread diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Threading/Thread.NativeAot.Windows.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Threading/Thread.NativeAot.Windows.cs index 7d8c2f2a2f290..ad72fc725ef8c 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Threading/Thread.NativeAot.Windows.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Threading/Thread.NativeAot.Windows.cs @@ -1,12 +1,13 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Diagnostics; using System.Runtime; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; + namespace System.Threading { using OSThreadPriority = Interop.Kernel32.ThreadPriority; diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Threading/Thread.NativeAot.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Threading/Thread.NativeAot.cs index ef35ed5358faf..5bdb703b44527 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Threading/Thread.NativeAot.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Threading/Thread.NativeAot.cs @@ -1,7 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Diagnostics; using System.Globalization; using System.Runtime; @@ -9,6 +8,8 @@ using System.Runtime.InteropServices; using System.Runtime.Versioning; +using Microsoft.Win32.SafeHandles; + namespace System.Threading { public sealed partial class Thread diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/TypedReference.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/TypedReference.cs index 2c8ac0d81f2c8..6456aacbe9b61 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/TypedReference.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/TypedReference.cs @@ -3,11 +3,11 @@ using System.Reflection; using System.Runtime; -using System.Runtime.InteropServices; using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; -using Internal.Runtime.CompilerServices; using Internal.Reflection.Augments; +using Internal.Runtime.CompilerServices; namespace System { diff --git a/src/coreclr/nativeaot/System.Private.DisabledReflection/src/Internal/Reflection/ReflectionCoreCallbacksImplementation.cs b/src/coreclr/nativeaot/System.Private.DisabledReflection/src/Internal/Reflection/ReflectionCoreCallbacksImplementation.cs index cfcd7c75df718..c787fe99d2d6d 100644 --- a/src/coreclr/nativeaot/System.Private.DisabledReflection/src/Internal/Reflection/ReflectionCoreCallbacksImplementation.cs +++ b/src/coreclr/nativeaot/System.Private.DisabledReflection/src/Internal/Reflection/ReflectionCoreCallbacksImplementation.cs @@ -5,6 +5,7 @@ using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Reflection; + using Internal.Reflection.Augments; using Internal.Runtime.Augments; diff --git a/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/ExecutionEnvironmentImplementation.ManifestResources.cs b/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/ExecutionEnvironmentImplementation.ManifestResources.cs index 1fbfa3655d591..182a3333d6a9d 100644 --- a/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/ExecutionEnvironmentImplementation.ManifestResources.cs +++ b/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/ExecutionEnvironmentImplementation.ManifestResources.cs @@ -2,18 +2,17 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.IO; -using System.Reflection; using System.Collections.Generic; using System.Diagnostics; +using System.IO; +using System.Reflection; +using Internal.NativeFormat; +using Internal.Reflection.Core.Execution; using Internal.Runtime; using Internal.Runtime.Augments; using Internal.Runtime.TypeLoader; -using Internal.Reflection.Core.Execution; -using Internal.NativeFormat; - namespace Internal.Reflection.Execution { //========================================================================================================== diff --git a/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/ExecutionEnvironmentImplementation.MappingTables.cs b/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/ExecutionEnvironmentImplementation.MappingTables.cs index 1d74a756a130d..e0742e6930739 100644 --- a/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/ExecutionEnvironmentImplementation.MappingTables.cs +++ b/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/ExecutionEnvironmentImplementation.MappingTables.cs @@ -1,30 +1,24 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using global::System; -using global::System.Reflection; -using global::System.Collections.Generic; +using System.Reflection.Runtime.General; +using System.Threading; +using global::Internal.Metadata.NativeFormat; +using global::Internal.NativeFormat; +using global::Internal.Reflection.Core.Execution; +using global::Internal.Reflection.Execution.FieldAccessors; +using global::Internal.Reflection.Execution.MethodInvokers; +using global::Internal.Runtime; using global::Internal.Runtime.Augments; using global::Internal.Runtime.CompilerServices; using global::Internal.Runtime.TypeLoader; - -using global::Internal.Reflection.Core.Execution; -using global::Internal.Reflection.Execution.MethodInvokers; -using global::Internal.Reflection.Execution.FieldAccessors; - -using global::Internal.Metadata.NativeFormat; - +using global::System; +using global::System.Collections.Generic; +using global::System.Reflection; using global::System.Runtime.InteropServices; -using global::Internal.Runtime; -using global::Internal.NativeFormat; - -using System.Reflection.Runtime.General; -using System.Threading; - using CanonicalFormKind = global::Internal.TypeSystem.CanonicalFormKind; - using Debug = System.Diagnostics.Debug; namespace Internal.Reflection.Execution diff --git a/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/ExecutionEnvironmentImplementation.MetadataTable.cs b/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/ExecutionEnvironmentImplementation.MetadataTable.cs index 676afe5283220..106ea3a862692 100644 --- a/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/ExecutionEnvironmentImplementation.MetadataTable.cs +++ b/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/ExecutionEnvironmentImplementation.MetadataTable.cs @@ -1,21 +1,17 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using global::System; -using global::System.Reflection; -using global::System.Collections.Generic; - -using global::Internal.Runtime.Augments; - using global::Internal.Reflection.Core; using global::Internal.Reflection.Core.Execution; using global::Internal.Reflection.Execution.MethodInvokers; - +using global::Internal.Runtime; +using global::Internal.Runtime.Augments; +using global::System; +using global::System.Collections.Generic; +using global::System.Reflection; using global::System.Runtime.CompilerServices; using global::System.Runtime.InteropServices; -using global::Internal.Runtime; - using Debug = System.Diagnostics.Debug; namespace Internal.Reflection.Execution diff --git a/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/ExecutionEnvironmentImplementation.Runtime.cs b/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/ExecutionEnvironmentImplementation.Runtime.cs index bfe6060551f02..f3e07c4f049fd 100644 --- a/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/ExecutionEnvironmentImplementation.Runtime.cs +++ b/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/ExecutionEnvironmentImplementation.Runtime.cs @@ -7,15 +7,14 @@ using System.Reflection; using System.Reflection.Runtime.General; -using Internal.Runtime.Augments; -using Internal.Runtime.TypeLoader; - using Internal.Reflection.Core; using Internal.Reflection.Core.Execution; using Internal.Reflection.Execution.FieldAccessors; using Internal.Reflection.Execution.MethodInvokers; using Internal.Reflection.Execution.PayForPlayExperience; using Internal.Reflection.Extensions.NonPortable; +using Internal.Runtime.Augments; +using Internal.Runtime.TypeLoader; namespace Internal.Reflection.Execution { diff --git a/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/FieldAccessors/InstanceFieldAccessor.cs b/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/FieldAccessors/InstanceFieldAccessor.cs index b23c827ade44e..7d4b05805229f 100644 --- a/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/FieldAccessors/InstanceFieldAccessor.cs +++ b/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/FieldAccessors/InstanceFieldAccessor.cs @@ -4,8 +4,8 @@ using System; using System.Reflection; -using Internal.Runtime.Augments; using Internal.Reflection.Core.Execution; +using Internal.Runtime.Augments; namespace Internal.Reflection.Execution.FieldAccessors { diff --git a/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/FieldAccessors/PointerTypeFieldAccessorForInstanceFields.cs b/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/FieldAccessors/PointerTypeFieldAccessorForInstanceFields.cs index 24d93ba27c980..4bbbe47d07738 100644 --- a/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/FieldAccessors/PointerTypeFieldAccessorForInstanceFields.cs +++ b/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/FieldAccessors/PointerTypeFieldAccessorForInstanceFields.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; + using Internal.Runtime.Augments; namespace Internal.Reflection.Execution.FieldAccessors diff --git a/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/FieldAccessors/PointerTypeFieldAccessorForStaticFields.cs b/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/FieldAccessors/PointerTypeFieldAccessorForStaticFields.cs index 224ad076cbce7..c5bc687d0b302 100644 --- a/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/FieldAccessors/PointerTypeFieldAccessorForStaticFields.cs +++ b/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/FieldAccessors/PointerTypeFieldAccessorForStaticFields.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; + using Internal.Runtime; using Internal.Runtime.Augments; diff --git a/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/FieldAccessors/ReferenceTypeFieldAccessorForInstanceFields.cs b/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/FieldAccessors/ReferenceTypeFieldAccessorForInstanceFields.cs index 39bd77cd3dd0f..dc994ffa11436 100644 --- a/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/FieldAccessors/ReferenceTypeFieldAccessorForInstanceFields.cs +++ b/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/FieldAccessors/ReferenceTypeFieldAccessorForInstanceFields.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; + using Internal.Runtime.Augments; namespace Internal.Reflection.Execution.FieldAccessors diff --git a/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/FieldAccessors/ReferenceTypeFieldAccessorForStaticFields.cs b/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/FieldAccessors/ReferenceTypeFieldAccessorForStaticFields.cs index 5233fe28d5dab..6015358c8b18e 100644 --- a/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/FieldAccessors/ReferenceTypeFieldAccessorForStaticFields.cs +++ b/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/FieldAccessors/ReferenceTypeFieldAccessorForStaticFields.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; + using Internal.Runtime; using Internal.Runtime.Augments; diff --git a/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/FieldAccessors/RegularStaticFieldAccessor.cs b/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/FieldAccessors/RegularStaticFieldAccessor.cs index d0e506a2a147b..8fe2dac381c99 100644 --- a/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/FieldAccessors/RegularStaticFieldAccessor.cs +++ b/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/FieldAccessors/RegularStaticFieldAccessor.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; + using Internal.Runtime; namespace Internal.Reflection.Execution.FieldAccessors diff --git a/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/FieldAccessors/StaticFieldAccessor.cs b/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/FieldAccessors/StaticFieldAccessor.cs index 088cd86761fdd..22b31e732d34a 100644 --- a/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/FieldAccessors/StaticFieldAccessor.cs +++ b/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/FieldAccessors/StaticFieldAccessor.cs @@ -2,11 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Reflection; using System.Diagnostics; +using System.Reflection; -using Internal.Runtime.Augments; using Internal.Reflection.Core.Execution; +using Internal.Runtime.Augments; namespace Internal.Reflection.Execution.FieldAccessors { diff --git a/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/FieldAccessors/ValueTypeFieldAccessorForInstanceFields.cs b/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/FieldAccessors/ValueTypeFieldAccessorForInstanceFields.cs index 326a8d0346568..7e13e0f45b377 100644 --- a/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/FieldAccessors/ValueTypeFieldAccessorForInstanceFields.cs +++ b/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/FieldAccessors/ValueTypeFieldAccessorForInstanceFields.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; + using Internal.Runtime.Augments; namespace Internal.Reflection.Execution.FieldAccessors diff --git a/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/FieldAccessors/ValueTypeFieldAccessorForStaticFields.cs b/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/FieldAccessors/ValueTypeFieldAccessorForStaticFields.cs index 28765e89600db..f670e9ec12559 100644 --- a/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/FieldAccessors/ValueTypeFieldAccessorForStaticFields.cs +++ b/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/FieldAccessors/ValueTypeFieldAccessorForStaticFields.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; + using Internal.Runtime; using Internal.Runtime.Augments; diff --git a/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/FieldAccessors/WritableStaticFieldAccessor.cs b/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/FieldAccessors/WritableStaticFieldAccessor.cs index 514763897ed60..afc607a4d1df3 100644 --- a/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/FieldAccessors/WritableStaticFieldAccessor.cs +++ b/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/FieldAccessors/WritableStaticFieldAccessor.cs @@ -3,6 +3,7 @@ using System; using System.Reflection; + using Internal.Runtime.Augments; namespace Internal.Reflection.Execution.FieldAccessors diff --git a/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/MetadataReaderExtensions.cs b/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/MetadataReaderExtensions.cs index 6a152dc1dada2..5163cfc8c6885 100644 --- a/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/MetadataReaderExtensions.cs +++ b/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/MetadataReaderExtensions.cs @@ -1,9 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using global::System; - using global::Internal.Metadata.NativeFormat; +using global::System; using Debug = System.Diagnostics.Debug; diff --git a/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/MethodInvokers/InstanceMethodInvoker.cs b/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/MethodInvokers/InstanceMethodInvoker.cs index e07cf71b6dd19..bff1cfab4763f 100644 --- a/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/MethodInvokers/InstanceMethodInvoker.cs +++ b/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/MethodInvokers/InstanceMethodInvoker.cs @@ -1,14 +1,14 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using global::System; -using global::System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -using global::System.Diagnostics; using global::Internal.Runtime.Augments; using global::Internal.Runtime.CompilerServices; +using global::System; +using global::System.Diagnostics; +using global::System.Reflection; namespace Internal.Reflection.Execution.MethodInvokers { diff --git a/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/MethodInvokers/MethodInvokerWithMethodInvokeInfo.cs b/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/MethodInvokers/MethodInvokerWithMethodInvokeInfo.cs index 6877a0f46ddaf..df5715e2d119d 100644 --- a/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/MethodInvokers/MethodInvokerWithMethodInvokeInfo.cs +++ b/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/MethodInvokers/MethodInvokerWithMethodInvokeInfo.cs @@ -1,14 +1,13 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using global::System; -using global::System.Reflection; - -using global::Internal.Runtime.Augments; -using global::Internal.Reflection.Core.Execution; +using System.Reflection.Runtime.General; using global::Internal.Metadata.NativeFormat; -using System.Reflection.Runtime.General; +using global::Internal.Reflection.Core.Execution; +using global::Internal.Runtime.Augments; +using global::System; +using global::System.Reflection; namespace Internal.Reflection.Execution.MethodInvokers { diff --git a/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/MethodInvokers/StaticMethodInvoker.cs b/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/MethodInvokers/StaticMethodInvoker.cs index 2443e1848ef90..7f9ddec54f1c4 100644 --- a/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/MethodInvokers/StaticMethodInvoker.cs +++ b/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/MethodInvokers/StaticMethodInvoker.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using global::System; -using global::System.Reflection; using global::System.Diagnostics; +using global::System.Reflection; namespace Internal.Reflection.Execution.MethodInvokers { diff --git a/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/MethodInvokers/VirtualMethodInvoker.cs b/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/MethodInvokers/VirtualMethodInvoker.cs index f92c1ef3d6f70..9fbe5e9e2d2c9 100644 --- a/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/MethodInvokers/VirtualMethodInvoker.cs +++ b/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/MethodInvokers/VirtualMethodInvoker.cs @@ -1,12 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using global::System; -using global::System.Reflection; -using global::System.Diagnostics; - using global::Internal.Runtime.Augments; using global::Internal.Runtime.CompilerServices; +using global::System; +using global::System.Diagnostics; +using global::System.Reflection; namespace Internal.Reflection.Execution.MethodInvokers { diff --git a/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/NativeFormatEnumInfo.cs b/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/NativeFormatEnumInfo.cs index a599042b62322..0149ab203bc92 100644 --- a/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/NativeFormatEnumInfo.cs +++ b/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/NativeFormatEnumInfo.cs @@ -6,8 +6,8 @@ using System.Reflection; using System.Reflection.Runtime.General; -using Internal.Runtime.Augments; using Internal.Metadata.NativeFormat; +using Internal.Runtime.Augments; namespace Internal.Reflection.Execution { diff --git a/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/PayForPlayExperience/MissingMetadataExceptionCreator.cs b/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/PayForPlayExperience/MissingMetadataExceptionCreator.cs index 5dd4ab441f9de..ce3ad7dafc212 100644 --- a/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/PayForPlayExperience/MissingMetadataExceptionCreator.cs +++ b/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/PayForPlayExperience/MissingMetadataExceptionCreator.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using global::System; -using global::System.Text; using global::System.Reflection; +using global::System.Text; namespace Internal.Reflection.Execution.PayForPlayExperience { diff --git a/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/ReflectionExecution.cs b/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/ReflectionExecution.cs index 5d6c0ec9a7fdc..749948d340369 100644 --- a/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/ReflectionExecution.cs +++ b/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/ReflectionExecution.cs @@ -22,17 +22,15 @@ // System.Private.CoreLib.dll, via a callback (see Internal.System.Runtime.Augment) // +using global::Internal.Metadata.NativeFormat; +using global::Internal.Reflection.Core; +using global::Internal.Reflection.Core.Execution; +using global::Internal.Runtime.Augments; using global::System; using global::System.Collections.Generic; using global::System.Reflection; using global::System.Reflection.Runtime.General; -using global::Internal.Runtime.Augments; - -using global::Internal.Reflection.Core; -using global::Internal.Reflection.Core.Execution; -using global::Internal.Metadata.NativeFormat; - using Debug = System.Diagnostics.Debug; namespace Internal.Reflection.Execution diff --git a/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/RuntimeHandlesExtensions.cs b/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/RuntimeHandlesExtensions.cs index a1597d9f7f624..62738e128e359 100644 --- a/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/RuntimeHandlesExtensions.cs +++ b/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/RuntimeHandlesExtensions.cs @@ -3,6 +3,7 @@ using System; using System.Collections.Generic; + using Internal.Runtime.Augments; namespace Internal.Reflection.Execution diff --git a/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/TypeLoader/ConstraintValidator.cs b/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/TypeLoader/ConstraintValidator.cs index 61c9df1adc0e5..ccb1a9279f0a6 100644 --- a/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/TypeLoader/ConstraintValidator.cs +++ b/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/TypeLoader/ConstraintValidator.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; using System.Reflection; + using Debug = global::System.Diagnostics.Debug; namespace Internal.Reflection.Execution diff --git a/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/TypeLoader/TypeCast.cs b/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/TypeLoader/TypeCast.cs index c8df5eae0b107..531a23260b051 100644 --- a/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/TypeLoader/TypeCast.cs +++ b/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Execution/TypeLoader/TypeCast.cs @@ -2,9 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Reflection; -using System.Collections.Generic; + using Debug = System.Diagnostics.Debug; namespace Internal.Reflection.Execution diff --git a/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Extensions/NonPortable/DelegateMethodInfoRetriever.cs b/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Extensions/NonPortable/DelegateMethodInfoRetriever.cs index 3c820e26fe075..00bb4f9d820cd 100644 --- a/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Extensions/NonPortable/DelegateMethodInfoRetriever.cs +++ b/src/coreclr/nativeaot/System.Private.Reflection.Execution/src/Internal/Reflection/Extensions/NonPortable/DelegateMethodInfoRetriever.cs @@ -1,16 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using global::System; -using global::System.Reflection; +using System.Reflection.Runtime.General; -using global::Internal.Runtime.TypeLoader; +using global::Internal.Reflection.Core.Execution; +using global::Internal.Reflection.Execution; using global::Internal.Runtime.Augments; using global::Internal.Runtime.CompilerServices; -using global::Internal.Reflection.Execution; -using global::Internal.Reflection.Core.Execution; - -using System.Reflection.Runtime.General; +using global::Internal.Runtime.TypeLoader; +using global::System; +using global::System.Reflection; namespace Internal.Reflection.Extensions.NonPortable { diff --git a/src/coreclr/nativeaot/System.Private.StackTraceMetadata/src/Internal/StackTraceMetadata/StackTraceMetadata.cs b/src/coreclr/nativeaot/System.Private.StackTraceMetadata/src/Internal/StackTraceMetadata/StackTraceMetadata.cs index ab9ae2967f2bb..d4a4da72783b7 100644 --- a/src/coreclr/nativeaot/System.Private.StackTraceMetadata/src/Internal/StackTraceMetadata/StackTraceMetadata.cs +++ b/src/coreclr/nativeaot/System.Private.StackTraceMetadata/src/Internal/StackTraceMetadata/StackTraceMetadata.cs @@ -12,8 +12,8 @@ using Internal.Runtime.TypeLoader; using Internal.TypeSystem; -using ReflectionExecution = Internal.Reflection.Execution.ReflectionExecution; using Debug = System.Diagnostics.Debug; +using ReflectionExecution = Internal.Reflection.Execution.ReflectionExecution; namespace Internal.StackTraceMetadata { diff --git a/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Reflection/Execution/AssemblyBinderImplementation.cs b/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Reflection/Execution/AssemblyBinderImplementation.cs index bd6c07a99e265..ef8b18ece5e97 100644 --- a/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Reflection/Execution/AssemblyBinderImplementation.cs +++ b/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Reflection/Execution/AssemblyBinderImplementation.cs @@ -2,18 +2,16 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; +using System.Collections.Generic; +using System.Diagnostics; using System.IO; using System.Reflection; -using System.Diagnostics; -using System.Collections.Generic; - using System.Reflection.Runtime.General; +using Internal.Metadata.NativeFormat; using Internal.Reflection.Core; using Internal.Runtime.TypeLoader; -using Internal.Metadata.NativeFormat; - namespace Internal.Reflection.Execution { //============================================================================================================================= diff --git a/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/CanonicallyEquivalentEntryLocator.cs b/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/CanonicallyEquivalentEntryLocator.cs index 22e5a2636fa5a..bf31aa5ed9c7a 100644 --- a/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/CanonicallyEquivalentEntryLocator.cs +++ b/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/CanonicallyEquivalentEntryLocator.cs @@ -5,6 +5,7 @@ using System; using System.Collections.Generic; using System.Diagnostics; + using Internal.Runtime.Augments; using Internal.TypeSystem; diff --git a/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/EETypeCreator.cs b/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/EETypeCreator.cs index 7a259c8bf3561..d27abea90a98f 100644 --- a/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/EETypeCreator.cs +++ b/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/EETypeCreator.cs @@ -3,12 +3,11 @@ using System; +using System.Collections.Generic; using System.Diagnostics; using System.Runtime.InteropServices; using Internal.Runtime.Augments; -using System.Collections.Generic; - using Internal.TypeSystem; namespace Internal.Runtime.TypeLoader diff --git a/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/Empty.cs b/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/Empty.cs index 3794f19975b7e..b572a39f362d4 100644 --- a/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/Empty.cs +++ b/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/Empty.cs @@ -3,9 +3,9 @@ using System; -using System.Diagnostics; using System.Collections; using System.Collections.Generic; +using System.Diagnostics; namespace System.Collections.Generic { diff --git a/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/ExternalReferencesTable.NativeFormatModuleInfo.cs b/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/ExternalReferencesTable.NativeFormatModuleInfo.cs index a6b55a1b3479d..2d3d7c54813d0 100644 --- a/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/ExternalReferencesTable.NativeFormatModuleInfo.cs +++ b/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/ExternalReferencesTable.NativeFormatModuleInfo.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; + using Internal.Runtime.Augments; namespace Internal.Runtime.TypeLoader diff --git a/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/GenericDictionary.cs b/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/GenericDictionary.cs index 56a7fd8aa6e96..c660b63d0c31e 100644 --- a/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/GenericDictionary.cs +++ b/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/GenericDictionary.cs @@ -3,7 +3,9 @@ using System; + using Internal.Runtime.Augments; + using Debug = System.Diagnostics.Debug; namespace Internal.Runtime.TypeLoader diff --git a/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/GenericDictionaryCell.cs b/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/GenericDictionaryCell.cs index a1f56634c1022..d973b0a02a70c 100644 --- a/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/GenericDictionaryCell.cs +++ b/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/GenericDictionaryCell.cs @@ -5,10 +5,9 @@ using System; using System.Diagnostics; +using Internal.NativeFormat; using Internal.Runtime.Augments; using Internal.Runtime.CompilerServices; - -using Internal.NativeFormat; using Internal.TypeSystem; using Internal.TypeSystem.NoMetadata; diff --git a/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/LowLevelStringConverter.cs b/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/LowLevelStringConverter.cs index 5c5dcf28c1b61..7df8fa00779bd 100644 --- a/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/LowLevelStringConverter.cs +++ b/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/LowLevelStringConverter.cs @@ -3,9 +3,8 @@ using System; -using System.Text; - using System.Reflection.Runtime.General; +using System.Text; using Internal.Metadata.NativeFormat; using Internal.Runtime.Augments; diff --git a/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/MetadataNameExtensions.cs b/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/MetadataNameExtensions.cs index 55d12151ced2c..3b998e208df7c 100644 --- a/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/MetadataNameExtensions.cs +++ b/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/MetadataNameExtensions.cs @@ -2,13 +2,14 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Text; -using System.Reflection; using System.Collections.Generic; -using Debug = System.Diagnostics.Debug; +using System.Reflection; +using System.Text; using global::Internal.Metadata.NativeFormat; +using Debug = System.Diagnostics.Debug; + namespace Internal.Runtime.TypeLoader { internal static class MetadataNameExtensions diff --git a/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/ModuleList.cs b/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/ModuleList.cs index 0fbd8f7c7b631..be3bfe2637102 100644 --- a/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/ModuleList.cs +++ b/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/ModuleList.cs @@ -6,8 +6,8 @@ using System.Collections.Generic; using System.Diagnostics; -using Internal.Runtime.Augments; using Internal.Metadata.NativeFormat; +using Internal.Runtime.Augments; namespace Internal.Runtime.TypeLoader { diff --git a/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/NativeLayoutInfoLoadContext.cs b/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/NativeLayoutInfoLoadContext.cs index f3c356f5ce628..04958f81927ab 100644 --- a/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/NativeLayoutInfoLoadContext.cs +++ b/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/NativeLayoutInfoLoadContext.cs @@ -3,15 +3,14 @@ using System; -using System.Reflection; using System.Collections.Generic; using System.Diagnostics; +using System.Reflection; +using Internal.NativeFormat; using Internal.Runtime; using Internal.Runtime.Augments; using Internal.Runtime.CompilerServices; - -using Internal.NativeFormat; using Internal.TypeSystem; using Internal.TypeSystem.NoMetadata; diff --git a/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/NativeLayoutInterfacesAlgorithm.cs b/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/NativeLayoutInterfacesAlgorithm.cs index 384297e70869b..9e7cf7f40fa42 100644 --- a/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/NativeLayoutInterfacesAlgorithm.cs +++ b/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/NativeLayoutInterfacesAlgorithm.cs @@ -1,11 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System; +using System.Diagnostics; + using Internal.NativeFormat; using Internal.Runtime.Augments; using Internal.TypeSystem; -using System; -using System.Diagnostics; namespace Internal.Runtime.TypeLoader { diff --git a/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/NoMetadataRuntimeInterfacesAlgorithm.cs b/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/NoMetadataRuntimeInterfacesAlgorithm.cs index dc7522c819b08..33967582fca9b 100644 --- a/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/NoMetadataRuntimeInterfacesAlgorithm.cs +++ b/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/NoMetadataRuntimeInterfacesAlgorithm.cs @@ -2,8 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using Internal.TypeSystem; + using Internal.Runtime.Augments; +using Internal.TypeSystem; namespace Internal.Runtime.TypeLoader { diff --git a/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/TypeBuilder.cs b/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/TypeBuilder.cs index 448d46b1f9767..743057714e96c 100644 --- a/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/TypeBuilder.cs +++ b/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/TypeBuilder.cs @@ -6,17 +6,16 @@ using System.Collections.Generic; using System.Diagnostics; +using Internal.NativeFormat; using Internal.Runtime.Augments; using Internal.Runtime.CompilerServices; - -using Internal.NativeFormat; using Internal.TypeSystem; namespace Internal.Runtime.TypeLoader { using DynamicGenericsRegistrationData = TypeLoaderEnvironment.DynamicGenericsRegistrationData; - using GenericTypeEntry = TypeLoaderEnvironment.GenericTypeEntry; using GenericMethodEntry = TypeLoaderEnvironment.GenericMethodEntry; + using GenericTypeEntry = TypeLoaderEnvironment.GenericTypeEntry; using MethodDescBasedGenericMethodLookup = TypeLoaderEnvironment.MethodDescBasedGenericMethodLookup; internal static class LowLevelListExtensions diff --git a/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/TypeLoaderEnvironment.ConstructedGenericMethodsLookup.cs b/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/TypeLoaderEnvironment.ConstructedGenericMethodsLookup.cs index 228da851da728..c5f5308226148 100644 --- a/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/TypeLoaderEnvironment.ConstructedGenericMethodsLookup.cs +++ b/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/TypeLoaderEnvironment.ConstructedGenericMethodsLookup.cs @@ -6,9 +6,8 @@ using System.Diagnostics; using System.Threading; -using Internal.Runtime.CompilerServices; - using Internal.NativeFormat; +using Internal.Runtime.CompilerServices; using Internal.TypeSystem; namespace Internal.Runtime.TypeLoader diff --git a/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/TypeLoaderEnvironment.ConstructedGenericTypesLookup.cs b/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/TypeLoaderEnvironment.ConstructedGenericTypesLookup.cs index 257803bd9026e..0c9adf60c8033 100644 --- a/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/TypeLoaderEnvironment.ConstructedGenericTypesLookup.cs +++ b/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/TypeLoaderEnvironment.ConstructedGenericTypesLookup.cs @@ -3,16 +3,15 @@ using System; -using System.Runtime; using System.Collections.Generic; using System.Diagnostics; +using System.Runtime; using System.Runtime.InteropServices; using System.Threading; +using Internal.NativeFormat; using Internal.Runtime; using Internal.Runtime.Augments; - -using Internal.NativeFormat; using Internal.TypeSystem; namespace Internal.Runtime.TypeLoader diff --git a/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/TypeLoaderEnvironment.FieldAccess.cs b/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/TypeLoaderEnvironment.FieldAccess.cs index 98c84ddc0ca51..f3d9ef3389204 100644 --- a/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/TypeLoaderEnvironment.FieldAccess.cs +++ b/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/TypeLoaderEnvironment.FieldAccess.cs @@ -4,13 +4,11 @@ using System; using System.Diagnostics; - using System.Reflection.Runtime.General; -using Internal.Runtime.Augments; - using Internal.Metadata.NativeFormat; using Internal.NativeFormat; +using Internal.Runtime.Augments; using Internal.TypeSystem; namespace Internal.Runtime.TypeLoader diff --git a/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/TypeLoaderEnvironment.GVMResolution.cs b/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/TypeLoaderEnvironment.GVMResolution.cs index 7091043eef221..93267b048ac90 100644 --- a/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/TypeLoaderEnvironment.GVMResolution.cs +++ b/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/TypeLoaderEnvironment.GVMResolution.cs @@ -3,17 +3,16 @@ using System; -using System.Runtime; using System.Collections.Generic; using System.Diagnostics; +using System.Runtime; using System.Runtime.InteropServices; using System.Threading; +using Internal.NativeFormat; using Internal.Runtime; using Internal.Runtime.Augments; using Internal.Runtime.CompilerServices; - -using Internal.NativeFormat; using Internal.TypeSystem; namespace Internal.Runtime.TypeLoader diff --git a/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/TypeLoaderEnvironment.LdTokenResultLookup.cs b/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/TypeLoaderEnvironment.LdTokenResultLookup.cs index ad8c68b171e5c..ccd82c8de5f66 100644 --- a/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/TypeLoaderEnvironment.LdTokenResultLookup.cs +++ b/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/TypeLoaderEnvironment.LdTokenResultLookup.cs @@ -3,18 +3,17 @@ using System; -using System.Text; +using System.Collections.Generic; using System.Reflection; +using System.Reflection.Runtime.General; using System.Runtime; -using System.Collections.Generic; using System.Runtime.InteropServices; +using System.Text; using System.Threading; -using System.Reflection.Runtime.General; +using Internal.NativeFormat; using Internal.Runtime.Augments; using Internal.Runtime.CompilerServices; - -using Internal.NativeFormat; using Internal.TypeSystem; using Debug = System.Diagnostics.Debug; diff --git a/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/TypeLoaderEnvironment.Metadata.cs b/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/TypeLoaderEnvironment.Metadata.cs index 57f7f02e4cb2a..b34c5d6f9be56 100644 --- a/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/TypeLoaderEnvironment.Metadata.cs +++ b/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/TypeLoaderEnvironment.Metadata.cs @@ -4,14 +4,12 @@ using System; using System.Diagnostics; - using System.Reflection.Runtime.General; -using Internal.Runtime.Augments; -using Internal.Runtime.CompilerServices; - using Internal.Metadata.NativeFormat; using Internal.NativeFormat; +using Internal.Runtime.Augments; +using Internal.Runtime.CompilerServices; using Internal.TypeSystem; namespace Internal.Runtime.TypeLoader diff --git a/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/TypeLoaderEnvironment.MetadataSignatureParsing.cs b/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/TypeLoaderEnvironment.MetadataSignatureParsing.cs index 1a1cd76cc4ddf..57db534cfb5b0 100644 --- a/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/TypeLoaderEnvironment.MetadataSignatureParsing.cs +++ b/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/TypeLoaderEnvironment.MetadataSignatureParsing.cs @@ -4,15 +4,14 @@ using System; using System.Diagnostics; using System.Reflection; +using System.Reflection.Runtime.General; using System.Runtime; -using Internal.Runtime.CompilerServices; using Internal.Metadata.NativeFormat; using Internal.NativeFormat; -using Internal.Runtime.TypeLoader; using Internal.Runtime.Augments; - -using System.Reflection.Runtime.General; +using Internal.Runtime.CompilerServices; +using Internal.Runtime.TypeLoader; using Debug = System.Diagnostics.Debug; diff --git a/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/TypeLoaderEnvironment.MethodAddress.cs b/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/TypeLoaderEnvironment.MethodAddress.cs index f0aa26e82c081..9b44ef1075a4d 100644 --- a/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/TypeLoaderEnvironment.MethodAddress.cs +++ b/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/TypeLoaderEnvironment.MethodAddress.cs @@ -3,19 +3,18 @@ using System; -using System.Runtime; using System.Collections.Generic; using System.Diagnostics; +using System.Reflection.Runtime.General; +using System.Runtime; using System.Runtime.InteropServices; using System.Threading; -using System.Reflection.Runtime.General; +using Internal.Metadata.NativeFormat; +using Internal.NativeFormat; using Internal.Runtime; using Internal.Runtime.Augments; using Internal.Runtime.CompilerServices; - -using Internal.Metadata.NativeFormat; -using Internal.NativeFormat; using Internal.TypeSystem; namespace Internal.Runtime.TypeLoader diff --git a/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/TypeLoaderEnvironment.SignatureParsing.cs b/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/TypeLoaderEnvironment.SignatureParsing.cs index 52e014d81c646..8485d8daa2aad 100644 --- a/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/TypeLoaderEnvironment.SignatureParsing.cs +++ b/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/TypeLoaderEnvironment.SignatureParsing.cs @@ -5,16 +5,15 @@ using System; using System.Diagnostics; using System.Reflection; -using System.Runtime; using System.Reflection.Runtime.General; +using System.Runtime; +using Internal.Metadata.NativeFormat; +using Internal.NativeFormat; using Internal.Runtime; -using Internal.Runtime.TypeLoader; using Internal.Runtime.Augments; using Internal.Runtime.CompilerServices; - -using Internal.Metadata.NativeFormat; -using Internal.NativeFormat; +using Internal.Runtime.TypeLoader; using Internal.TypeSystem; using Debug = System.Diagnostics.Debug; diff --git a/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/TypeLoaderEnvironment.StaticsLookup.cs b/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/TypeLoaderEnvironment.StaticsLookup.cs index 28cd9bf327638..87dd954915bea 100644 --- a/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/TypeLoaderEnvironment.StaticsLookup.cs +++ b/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/TypeLoaderEnvironment.StaticsLookup.cs @@ -7,9 +7,8 @@ using System.Diagnostics; using System.Threading; -using Internal.Runtime.Augments; - using Internal.NativeFormat; +using Internal.Runtime.Augments; namespace Internal.Runtime.TypeLoader { diff --git a/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/TypeLoaderEnvironment.cs b/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/TypeLoaderEnvironment.cs index 37b6dc2b4d916..46ebec4d4d650 100644 --- a/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/TypeLoaderEnvironment.cs +++ b/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/TypeLoaderEnvironment.cs @@ -3,17 +3,16 @@ using System; -using System.Threading; using System.Collections.Generic; +using System.Reflection.Runtime.General; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -using System.Reflection.Runtime.General; - -using Internal.Runtime.Augments; -using Internal.Runtime.CompilerServices; +using System.Threading; using Internal.Metadata.NativeFormat; using Internal.NativeFormat; +using Internal.Runtime.Augments; +using Internal.Runtime.CompilerServices; using Internal.TypeSystem; using Debug = System.Diagnostics.Debug; diff --git a/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/TypeLoaderLogger.cs b/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/TypeLoaderLogger.cs index 7ae917146bdd6..aa7684ea38132 100644 --- a/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/TypeLoaderLogger.cs +++ b/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/TypeLoaderLogger.cs @@ -3,9 +3,9 @@ using System; -using System.Reflection; using System.Collections.Generic; using System.Diagnostics; +using System.Reflection; namespace Internal.Runtime.TypeLoader { diff --git a/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/TypeSystemContextFactory.cs b/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/TypeSystemContextFactory.cs index b0175eaaa4803..7f3037fc9a0cb 100644 --- a/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/TypeSystemContextFactory.cs +++ b/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/TypeSystemContextFactory.cs @@ -4,9 +4,9 @@ using System; using System.Collections.Generic; +using System.Runtime.InteropServices; using System.Text; using System.Threading; -using System.Runtime.InteropServices; using Internal.TypeSystem; diff --git a/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/TypeSystem/ArrayMethod.Runtime.cs b/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/TypeSystem/ArrayMethod.Runtime.cs index e29806ef48b98..267bb96d5940e 100644 --- a/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/TypeSystem/ArrayMethod.Runtime.cs +++ b/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/TypeSystem/ArrayMethod.Runtime.cs @@ -3,6 +3,7 @@ using System; + using Internal.Runtime.CompilerServices; namespace Internal.TypeSystem diff --git a/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/TypeSystem/DefType.Runtime.cs b/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/TypeSystem/DefType.Runtime.cs index ebcccb4726910..7fef72e99ddab 100644 --- a/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/TypeSystem/DefType.Runtime.cs +++ b/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/TypeSystem/DefType.Runtime.cs @@ -1,12 +1,13 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Internal.NativeFormat; -using Internal.Runtime.TypeLoader; using System; using System.Collections.Generic; using System.Diagnostics; +using Internal.NativeFormat; +using Internal.Runtime.TypeLoader; + namespace Internal.TypeSystem { // Includes functionality for runtime type loading diff --git a/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/TypeSystem/InstantiatedMethod.Runtime.cs b/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/TypeSystem/InstantiatedMethod.Runtime.cs index f87b5d5607586..b81346d66aba1 100644 --- a/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/TypeSystem/InstantiatedMethod.Runtime.cs +++ b/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/TypeSystem/InstantiatedMethod.Runtime.cs @@ -3,9 +3,11 @@ using System; + using Internal.NativeFormat; using Internal.Runtime.CompilerServices; using Internal.Runtime.TypeLoader; + using Debug = System.Diagnostics.Debug; namespace Internal.TypeSystem diff --git a/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/TypeSystem/MethodDesc.Runtime.cs b/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/TypeSystem/MethodDesc.Runtime.cs index 270499eb05982..89161ce5309d7 100644 --- a/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/TypeSystem/MethodDesc.Runtime.cs +++ b/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/TypeSystem/MethodDesc.Runtime.cs @@ -3,6 +3,7 @@ using System; + using Internal.Runtime.CompilerServices; namespace Internal.TypeSystem diff --git a/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/TypeSystem/MethodForInstantiatedType.Runtime.cs b/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/TypeSystem/MethodForInstantiatedType.Runtime.cs index b6fcc2796a67e..2d3e9c99281cf 100644 --- a/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/TypeSystem/MethodForInstantiatedType.Runtime.cs +++ b/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/TypeSystem/MethodForInstantiatedType.Runtime.cs @@ -3,6 +3,7 @@ using System; + using Internal.Runtime.CompilerServices; namespace Internal.TypeSystem diff --git a/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/TypeSystem/NoMetadataMethodDesc.cs b/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/TypeSystem/NoMetadataMethodDesc.cs index cbc1b2811b0eb..4a09f0f91e999 100644 --- a/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/TypeSystem/NoMetadataMethodDesc.cs +++ b/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/TypeSystem/NoMetadataMethodDesc.cs @@ -3,6 +3,7 @@ using System; + using Internal.Runtime.CompilerServices; namespace Internal.TypeSystem.NoMetadata diff --git a/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/TypeSystem/RuntimeMethodDesc.cs b/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/TypeSystem/RuntimeMethodDesc.cs index d2dcf815171a3..c50958910212c 100644 --- a/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/TypeSystem/RuntimeMethodDesc.cs +++ b/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/TypeSystem/RuntimeMethodDesc.cs @@ -3,6 +3,7 @@ using System; + using Internal.Runtime.CompilerServices; using Internal.Runtime.TypeLoader; diff --git a/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/TypeSystem/RuntimeNoMetadataType.cs b/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/TypeSystem/RuntimeNoMetadataType.cs index e2444cade8f82..f97a6d3e2988a 100644 --- a/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/TypeSystem/RuntimeNoMetadataType.cs +++ b/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/TypeSystem/RuntimeNoMetadataType.cs @@ -3,14 +3,15 @@ using System; -using System.Text; using System.Reflection.Runtime.General; +using System.Text; + +using Internal.Metadata.NativeFormat; using Internal.NativeFormat; -using Internal.TypeSystem; using Internal.Runtime; using Internal.Runtime.Augments; using Internal.Runtime.TypeLoader; -using Internal.Metadata.NativeFormat; +using Internal.TypeSystem; using Debug = System.Diagnostics.Debug; diff --git a/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/TypeSystem/TypeDesc.Runtime.cs b/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/TypeSystem/TypeDesc.Runtime.cs index 2a43df3eb8502..96c8c5ea2ac20 100644 --- a/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/TypeSystem/TypeDesc.Runtime.cs +++ b/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/TypeSystem/TypeDesc.Runtime.cs @@ -3,14 +3,16 @@ using System; -using Internal.TypeSystem; +using System.Collections.Generic; +using System.Reflection.Runtime.General; + +using Internal.NativeFormat; using Internal.Runtime.Augments; using Internal.Runtime.TypeLoader; -using Debug = System.Diagnostics.Debug; -using Internal.NativeFormat; -using System.Collections.Generic; +using Internal.TypeSystem; using Internal.TypeSystem.NoMetadata; -using System.Reflection.Runtime.General; + +using Debug = System.Diagnostics.Debug; namespace Internal.TypeSystem { diff --git a/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/TypeSystem/TypeSystemContext.Runtime.cs b/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/TypeSystem/TypeSystemContext.Runtime.cs index 7abe07757f0d3..3d77a1734532b 100644 --- a/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/TypeSystem/TypeSystemContext.Runtime.cs +++ b/src/coreclr/nativeaot/System.Private.TypeLoader/src/Internal/TypeSystem/TypeSystemContext.Runtime.cs @@ -6,17 +6,16 @@ using System.Collections.Generic; using System.Diagnostics; using System.Reflection; -using System.Runtime.CompilerServices; - using System.Reflection.Runtime.General; +using System.Runtime.CompilerServices; +using Internal.Metadata.NativeFormat; +using Internal.NativeFormat; using Internal.Runtime; using Internal.Runtime.Augments; using Internal.Runtime.CompilerServices; using Internal.Runtime.TypeLoader; using Internal.TypeSystem.NoMetadata; -using Internal.Metadata.NativeFormat; -using Internal.NativeFormat; namespace Internal.TypeSystem { diff --git a/src/coreclr/nativeaot/docs/rd-xml-format.md b/src/coreclr/nativeaot/docs/rd-xml-format.md index a0ccf441c2d5b..a673f294c68d2 100644 --- a/src/coreclr/nativeaot/docs/rd-xml-format.md +++ b/src/coreclr/nativeaot/docs/rd-xml-format.md @@ -1,6 +1,9 @@ Rd.xml File Format ================== +> [!WARNING] +> This file format is only for internal purposes within this repo and _unsupported_. Do not confuse with the file format used for building .NET UWP apps. The formats are named the same for historical reasons but they are different formats and the one documented here is entirely unsupported outside the dotnet/runtime repo. These docs are only for people working in this repo. + The NativeAOT compiler discovers methods to compile and types to generate by compiling the application entry point and its transitive dependencies. The compiler may miss types if an application uses reflection. For more information about the problem see [Reflection in AOT mode](reflection-in-aot-mode.md). An rd.xml file can be supplemented to help the compiler find types that should be analyzed. This file is similar but more limited than the rd.xml file used by .NET Native. diff --git a/src/coreclr/pal/src/file/path.cpp b/src/coreclr/pal/src/file/path.cpp index 92383dd204ace..62418b240d3fe 100644 --- a/src/coreclr/pal/src/file/path.cpp +++ b/src/coreclr/pal/src/file/path.cpp @@ -399,8 +399,8 @@ GetTempPathW( return 0; } - char TempBuffer[nBufferLength > 0 ? nBufferLength : 1]; - DWORD dwRetVal = GetTempPathA( nBufferLength, TempBuffer ); + char* tempBuffer = (char*)alloca(nBufferLength > 0 ? nBufferLength : 1); + DWORD dwRetVal = GetTempPathA( nBufferLength, tempBuffer ); if ( dwRetVal >= nBufferLength ) { @@ -411,7 +411,7 @@ GetTempPathW( else if ( dwRetVal != 0 ) { /* Convert to wide. */ - if ( 0 == MultiByteToWideChar( CP_ACP, 0, TempBuffer, -1, + if ( 0 == MultiByteToWideChar( CP_ACP, 0, tempBuffer, -1, lpBuffer, dwRetVal + 1 ) ) { ASSERT( "An error occurred while converting the string to wide.\n" ); diff --git a/src/coreclr/pal/src/include/pal/palinternal.h b/src/coreclr/pal/src/include/pal/palinternal.h index 644918728edf1..63e6d305d9f6e 100644 --- a/src/coreclr/pal/src/include/pal/palinternal.h +++ b/src/coreclr/pal/src/include/pal/palinternal.h @@ -426,6 +426,7 @@ function_name() to call the system's implementation #undef va_start #undef va_end #undef va_copy +#undef va_arg #undef stdin #undef stdout #undef stderr diff --git a/src/coreclr/tools/Common/CommandLineHelpers.cs b/src/coreclr/tools/Common/CommandLineHelpers.cs index 3fb977a3047a6..9593e348a6c90 100644 --- a/src/coreclr/tools/Common/CommandLineHelpers.cs +++ b/src/coreclr/tools/Common/CommandLineHelpers.cs @@ -127,7 +127,7 @@ public static CliRootCommand UseVersion(this CliRootCommand command) return command; } - public static CliRootCommand UseExtendedHelp(this CliRootCommand command, Func>> customizer) + public static CliRootCommand UseExtendedHelp(this CliRootCommand command, Func>> customizer) { foreach (CliOption option in command.Options) { diff --git a/src/coreclr/tools/Common/Internal/LowLevelLinq/LowLevelEnumerable.ToArray.cs b/src/coreclr/tools/Common/Internal/LowLevelLinq/LowLevelEnumerable.ToArray.cs index 68d4ce19fc011..6d28c01316adc 100644 --- a/src/coreclr/tools/Common/Internal/LowLevelLinq/LowLevelEnumerable.ToArray.cs +++ b/src/coreclr/tools/Common/Internal/LowLevelLinq/LowLevelEnumerable.ToArray.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Diagnostics; using System.Collections.Generic; +using System.Diagnostics; namespace Internal.LowLevelLinq { diff --git a/src/coreclr/tools/Common/Internal/LowLevelLinq/LowLevelEnumerable.cs b/src/coreclr/tools/Common/Internal/LowLevelLinq/LowLevelEnumerable.cs index d3d2fdeb17e73..a7a1b7544700e 100644 --- a/src/coreclr/tools/Common/Internal/LowLevelLinq/LowLevelEnumerable.cs +++ b/src/coreclr/tools/Common/Internal/LowLevelLinq/LowLevelEnumerable.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Diagnostics; using System.Collections.Generic; +using System.Diagnostics; namespace Internal.LowLevelLinq { diff --git a/src/coreclr/tools/Common/Internal/Metadata/NativeFormat/MdBinaryReaderGen.cs b/src/coreclr/tools/Common/Internal/Metadata/NativeFormat/MdBinaryReaderGen.cs index 538f4f11e2bfc..bbac55d708304 100644 --- a/src/coreclr/tools/Common/Internal/Metadata/NativeFormat/MdBinaryReaderGen.cs +++ b/src/coreclr/tools/Common/Internal/Metadata/NativeFormat/MdBinaryReaderGen.cs @@ -6,8 +6,8 @@ #pragma warning disable 649, SA1121, IDE0036, SA1129 using System; -using System.IO; using System.Collections.Generic; +using System.IO; using System.Reflection; using Internal.NativeFormat; using Debug = System.Diagnostics.Debug; diff --git a/src/coreclr/tools/Common/Internal/Metadata/NativeFormat/MetadataTypeHashingAlgorithms.cs b/src/coreclr/tools/Common/Internal/Metadata/NativeFormat/MetadataTypeHashingAlgorithms.cs index af2cd760f7236..9c114859e2498 100644 --- a/src/coreclr/tools/Common/Internal/Metadata/NativeFormat/MetadataTypeHashingAlgorithms.cs +++ b/src/coreclr/tools/Common/Internal/Metadata/NativeFormat/MetadataTypeHashingAlgorithms.cs @@ -2,10 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; - -using TypeAttributes = System.Reflection.TypeAttributes; using Debug = System.Diagnostics.Debug; using HashCodeBuilder = Internal.NativeFormat.TypeHashingAlgorithms.HashCodeBuilder; +using TypeAttributes = System.Reflection.TypeAttributes; using TypeHashingAlgorithms = Internal.NativeFormat.TypeHashingAlgorithms; namespace Internal.Metadata.NativeFormat diff --git a/src/coreclr/tools/Common/Internal/Metadata/NativeFormat/NativeFormatReaderCommonGen.cs b/src/coreclr/tools/Common/Internal/Metadata/NativeFormat/NativeFormatReaderCommonGen.cs index a9c8b12eaa1af..bb7fefd7816ce 100644 --- a/src/coreclr/tools/Common/Internal/Metadata/NativeFormat/NativeFormatReaderCommonGen.cs +++ b/src/coreclr/tools/Common/Internal/Metadata/NativeFormat/NativeFormatReaderCommonGen.cs @@ -4,8 +4,8 @@ // NOTE: This is a generated file - do not manually edit! using System; -using System.Reflection; using System.Collections.Generic; +using System.Reflection; using System.Runtime.CompilerServices; #pragma warning disable 108 // base type 'uint' is not CLS-compliant diff --git a/src/coreclr/tools/Common/Internal/Metadata/NativeFormat/NativeFormatReaderGen.cs b/src/coreclr/tools/Common/Internal/Metadata/NativeFormat/NativeFormatReaderGen.cs index 6620dc373d184..c2c3c0df2ff0a 100644 --- a/src/coreclr/tools/Common/Internal/Metadata/NativeFormat/NativeFormatReaderGen.cs +++ b/src/coreclr/tools/Common/Internal/Metadata/NativeFormat/NativeFormatReaderGen.cs @@ -13,9 +13,9 @@ #pragma warning disable IDE0036, SA1129 using System; +using System.Collections.Generic; using System.Diagnostics; using System.Reflection; -using System.Collections.Generic; using System.Runtime.CompilerServices; using Internal.NativeFormat; diff --git a/src/coreclr/tools/Common/Internal/NativeFormat/NativeFormatWriter.Primitives.cs b/src/coreclr/tools/Common/Internal/NativeFormat/NativeFormatWriter.Primitives.cs index 82d298a604935..d5c006c2d8ee4 100644 --- a/src/coreclr/tools/Common/Internal/NativeFormat/NativeFormatWriter.Primitives.cs +++ b/src/coreclr/tools/Common/Internal/NativeFormat/NativeFormatWriter.Primitives.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.IO; using System.Diagnostics; +using System.IO; namespace Internal.NativeFormat { diff --git a/src/coreclr/tools/Common/TypeSystem/Canon/TypeSystemContext.Canon.cs b/src/coreclr/tools/Common/TypeSystem/Canon/TypeSystemContext.Canon.cs index d9c495c45a591..7292e6c06a189 100644 --- a/src/coreclr/tools/Common/TypeSystem/Canon/TypeSystemContext.Canon.cs +++ b/src/coreclr/tools/Common/TypeSystem/Canon/TypeSystemContext.Canon.cs @@ -2,9 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; - -using Interlocked = System.Threading.Interlocked; using Debug = System.Diagnostics.Debug; +using Interlocked = System.Threading.Interlocked; namespace Internal.TypeSystem { diff --git a/src/coreclr/tools/Common/TypeSystem/Common/TypeDesc.cs b/src/coreclr/tools/Common/TypeSystem/Common/TypeDesc.cs index 58aa349eb8e53..00dd1f70d4aaf 100644 --- a/src/coreclr/tools/Common/TypeSystem/Common/TypeDesc.cs +++ b/src/coreclr/tools/Common/TypeSystem/Common/TypeDesc.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Diagnostics; using System.Collections.Generic; +using System.Diagnostics; using System.Runtime.CompilerServices; namespace Internal.TypeSystem diff --git a/src/coreclr/tools/ILVerify/Program.cs b/src/coreclr/tools/ILVerify/Program.cs index f511ff032f5db..908de5b701f35 100644 --- a/src/coreclr/tools/ILVerify/Program.cs +++ b/src/coreclr/tools/ILVerify/Program.cs @@ -481,8 +481,7 @@ public PEReader Resolve(string simpleName) private static int Main(string[] args) => new CliConfiguration(new ILVerifyRootCommand().UseVersion()) { - ResponseFileTokenReplacer = Helpers.TryReadResponseFile, - EnableParseErrorReporting = true + ResponseFileTokenReplacer = Helpers.TryReadResponseFile }.Invoke(args); } } diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ObjectWriter.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ObjectWriter.cs index bef41e3d7ba35..d85252cca6168 100644 --- a/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ObjectWriter.cs +++ b/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/ObjectWriter.cs @@ -439,15 +439,11 @@ public void EmitDebugEHClauseInfo(ObjectNode node) private static extern void EmitDebugFunctionInfo(IntPtr objWriter, byte[] methodName, int methodSize, uint methodTypeIndex); public void EmitDebugFunctionInfo(ObjectNode node, int methodSize) { - uint methodTypeIndex = 0; - - var methodNode = node as IMethodNode; - if (methodNode != null) + if (node is IMethodNode methodNode) { - methodTypeIndex = _userDefinedTypeDescriptor.GetMethodFunctionIdTypeIndex(methodNode.Method); + uint methodTypeIndex = _userDefinedTypeDescriptor.GetMethodFunctionIdTypeIndex(methodNode.Method); + EmitDebugFunctionInfo(_nativeObjectWriter, _currentNodeZeroTerminatedName.UnderlyingArray, methodSize, methodTypeIndex); } - - EmitDebugFunctionInfo(_nativeObjectWriter, _currentNodeZeroTerminatedName.UnderlyingArray, methodSize, methodTypeIndex); } [DllImport(NativeObjectWriterFileName)] diff --git a/src/coreclr/tools/aot/ILCompiler/ILCompilerRootCommand.cs b/src/coreclr/tools/aot/ILCompiler/ILCompilerRootCommand.cs index 1470888a664e7..4524f7a854bc5 100644 --- a/src/coreclr/tools/aot/ILCompiler/ILCompilerRootCommand.cs +++ b/src/coreclr/tools/aot/ILCompiler/ILCompilerRootCommand.cs @@ -298,9 +298,9 @@ public ILCompilerRootCommand(string[] args) : base(".NET Native IL Compiler") }); } - public static IEnumerable> GetExtendedHelp(HelpContext _) + public static IEnumerable> GetExtendedHelp(HelpContext _) { - foreach (Action sectionDelegate in HelpBuilder.Default.GetLayout()) + foreach (Func sectionDelegate in HelpBuilder.Default.GetLayout()) yield return sectionDelegate; yield return _ => @@ -354,6 +354,7 @@ public static IEnumerable> GetExtendedHelp(HelpContext _) Console.WriteLine(); Console.WriteLine("The following CPU names are predefined groups of instruction sets and can be used in --instruction-set too:"); Console.WriteLine(string.Join(", ", Internal.JitInterface.InstructionSetFlags.AllCpuNames)); + return true; }; } diff --git a/src/coreclr/tools/aot/ILCompiler/Program.cs b/src/coreclr/tools/aot/ILCompiler/Program.cs index e51cce64f146d..66df76365d8d2 100644 --- a/src/coreclr/tools/aot/ILCompiler/Program.cs +++ b/src/coreclr/tools/aot/ILCompiler/Program.cs @@ -738,8 +738,7 @@ private static int Main(string[] args) => .UseVersion() .UseExtendedHelp(ILCompilerRootCommand.GetExtendedHelp)) { - ResponseFileTokenReplacer = Helpers.TryReadResponseFile, - EnableParseErrorReporting = true + ResponseFileTokenReplacer = Helpers.TryReadResponseFile }.Invoke(args); } } diff --git a/src/coreclr/tools/aot/crossgen2/Crossgen2RootCommand.cs b/src/coreclr/tools/aot/crossgen2/Crossgen2RootCommand.cs index 4e97b676b4cf8..4913c0baa249a 100644 --- a/src/coreclr/tools/aot/crossgen2/Crossgen2RootCommand.cs +++ b/src/coreclr/tools/aot/crossgen2/Crossgen2RootCommand.cs @@ -282,9 +282,9 @@ public Crossgen2RootCommand(string[] args) : base(SR.Crossgen2BannerText) }); } - public static IEnumerable> GetExtendedHelp(HelpContext _) + public static IEnumerable> GetExtendedHelp(HelpContext _) { - foreach (Action sectionDelegate in HelpBuilder.Default.GetLayout()) + foreach (Func sectionDelegate in HelpBuilder.Default.GetLayout()) yield return sectionDelegate; yield return _ => @@ -343,6 +343,7 @@ public static IEnumerable> GetExtendedHelp(HelpContext _) Console.WriteLine(); Console.WriteLine(SR.CpuFamilies); Console.WriteLine(string.Join(", ", Internal.JitInterface.InstructionSetFlags.AllCpuNames)); + return true; }; } diff --git a/src/coreclr/tools/aot/crossgen2/Program.cs b/src/coreclr/tools/aot/crossgen2/Program.cs index 74b8e4feb771c..37a5efaa7649c 100644 --- a/src/coreclr/tools/aot/crossgen2/Program.cs +++ b/src/coreclr/tools/aot/crossgen2/Program.cs @@ -915,8 +915,7 @@ private static int Main(string[] args) => .UseVersion() .UseExtendedHelp(Crossgen2RootCommand.GetExtendedHelp)) { - ResponseFileTokenReplacer = Helpers.TryReadResponseFile, - EnableParseErrorReporting = true + ResponseFileTokenReplacer = Helpers.TryReadResponseFile }.Invoke(args); } } diff --git a/src/coreclr/tools/dotnet-pgo/PgoRootCommand.cs b/src/coreclr/tools/dotnet-pgo/PgoRootCommand.cs index b9f3fab54043c..bf674406e1231 100644 --- a/src/coreclr/tools/dotnet-pgo/PgoRootCommand.cs +++ b/src/coreclr/tools/dotnet-pgo/PgoRootCommand.cs @@ -260,9 +260,9 @@ int ExecuteWithContext(ParseResult result, bool setVerbosity) } } - public static IEnumerable> GetExtendedHelp(HelpContext context) + public static IEnumerable> GetExtendedHelp(HelpContext context) { - foreach (Action sectionDelegate in HelpBuilder.Default.GetLayout()) + foreach (Func sectionDelegate in HelpBuilder.Default.GetLayout()) yield return sectionDelegate; if (context.Command.Name == "create-mibc" || context.Command.Name == "create-jittrace") @@ -280,6 +280,7 @@ public static IEnumerable> GetExtendedHelp(HelpContext conte ""perfview collect -LogFile:logOfCollection.txt -DataFile:jittrace.etl -Zip:false -merge:false -providers:Microsoft-Windows-DotNETRuntime:0x1E000080018:4"" - Capture Jit and R2R events via perfview of all processes running using ETW tracing "); + return true; }; } } diff --git a/src/coreclr/tools/dotnet-pgo/Program.cs b/src/coreclr/tools/dotnet-pgo/Program.cs index 400d03ccf321f..a432a0c18fc49 100644 --- a/src/coreclr/tools/dotnet-pgo/Program.cs +++ b/src/coreclr/tools/dotnet-pgo/Program.cs @@ -165,8 +165,7 @@ private static int Main(string[] args) => .UseVersion() .UseExtendedHelp(PgoRootCommand.GetExtendedHelp)) { - ResponseFileTokenReplacer = Helpers.TryReadResponseFile, - EnableParseErrorReporting = true + ResponseFileTokenReplacer = Helpers.TryReadResponseFile }.Invoke(args); public static void PrintWarning(string warning) diff --git a/src/coreclr/tools/r2rdump/Program.cs b/src/coreclr/tools/r2rdump/Program.cs index 2b299ea653a1c..54f430745343e 100644 --- a/src/coreclr/tools/r2rdump/Program.cs +++ b/src/coreclr/tools/r2rdump/Program.cs @@ -500,8 +500,7 @@ public int Run() public static int Main(string[] args) => new CliConfiguration(new R2RDumpRootCommand().UseVersion()) { - ResponseFileTokenReplacer = Helpers.TryReadResponseFile, - EnableParseErrorReporting = true + ResponseFileTokenReplacer = Helpers.TryReadResponseFile }.Invoke(args); } } diff --git a/src/coreclr/tools/r2rtest/CommandLineOptions.cs b/src/coreclr/tools/r2rtest/CommandLineOptions.cs index f807fd7d7eb4e..4f20677c48897 100644 --- a/src/coreclr/tools/r2rtest/CommandLineOptions.cs +++ b/src/coreclr/tools/r2rtest/CommandLineOptions.cs @@ -299,10 +299,7 @@ void CreateCommand(string name, string description, CliOption[] options, Func("--asp-net-path", "-asp") { Description = "Path to SERP's ASP.NET Core folder" }.AcceptExistingOnly(); private static int Main(string[] args) => - new CliConfiguration(new R2RTestRootCommand().UseVersion()) - { - EnableParseErrorReporting = true - }.Invoke(args); + new CliConfiguration(new R2RTestRootCommand().UseVersion()).Invoke(args); } public partial class BuildOptions diff --git a/src/coreclr/vm/CMakeLists.txt b/src/coreclr/vm/CMakeLists.txt index ce94e6323da85..eb00b7c6a6757 100644 --- a/src/coreclr/vm/CMakeLists.txt +++ b/src/coreclr/vm/CMakeLists.txt @@ -882,6 +882,7 @@ elseif(CLR_CMAKE_TARGET_ARCH_RISCV64) set(VM_SOURCES_WKS_ARCH ${ARCH_SOURCES_DIR}/profiler.cpp + ${ARCH_SOURCES_DIR}/singlestepper.cpp gcinfodecoder.cpp ) endif() diff --git a/src/coreclr/vm/comsynchronizable.h b/src/coreclr/vm/comsynchronizable.h index a174e2cedf13d..bb50914918464 100644 --- a/src/coreclr/vm/comsynchronizable.h +++ b/src/coreclr/vm/comsynchronizable.h @@ -70,7 +70,6 @@ friend class ThreadBaseObject; static FCDECL0(INT32, GetOptimalMaxSpinWaitsPerSpinIteration); - static FCDECL1(void, SpinWait, int iterations); static FCDECL0(Object*, GetCurrentThread); static FCDECL1(void, Finalize, ThreadBaseObject* pThis); #ifdef FEATURE_COMINTEROP diff --git a/src/coreclr/vm/ecalllist.h b/src/coreclr/vm/ecalllist.h index 2f1f27bdf3eee..c1f031085054b 100644 --- a/src/coreclr/vm/ecalllist.h +++ b/src/coreclr/vm/ecalllist.h @@ -422,7 +422,6 @@ FCFuncStart(gArrayFuncs) FCFuncElement("GetCorElementTypeOfElementType", ArrayNative::GetCorElementTypeOfElementType) FCFuncElement("IsSimpleCopy", ArrayNative::IsSimpleCopy) FCFuncElement("CopySlow", ArrayNative::CopySlow) - FCFuncElement("InternalCreate", ArrayNative::CreateInstance) FCFuncElement("InternalSetValue", ArrayNative::SetValue) FCFuncEnd() diff --git a/src/coreclr/vm/qcallentrypoints.cpp b/src/coreclr/vm/qcallentrypoints.cpp index 3682a4cef1691..b660637d6a4ac 100644 --- a/src/coreclr/vm/qcallentrypoints.cpp +++ b/src/coreclr/vm/qcallentrypoints.cpp @@ -151,6 +151,7 @@ static const Entry s_QCall[] = DllImportEntry(TypeBuilder_SetConstantValue) DllImportEntry(TypeBuilder_DefineCustomAttribute) DllImportEntry(MdUtf8String_EqualsCaseInsensitive) + DllImportEntry(Array_CreateInstance) DllImportEntry(Array_GetElementConstructorEntrypoint) DllImportEntry(AssemblyName_InitializeAssemblySpec) DllImportEntry(AssemblyNative_GetFullName) diff --git a/src/coreclr/vm/riscv64/singlestepper.cpp b/src/coreclr/vm/riscv64/singlestepper.cpp new file mode 100644 index 0000000000000..5f0539d363f8d --- /dev/null +++ b/src/coreclr/vm/riscv64/singlestepper.cpp @@ -0,0 +1,467 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// + +// +// Emulate hardware single-step on RISCV64. +// + +#include "common.h" +#include "riscv64singlestepper.h" + +// +// RiscV64SingleStepper methods. +// +RiscV64SingleStepper::RiscV64SingleStepper() + : m_originalPc(0), m_targetPc(0), m_rgCode(0), m_state(Disabled), + m_fEmulate(false), m_fBypass(false) +{ + m_opcodes[0] = 0; +} + +RiscV64SingleStepper::~RiscV64SingleStepper() +{ +#if !defined(DACCESS_COMPILE) + SystemDomain::GetGlobalLoaderAllocator()->GetExecutableHeap()->BackoutMem(m_rgCode, kMaxCodeBuffer * sizeof(uint32_t)); +#endif +} + +void RiscV64SingleStepper::Init() +{ +#if !defined(DACCESS_COMPILE) + if (m_rgCode == NULL) + { + m_rgCode = (uint32_t *)(void *)SystemDomain::GetGlobalLoaderAllocator()->GetExecutableHeap()->AllocMem(S_SIZE_T(kMaxCodeBuffer * sizeof(uint32_t))); + } +#endif +} + +// Given the context with which a thread will be resumed, modify that context such that resuming the thread +// will execute a single instruction before raising an EXCEPTION_BREAKPOINT. The thread context must be +// cleaned up via the Fixup method below before any further exception processing can occur (at which point the +// caller can behave as though EXCEPTION_SINGLE_STEP was raised). +void RiscV64SingleStepper::Enable() +{ + _ASSERTE(m_state != Applied); + + if (m_state == Enabled) + { + // We allow single-stepping to be enabled multiple times before the thread is resumed, but we require + // that the thread state is the same in all cases (i.e. additional step requests are treated as + // no-ops). + _ASSERTE(!m_fBypass); + _ASSERTE(m_opcodes[0] == 0); + + return; + } + + LOG((LF_CORDB, LL_INFO100000, "RiscV64SingleStepper::Enable\n")); + + m_fBypass = false; + m_opcodes[0] = 0; + m_state = Enabled; +} + +void RiscV64SingleStepper::Bypass(uint64_t ip, uint32_t opcode) +{ + _ASSERTE(m_state != Applied); + + if (m_state == Enabled) + { + // We allow single-stepping to be enabled multiple times before the thread is resumed, but we require + // that the thread state is the same in all cases (i.e. additional step requests are treated as + // no-ops). + if (m_fBypass) + { + _ASSERTE(m_opcodes[0] == opcode); + _ASSERTE(m_originalPc == ip); + return; + } + } + + LOG((LF_CORDB, LL_INFO100000, "RiscV64SingleStepper::Bypass(pc=%lx, opcode=%x)\n", ip, opcode)); + + m_fBypass = true; + m_originalPc = ip; + m_opcodes[0] = opcode; + m_state = Enabled; +} + +void RiscV64SingleStepper::Apply(T_CONTEXT *pCtx) +{ + if (m_rgCode == NULL) + { + Init(); + + // OOM. We will simply ignore the single step. + if (m_rgCode == NULL) + return; + } + + _ASSERTE(pCtx != NULL); + + if (!m_fBypass) + { + uint64_t pc = pCtx->Pc; + m_opcodes[0] = *(uint32_t*)pc; // Opcodes are always in little endian, we only support little endian execution mode + } + + uint32_t opcode = m_opcodes[0]; + + LOG((LF_CORDB, LL_INFO100000, "RiscV64SingleStepper::Apply(pc=%lx, opcode=%x)\n", (uint64_t)pCtx->Pc, opcode)); + +#ifdef _DEBUG + // Make sure that we aren't trying to step through our own buffer. If this asserts, something is horribly + // wrong with the debugging layer. Likely GetManagedStoppedCtx is retrieving a Pc that points to our + // buffer, even though the single stepper is disabled. + uint64_t codestart = (uint64_t)m_rgCode; + uint64_t codeend = codestart + (kMaxCodeBuffer * sizeof(uint32_t)); + _ASSERTE((pCtx->Pc < codestart) || (pCtx->Pc >= codeend)); +#endif + + // All stepping is simulated using a breakpoint instruction. Since other threads are not suspended while + // we step, we avoid race conditions and other complexity by redirecting the thread into a thread-local + // execution buffer. We can either copy the instruction we wish to step over into the buffer followed by a + // breakpoint or we can emulate the instruction (which is useful for instruction that depend on the value + // of the PC or that branch or call to an alternate location). Even in the emulation case we still + // redirect execution into the buffer and insert a breakpoint; this simplifies our interface since the + // rest of the runtime is not set up to expect single stepping to occur inline. Instead there is always a + // 1:1 relationship between setting the single-step mode and receiving an exception once the thread is + // restarted. + // + // There are two parts to the emulation: + // 1) In this method we either emulate the instruction (updating the input thread context as a result) or + // copy the single instruction into the execution buffer. In both cases we copy a breakpoint into the + // execution buffer as well then update the thread context to redirect execution into this buffer. + // 2) In the runtime's first chance vectored exception handler we perform the necessary fixups to make + // the exception look like the result of a single step. This includes resetting the PC to its correct + // value (either the instruction following the stepped instruction or the target PC cached in this + // object when we emulated an instruction that alters the PC). It also involves switching + // EXCEPTION_BREAKPOINT to EXCEPTION_SINGLE_STEP. + // + // If we encounter an exception while emulating an instruction (currently this can only happen if we A/V + // trying to read a value from memory) then we abandon emulation and fall back to the copy instruction + // mechanism. When we run the execution buffer the exception should be raised and handled as normal (we + // still perform context fixup in this case but we don't attempt to alter any exception code other than + // EXCEPTION_BREAKPOINT to EXCEPTION_SINGLE_STEP). There is a very small timing window here where another + // thread could alter memory protections to avoid the A/V when we run the instruction for real but the + // liklihood of this happening (in managed code no less) is judged sufficiently small that it's not worth + // the alternate solution (where we'd have to set the thread up to raise an exception with exactly the + // right thread context). + + // Cache thread's initial PC since we'll overwrite them as part of the emulation and we need + // to get back to the correct values at fixup time. We also cache a target PC (set below) since some + // instructions will set the PC directly or otherwise make it difficult for us to compute the final PC + // from the original. We still need the original PC however since this is the one we'll use if an + // exception (other than a breakpoint) occurs. + _ASSERTE((!m_fBypass || (m_originalPc == pCtx->Pc))); + + m_originalPc = pCtx->Pc; + + // By default assume the next PC is right after the current instruction. + m_targetPc = m_originalPc + sizeof(uint32_t); + m_fEmulate = false; + + // There are two different scenarios we must deal with (listed in priority order). In all cases we will + // redirect the thread to execute code from our buffer and end by raising a breakpoint exception: + // 1) The current instruction either takes the PC as an input or modifies the PC. + // We can't easily run these instructions from the redirect buffer so we emulate their effect (i.e. + // update the current context in the same way as executing the instruction would). The breakpoint + // fixup logic will restore the PC to the real resultant PC we cache in m_targetPc. + // 2) For all other cases (including emulation cases where we aborted due to a memory fault) we copy the + // single instruction into the redirect buffer for execution followed by a breakpoint (once we regain + // control in the breakpoint fixup logic we can then reset the PC to its proper location. + + unsigned int idxNextInstruction = 0; + + ExecutableWriterHolder codeWriterHolder(m_rgCode, kMaxCodeBuffer * sizeof(m_rgCode[0])); + + if (TryEmulate(pCtx, opcode, false)) + { + LOG((LF_CORDB, LL_INFO100000, "RiscV64SingleStepper: Case 1: Emulate\n")); + // Case 1: Emulate an instruction that reads or writes the PC. + m_fEmulate = true; + } + else + { + LOG((LF_CORDB, LL_INFO100000, "RiscV64SingleStepper: Case 2: CopyInstruction.\n")); + // Case 2: In all other cases copy the instruction to the buffer and we'll run it directly. + codeWriterHolder.GetRW()[idxNextInstruction++] = opcode; + } + + // Always terminate the redirection buffer with a breakpoint. + codeWriterHolder.GetRW()[idxNextInstruction++] = kBreakpointOp; + _ASSERTE(idxNextInstruction <= kMaxCodeBuffer); + + // Set the thread up so it will redirect to our buffer when execution resumes. + pCtx->Pc = (uint64_t)m_rgCode; + + // Make sure the CPU sees the updated contents of the buffer. + FlushInstructionCache(GetCurrentProcess(), m_rgCode, kMaxCodeBuffer * sizeof(m_rgCode[0])); + + // Done, set the state. + m_state = Applied; +} + +void RiscV64SingleStepper::Disable() +{ + _ASSERTE(m_state != Applied); + m_state = Disabled; +} + +// When called in response to an exception (preferably in a first chance vectored handler before anyone else +// has looked at the thread context) this method will (a) determine whether this exception was raised by a +// call to Enable() above, in which case true will be returned and (b) perform final fixup of the thread +// context passed in to complete the emulation of a hardware single step. Note that this routine must be +// called even if the exception code is not EXCEPTION_BREAKPOINT since the instruction stepped might have +// raised its own exception (e.g. A/V) and we still need to fix the thread context in this case. +bool RiscV64SingleStepper::Fixup(T_CONTEXT *pCtx, DWORD dwExceptionCode) +{ +#ifdef _DEBUG + uint64_t codestart = (uint64_t)m_rgCode; + uint64_t codeend = codestart + (kMaxCodeBuffer * sizeof(uint32_t)); +#endif + + // If we reach fixup, we should either be Disabled or Applied. If we reach here with Enabled it means + // that the debugging layer Enabled the single stepper, but we never applied it to a CONTEXT. + _ASSERTE(m_state != Enabled); + + // Nothing to do if the stepper is disabled on this thread. + if (m_state == Disabled) + { + // We better not be inside our internal code buffer though. + _ASSERTE((pCtx->Pc < codestart) || (pCtx->Pc > codeend)); + return false; + } + + // Turn off the single stepper after we have executed one instruction. + m_state = Disabled; + + // We should always have a PC somewhere in our redirect buffer. +#ifdef _DEBUG + _ASSERTE((pCtx->Pc >= codestart) && (pCtx->Pc <= codeend)); +#endif + + if (dwExceptionCode == EXCEPTION_BREAKPOINT) + { + // The single step went as planned. Set the PC back to its real value (either following the + // instruction we stepped or the computed destination we cached after emulating an instruction that + // modifies the PC). + if (!m_fEmulate) + { + if (m_rgCode[0] != kBreakpointOp) + { + LOG((LF_CORDB, LL_INFO100000, "RiscV64SingleStepper::Fixup executed code, ip = %lx\n", m_targetPc)); + + pCtx->Pc = m_targetPc; + } + else + { + // We've hit a breakpoint in the code stream. We will return false here (which causes us to NOT + // replace the breakpoint code with single step), and place the Pc back to the original Pc. The + // debugger patch skipping code will move past this breakpoint. + LOG((LF_CORDB, LL_INFO100000, "RiscV64SingleStepper::Fixup emulated breakpoint\n")); + pCtx->Pc = m_originalPc; + + _ASSERTE((pCtx->Pc & 0x3) == 0); // TODO change this after "C" Standard Extension support implemented + return false; + } + } + else + { + bool res = TryEmulate(pCtx, m_opcodes[0], true); + _ASSERTE(res); // We should always successfully emulate since we ran it through TryEmulate already. + + pCtx->Pc = m_targetPc; + + LOG((LF_CORDB, LL_INFO100000, "RiscV64SingleStepper::Fixup emulated, ip = %lx\n", pCtx->Pc)); + } + } + else + { + // The stepped instruction caused an exception. Reset the PC to its original values we + // cached before stepping. + _ASSERTE(m_fEmulate == false); + pCtx->Pc = m_originalPc; + + LOG((LF_CORDB, LL_INFO100000, "RiscV64SingleStepper::Fixup hit exception pc = %lx ex = %x\n", pCtx->Pc, dwExceptionCode)); + } + + _ASSERTE((pCtx->Pc & 0x3) == 0); // TODO change this after "C" Standard Extension support implemented + return true; +} + +// Get the current value of a register. +uint64_t RiscV64SingleStepper::GetReg(T_CONTEXT *pCtx, uint64_t reg) +{ + _ASSERTE(reg <= 31); + + return (&pCtx->R0)[reg]; +} + +// Set the current value of a register. +void RiscV64SingleStepper::SetReg(T_CONTEXT *pCtx, uint64_t reg, uint64_t value) +{ + _ASSERTE(reg <= 31); + + if (reg != 0) // Do nothing for X0, register X0 is hardwired to the constant 0. + (&pCtx->R0)[reg] = value; +} + +inline uint64_t SignExtend(uint64_t value, unsigned int signbit) +{ + _ASSERTE(signbit < 64); + + if (signbit == 63) + return value; + + uint64_t sign = value & (1ull << signbit); + + if (sign) + return value | (~0ull << signbit); + else + return value; +} + +inline uint64_t BitExtract(uint64_t value, unsigned int highbit, unsigned int lowbit, bool signExtend = false) +{ + _ASSERTE((highbit < 64) && (lowbit < 64) && (highbit >= lowbit)); + uint64_t extractedValue = (value >> lowbit) & ((1ull << ((highbit - lowbit) + 1)) - 1); + + return signExtend ? SignExtend(extractedValue, highbit - lowbit) : extractedValue; +} + +// Parse the instruction opcode. If the instruction reads or writes the PC it will be emulated by updating +// the thread context appropriately and true will be returned. If the instruction is not one of those cases +// (or it is but we faulted trying to read memory during the emulation) no state is updated and false is +// returned instead. +bool RiscV64SingleStepper::TryEmulate(T_CONTEXT *pCtx, uint32_t opcode, bool execute) +{ + LOG((LF_CORDB, LL_INFO100000, "RiscV64SingleStepper::TryEmulate(opcode=%x, execute=%s)\n", opcode, execute ? "true" : "false")); + + // Track whether instruction emulation wrote a modified PC. + bool fRedirectedPc = false; + + // Track whether we successfully emulated an instruction. If we did and we didn't modify the PC (e.g. a + // AUIPC instruction or a conditional branch not taken) then we'll need to explicitly set the PC to the next + // instruction (since our caller expects that whenever we return true m_pCtx->Pc holds the next + // instruction address). + bool fEmulated = false; + + // TODO after "C" Standard Extension support implemented, add C.J, C.JAL, C.JR, C.JALR, C.BEQZ, C.BNEZ + + if ((opcode & 0x7f) == 0x17) // AUIPC + { + fEmulated = true; + if (execute) + { + LOG((LF_CORDB, LL_INFO100000, "RiscV64SingleStepper::TryEmulate AUIPC\n")); + + // U-immediate + uint64_t imm = opcode & ~0xfffull; + uint64_t Rd = BitExtract(opcode, 11, 7); + + uint64_t value = m_originalPc + imm; + SetReg(pCtx, Rd, value); + } + } + else if ((opcode & 0x7f) == 0x6f) // JAL + { + fEmulated = true; + if (execute) + { + LOG((LF_CORDB, LL_INFO100000, "RiscV64SingleStepper::TryEmulate JAL\n")); + + // J-immediate encodes a signed offset in multiples of 2 bytes + // 20 | 19 1 | 0 + // inst[31]/sign | inst[19:12] | inst[20] | inst[30:25] | inst[24:21] | 0 + uint64_t imm = SignExtend((BitExtract(opcode, 30, 21) << 1) | (BitExtract(opcode, 20, 20) << 11) | + (BitExtract(opcode, 19, 12) << 12) | (BitExtract(opcode, 31, 31) << 20), 20); + uint64_t Rd = BitExtract(opcode, 11, 7); + SetReg(pCtx, Rd, m_originalPc + 4); + + fRedirectedPc = true; + m_targetPc = m_originalPc + imm; + } + } + else if ((opcode & 0x707f) == 0x67) // JALR + { + fEmulated = true; + if (execute) + { + LOG((LF_CORDB, LL_INFO100000, "RiscV64SingleStepper::TryEmulate JALR\n")); + + // I-immediate + uint64_t imm = BitExtract(opcode, 31, 20, true); + uint64_t Rs1 = BitExtract(opcode, 19, 15); + uint64_t Rd = BitExtract(opcode, 11, 7); + SetReg(pCtx, Rd, m_originalPc + 4); + + fRedirectedPc = true; + m_targetPc = (GetReg(pCtx, Rs1) + imm) & ~1ull; + } + } + else if (((opcode & 0x707f) == 0x63) || // BEQ + ((opcode & 0x707f) == 0x1063) || // BNE + ((opcode & 0x707f) == 0x4063) || // BLT + ((opcode & 0x707f) == 0x5063)) // BGE + { + fEmulated = true; + if (execute) + { + LOG((LF_CORDB, LL_INFO100000, "RiscV64SingleStepper::TryEmulate BEQ/BNE/BLT/BGE\n")); + + uint64_t Rs1 = BitExtract(opcode, 19, 15); + uint64_t Rs2 = BitExtract(opcode, 24, 20); + int64_t Rs1SValue = GetReg(pCtx, Rs1); + int64_t Rs2SValue = GetReg(pCtx, Rs2); + + if ((((opcode & 0x707f) == 0x63) && Rs1SValue == Rs2SValue) || + (((opcode & 0x707f) == 0x1063) && Rs1SValue != Rs2SValue) || + (((opcode & 0x707f) == 0x4063) && Rs1SValue < Rs2SValue) || + (((opcode & 0x707f) == 0x5063) && Rs1SValue >= Rs2SValue)) + { + // B-immediate encodes a signed offset in multiples of 2 bytes + // 12 | 11 1 | 0 + // inst[31]/sign | inst[7] | inst[30:25] | inst[11:8] | 0 + uint64_t imm = SignExtend((BitExtract(opcode, 11, 8) << 1) | (BitExtract(opcode, 30, 25) << 5) | + (BitExtract(opcode, 7, 7) << 11) | (BitExtract(opcode, 31, 31) << 12), 12); + + fRedirectedPc = true; + m_targetPc = m_originalPc + imm; + } + } + } + else if (((opcode & 0x707f) == 0x6063) || // BLTU + ((opcode & 0x707f) == 0x7063)) // BGEU + { + fEmulated = true; + if (execute) + { + LOG((LF_CORDB, LL_INFO100000, "RiscV64SingleStepper::TryEmulate BLTU/BGEU\n")); + + uint64_t Rs1 = BitExtract(opcode, 19, 15); + uint64_t Rs2 = BitExtract(opcode, 24, 20); + uint64_t Rs1Value = GetReg(pCtx, Rs1); + uint64_t Rs2Value = GetReg(pCtx, Rs2); + + if ((((opcode & 0x707f) == 0x6063) && Rs1Value < Rs2Value) || + (((opcode & 0x707f) == 0x7063) && Rs1Value >= Rs2Value)) + { + // B-immediate encodes a signed offset in multiples of 2 bytes + // 12 | 11 1 | 0 + // inst[31]/sign | inst[7] | inst[30:25] | inst[11:8] | 0 + uint64_t imm = SignExtend((BitExtract(opcode, 11, 8) << 1) | (BitExtract(opcode, 30, 25) << 5) | + (BitExtract(opcode, 7, 7) << 11) | (BitExtract(opcode, 31, 31) << 12), 12); + + fRedirectedPc = true; + m_targetPc = m_originalPc + imm; + } + } + } + + LOG((LF_CORDB, LL_INFO100000, "RiscV64SingleStepper::TryEmulate(opcode=%x) emulated=%s redirectedPc=%s\n", + opcode, fEmulated ? "true" : "false", fRedirectedPc ? "true" : "false")); + + return fEmulated; +} diff --git a/src/coreclr/vm/riscv64singlestepper.h b/src/coreclr/vm/riscv64singlestepper.h new file mode 100644 index 0000000000000..b057c75ebeeb4 --- /dev/null +++ b/src/coreclr/vm/riscv64singlestepper.h @@ -0,0 +1,87 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// + +// +// Emulate hardware single-step on RISCV64. +// + +#ifndef __RISCV64_SINGLE_STEPPER_H__ +#define __RISCV64_SINGLE_STEPPER_H__ + +// Class that encapsulates the context needed to single step one thread. +class RiscV64SingleStepper +{ +public: + RiscV64SingleStepper(); + ~RiscV64SingleStepper(); + + // Given the context with which a thread will be resumed, modify that context such that resuming the + // thread will execute a single instruction before raising an EXCEPTION_BREAKPOINT. The thread context + // must be cleaned up via the Fixup method below before any further exception processing can occur (at + // which point the caller can behave as though EXCEPTION_SINGLE_STEP was raised). + void Enable(); + + void Bypass(uint64_t ip, uint32_t opcode); + + void Apply(T_CONTEXT *pCtx); + + // Disables the single stepper. + void Disable(); + + // Returns whether or not the stepper is enabled. + inline bool IsEnabled() const + { + return m_state == Enabled || m_state == Applied; + } + + // When called in response to an exception (preferably in a first chance vectored handler before anyone + // else has looked at the thread context) this method will (a) determine whether this exception was raised + // by a call to Enable() above, in which case true will be returned and (b) perform final fixup of the + // thread context passed in to complete the emulation of a hardware single step. Note that this routine + // must be called even if the exception code is not EXCEPTION_BREAKPOINT since the instruction stepped + // might have raised its own exception (e.g. A/V) and we still need to fix the thread context in this + // case. + bool Fixup(T_CONTEXT *pCtx, DWORD dwExceptionCode); + +private: + enum + { + kMaxCodeBuffer = 2, // max slots in our redirect buffer + // 1 for current instruction + // 1 for final breakpoint + + kBreakpointOp = 0x00100073, // Opcode for the breakpoint instruction used on RiscV64 Unix + }; + + enum StepperState + { + Disabled, + Enabled, + Applied + }; + + uint64_t m_originalPc; // PC value before stepping + uint64_t m_targetPc; // Final PC value after stepping if no exception is raised + uint32_t *m_rgCode; // Buffer execution is redirected to during the step + StepperState m_state; // Tracks whether the stepper is Enabled, Disabled, or enabled and applied to a context + uint32_t m_opcodes[1]; + bool m_fEmulate; + bool m_fBypass; + + // Initializes m_rgCode. Not thread safe. + void Init(); + + // Get the current value of a register. + uint64_t GetReg(T_CONTEXT *pCtx, uint64_t reg); + // Set the current value of a register. + void SetReg(T_CONTEXT *pCtx, uint64_t reg, uint64_t value); + + // Parse the instruction opcode. If the instruction reads or writes the PC it will be emulated by updating + // the thread context appropriately and true will be returned. If the instruction is not one of those cases + // (or it is but we faulted trying to read memory during the emulation) no state is updated and false is + // returned instead. + bool TryEmulate(T_CONTEXT *pCtx, uint32_t opcode, bool execute); +}; + +#endif // !__RISCV64_SINGLE_STEPPER_H__ diff --git a/src/coreclr/vm/threads.h b/src/coreclr/vm/threads.h index f69d3df1e7493..2a09374882672 100644 --- a/src/coreclr/vm/threads.h +++ b/src/coreclr/vm/threads.h @@ -252,6 +252,9 @@ struct TailCallArgBuffer #if (defined(TARGET_ARM64) && defined(FEATURE_EMULATE_SINGLESTEP)) #include "arm64singlestepper.h" #endif +#if (defined(TARGET_RISCV64) && defined(FEATURE_EMULATE_SINGLESTEP)) +#include "riscv64singlestepper.h" +#endif #if !defined(PLATFORM_SUPPORTS_SAFE_THREADSUSPEND) // DISABLE_THREADSUSPEND controls whether Thread::SuspendThread will be used at all. @@ -2566,6 +2569,8 @@ class Thread private: #if defined(TARGET_ARM) ArmSingleStepper m_singleStepper; +#elif defined(TARGET_RISCV64) + RiscV64SingleStepper m_singleStepper; #else Arm64SingleStepper m_singleStepper; #endif @@ -2581,7 +2586,7 @@ class Thread m_singleStepper.Enable(); } - void BypassWithSingleStep(const void* ip ARM_ARG(WORD opcode1) ARM_ARG(WORD opcode2) ARM64_ARG(uint32_t opcode)) + void BypassWithSingleStep(const void* ip ARM_ARG(WORD opcode1) ARM_ARG(WORD opcode2) ARM64_ARG(uint32_t opcode) RISCV64_ARG(uint32_t opcode)) { #if defined(TARGET_ARM) m_singleStepper.Bypass((DWORD)ip, opcode1, opcode2); diff --git a/src/installer/pkg/sfx/Microsoft.NETCore.App/monocrossaot.sfxproj b/src/installer/pkg/sfx/Microsoft.NETCore.App/monocrossaot.sfxproj index a5bd806e21ec6..08da76561f220 100644 --- a/src/installer/pkg/sfx/Microsoft.NETCore.App/monocrossaot.sfxproj +++ b/src/installer/pkg/sfx/Microsoft.NETCore.App/monocrossaot.sfxproj @@ -7,6 +7,7 @@ $(MonoAotTargets);tvossimulator-x64;tvossimulator-arm64;tvos-arm64 $(MonoAotTargets);iossimulator-x64;iossimulator-arm64;ios-arm64 $(MonoAotTargets);maccatalyst-x64;maccatalyst-arm64 + $(MonoAotTargets);wasi-wasm diff --git a/src/libraries/Common/src/Extensions/TypeNameHelper/TypeNameHelper.cs b/src/libraries/Common/src/Extensions/TypeNameHelper/TypeNameHelper.cs index 90a0b390eb0ce..75055152c9001 100644 --- a/src/libraries/Common/src/Extensions/TypeNameHelper/TypeNameHelper.cs +++ b/src/libraries/Common/src/Extensions/TypeNameHelper/TypeNameHelper.cs @@ -2,9 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Text; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; +using System.Text; namespace Microsoft.Extensions.Internal { diff --git a/src/libraries/Common/src/Interop/BSD/System.Native/Interop.TcpConnectionInfo.cs b/src/libraries/Common/src/Interop/BSD/System.Native/Interop.TcpConnectionInfo.cs index 520d4d1045733..58f6501a825c9 100644 --- a/src/libraries/Common/src/Interop/BSD/System.Native/Interop.TcpConnectionInfo.cs +++ b/src/libraries/Common/src/Interop/BSD/System.Native/Interop.TcpConnectionInfo.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Runtime.InteropServices; using System.Net.NetworkInformation; +using System.Runtime.InteropServices; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Interop.Brotli.cs b/src/libraries/Common/src/Interop/Interop.Brotli.cs index 919240e692e55..cc49e4b323a53 100644 --- a/src/libraries/Common/src/Interop/Interop.Brotli.cs +++ b/src/libraries/Common/src/Interop/Interop.Brotli.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Runtime.InteropServices; using System.IO.Compression; +using System.Runtime.InteropServices; using Microsoft.Win32.SafeHandles; internal static partial class Interop diff --git a/src/libraries/Common/src/Interop/Linux/OpenLdap/Interop.Ber.cs b/src/libraries/Common/src/Interop/Linux/OpenLdap/Interop.Ber.cs index d5f6895a2e7d8..fd0332d362cd0 100644 --- a/src/libraries/Common/src/Interop/Linux/OpenLdap/Interop.Ber.cs +++ b/src/libraries/Common/src/Interop/Linux/OpenLdap/Interop.Ber.cs @@ -2,9 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Runtime.InteropServices; -using System.DirectoryServices.Protocols; using System.Diagnostics; +using System.DirectoryServices.Protocols; +using System.Runtime.InteropServices; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/OSX/Interop.CoreFoundation.cs b/src/libraries/Common/src/Interop/OSX/Interop.CoreFoundation.cs index efd8c3cdf916a..2bd1c8bbbb2d4 100644 --- a/src/libraries/Common/src/Interop/OSX/Interop.CoreFoundation.cs +++ b/src/libraries/Common/src/Interop/OSX/Interop.CoreFoundation.cs @@ -4,12 +4,10 @@ using System; using System.Diagnostics; using System.Runtime.InteropServices; - using Microsoft.Win32.SafeHandles; - -using CFStringRef = System.IntPtr; using CFArrayRef = System.IntPtr; using CFIndex = System.IntPtr; +using CFStringRef = System.IntPtr; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/OSX/Interop.RunLoop.cs b/src/libraries/Common/src/Interop/OSX/Interop.RunLoop.cs index d27539e32a957..838eb03473e04 100644 --- a/src/libraries/Common/src/Interop/OSX/Interop.RunLoop.cs +++ b/src/libraries/Common/src/Interop/OSX/Interop.RunLoop.cs @@ -2,11 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Runtime.InteropServices; using System.Runtime.CompilerServices; - +using System.Runtime.InteropServices; using Microsoft.Win32.SafeHandles; - using CFRunLoopRef = System.IntPtr; using CFRunLoopSourceRef = System.IntPtr; using CFStringRef = System.IntPtr; diff --git a/src/libraries/Common/src/Interop/OSX/Interop.SystemConfiguration.cs b/src/libraries/Common/src/Interop/OSX/Interop.SystemConfiguration.cs index 693d58bcacae4..be35733b3a55f 100644 --- a/src/libraries/Common/src/Interop/OSX/Interop.SystemConfiguration.cs +++ b/src/libraries/Common/src/Interop/OSX/Interop.SystemConfiguration.cs @@ -1,13 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System; using System.Runtime.InteropServices; - -using CFStringRef = System.IntPtr; +using Microsoft.Win32.SafeHandles; using CFArrayRef = System.IntPtr; using CFIndex = System.IntPtr; +using CFStringRef = System.IntPtr; using SCDynamicStoreRef = System.IntPtr; internal static partial class Interop diff --git a/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.SignVerify.cs b/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.SignVerify.cs index 043890f983819..acf7ea05d6758 100644 --- a/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.SignVerify.cs +++ b/src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.SignVerify.cs @@ -1,12 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System; using System.Diagnostics; using System.Runtime.InteropServices; using System.Security.Cryptography; using System.Security.Cryptography.Apple; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.CopyFile.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.CopyFile.cs index 154eac7f62b89..08d0b6af2b3b2 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.CopyFile.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.CopyFile.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.FChMod.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.FChMod.cs index b2efd516c624e..b525f245a165f 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.FChMod.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.FChMod.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetGroupName.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetGroupName.cs index f36935ae7f39a..44be80d6410bd 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetGroupName.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetGroupName.cs @@ -1,14 +1,14 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Runtime.InteropServices; -using System.Buffers; -using System.Text; using System; +using System.Buffers; using System.Collections.Generic; -using System.Reflection; -using System.IO; using System.Diagnostics.CodeAnalysis; +using System.IO; +using System.Reflection; +using System.Runtime.InteropServices; +using System.Text; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetRandomBytes.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetRandomBytes.cs index 9d80ea4406860..f099768d1cd1c 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetRandomBytes.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetRandomBytes.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Security.Cryptography; using System.Runtime.InteropServices; +using System.Security.Cryptography; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetSetPriority.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetSetPriority.cs index 1a2e9362a29d9..22446a5d5bbcf 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetSetPriority.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetSetPriority.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Diagnostics; -using System.Runtime.InteropServices; using System.Reflection; +using System.Runtime.InteropServices; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetWindowWidth.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetWindowWidth.cs index 73f35d6a5ed65..582dade30b075 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetWindowWidth.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.GetWindowWidth.cs @@ -3,6 +3,7 @@ using System; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { @@ -18,7 +19,7 @@ internal struct WinSize }; [LibraryImport(Libraries.SystemNative, EntryPoint = "SystemNative_GetWindowSize", SetLastError = true)] - internal static partial int GetWindowSize(out WinSize winSize); + internal static partial int GetWindowSize(SafeFileHandle terminalHandle, out WinSize winSize); [LibraryImport(Libraries.SystemNative, EntryPoint = "SystemNative_SetWindowSize", SetLastError = true)] internal static partial int SetWindowSize(in WinSize winSize); diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.InitializeTerminalAndSignalHandling.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.InitializeTerminalAndSignalHandling.cs index 81ebf2dafcc0a..9824f62e29fef 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.InitializeTerminalAndSignalHandling.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.InitializeTerminalAndSignalHandling.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { @@ -12,6 +13,6 @@ internal static partial class Sys internal static partial bool InitializeTerminalAndSignalHandling(); [LibraryImport(Libraries.SystemNative, EntryPoint = "SystemNative_SetKeypadXmit", StringMarshalling = StringMarshalling.Utf8)] - internal static partial void SetKeypadXmit(string terminfoString); + internal static partial void SetKeypadXmit(SafeFileHandle terminalHandle, string terminfoString); } } diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.NetworkChange.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.NetworkChange.cs index 85d0401397adb..d901a6683c028 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.NetworkChange.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.NetworkChange.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Runtime.InteropServices; using System; +using System.Runtime.InteropServices; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.ReadLink.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.ReadLink.cs index 3a237c0592baf..e88cba00c4d4a 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.ReadLink.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.ReadLink.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Runtime.InteropServices; +using System; using System.Buffers; +using System.Runtime.InteropServices; using System.Text; -using System; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.ASN1.GetIntegerBytes.cs b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.ASN1.GetIntegerBytes.cs index abbd2e4620e10..a61fe76025cdc 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.ASN1.GetIntegerBytes.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.ASN1.GetIntegerBytes.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Runtime.InteropServices; using System.Formats.Asn1; +using System.Runtime.InteropServices; using System.Security.Cryptography; using Microsoft.Win32.SafeHandles; diff --git a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.EcDsa.ImportExport.cs b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.EcDsa.ImportExport.cs index f167f99ff8499..70f5a2fcc3426 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.EcDsa.ImportExport.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.EcDsa.ImportExport.cs @@ -1,11 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System; using System.Diagnostics; using System.Runtime.InteropServices; using System.Security.Cryptography; using Microsoft.Win32.SafeHandles; -using System; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.EcKey.cs b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.EcKey.cs index c62dfc00cb63e..05be5f7583725 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.EcKey.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.EcKey.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System; using System.Diagnostics; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.Ssl.cs b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.Ssl.cs index 71d23c26d3453..eade34f594a97 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.Ssl.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.Ssl.cs @@ -6,9 +6,9 @@ using System.Collections.ObjectModel; using System.Diagnostics; using System.Net.Security; +using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.InteropServices.Marshalling; -using System.Runtime.CompilerServices; using System.Security.Cryptography; using System.Security.Cryptography.X509Certificates; using Microsoft.Win32.SafeHandles; diff --git a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.X509.cs b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.X509.cs index d664469727006..954cacef97558 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.X509.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.X509.cs @@ -2,11 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; +using System.Diagnostics.CodeAnalysis; using System.Runtime.InteropServices; using System.Security.Cryptography; using System.Security.Cryptography.X509Certificates; using Microsoft.Win32.SafeHandles; -using System.Diagnostics.CodeAnalysis; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.AdjustTokenPrivileges.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.AdjustTokenPrivileges.cs index 14bb8490059b8..f1edef88fabed 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.AdjustTokenPrivileges.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.AdjustTokenPrivileges.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CheckTokenMembership.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CheckTokenMembership.cs index b10c2ef646868..9ab0dbb4ec660 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CheckTokenMembership.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.CheckTokenMembership.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.ControlService.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.ControlService.cs index 7b2219794efa6..d2be090daba76 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.ControlService.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.ControlService.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.ConvertStringSecurityDescriptorToSecurityDescriptor.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.ConvertStringSecurityDescriptorToSecurityDescriptor.cs index f16510718dd6e..29b8e778a8ef0 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.ConvertStringSecurityDescriptorToSecurityDescriptor.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.ConvertStringSecurityDescriptorToSecurityDescriptor.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.DuplicateTokenEx.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.DuplicateTokenEx.cs index 98fcb41bb170b..19b16fdc0b3f0 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.DuplicateTokenEx.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.DuplicateTokenEx.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.DuplicateTokenEx_SafeTokenHandle.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.DuplicateTokenEx_SafeTokenHandle.cs index 5213692afe545..dc8f5ed7d98c5 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.DuplicateTokenEx_SafeTokenHandle.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.DuplicateTokenEx_SafeTokenHandle.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System; using System.Runtime.InteropServices; using System.Security.Principal; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.EnumDependentServices.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.EnumDependentServices.cs index d96c788e06396..db5ca7983f383 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.EnumDependentServices.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.EnumDependentServices.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.EnumServicesStatusEx.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.EnumServicesStatusEx.cs index 132c775c3f087..b0fa0b030001c 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.EnumServicesStatusEx.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.EnumServicesStatusEx.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.EventWriteTransfer.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.EventWriteTransfer.cs index 1c1438adb1d02..eef04ee916f55 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.EventWriteTransfer.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.EventWriteTransfer.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Runtime.InteropServices; using System.Diagnostics.Tracing; +using System.Runtime.InteropServices; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.GetServiceDisplayName.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.GetServiceDisplayName.cs index e33d0bd550d93..ff5e22be65a4f 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.GetServiceDisplayName.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.GetServiceDisplayName.cs @@ -1,12 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System; using System.Buffers; using System.ComponentModel; using System.Runtime.InteropServices; using System.Text; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.GetServiceKeyName.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.GetServiceKeyName.cs index e51364bd122ab..bc5a9e6128b8e 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.GetServiceKeyName.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.GetServiceKeyName.cs @@ -1,12 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System; using System.Buffers; using System.ComponentModel; using System.Runtime.InteropServices; using System.Text; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.GetTokenInformation.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.GetTokenInformation.cs index 550b81d737c5f..c352eb5201bfa 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.GetTokenInformation.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.GetTokenInformation.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.GetTokenInformation_SafeLocalAllocHandle.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.GetTokenInformation_SafeLocalAllocHandle.cs index b8b4133661e66..41ca5577cbafa 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.GetTokenInformation_SafeLocalAllocHandle.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.GetTokenInformation_SafeLocalAllocHandle.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.GetTokenInformation_void.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.GetTokenInformation_void.cs index 02f7b03c5812e..5d8e84b5baf55 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.GetTokenInformation_void.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.GetTokenInformation_void.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.ImpersonateLoggedOnUser.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.ImpersonateLoggedOnUser.cs index a26ab17218758..2e250d87d25cc 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.ImpersonateLoggedOnUser.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.ImpersonateLoggedOnUser.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.ImpersonateNamedPipeClient.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.ImpersonateNamedPipeClient.cs index 69177318f371a..4e1d2f0b14108 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.ImpersonateNamedPipeClient.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.ImpersonateNamedPipeClient.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.LUID.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.LUID.cs index dd4418904b8e7..e4068991a50b5 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.LUID.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.LUID.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.LUID_AND_ATTRIBUTES.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.LUID_AND_ATTRIBUTES.cs index 69f3f10d86df1..acfd836cfa891 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.LUID_AND_ATTRIBUTES.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.LUID_AND_ATTRIBUTES.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.OpenProcessToken.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.OpenProcessToken.cs index ab40e1193a4d4..6a8bb62b4d51e 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.OpenProcessToken.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.OpenProcessToken.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.OpenProcessToken_IntPtr.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.OpenProcessToken_IntPtr.cs index b4e7f4e87eb57..d67607fd32df6 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.OpenProcessToken_IntPtr.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.OpenProcessToken_IntPtr.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; -using System.Runtime.InteropServices; using System; +using System.Runtime.InteropServices; using System.Security.Principal; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.OpenService.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.OpenService.cs index 4fac2d301d5d4..a7c93e849e2cb 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.OpenService.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.OpenService.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.OpenThreadToken.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.OpenThreadToken.cs index 9db97f34f1367..bae76b5a6efe9 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.OpenThreadToken.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.OpenThreadToken.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System; using System.Runtime.InteropServices; using System.Security.Principal; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.OpenThreadToken_SafeTokenHandle.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.OpenThreadToken_SafeTokenHandle.cs index c5453466e598e..df1acf082c8a1 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.OpenThreadToken_SafeTokenHandle.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.OpenThreadToken_SafeTokenHandle.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System; using System.Runtime.InteropServices; using System.Security.Principal; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.QueryServiceConfig.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.QueryServiceConfig.cs index 9a461fd4e1163..810f39496003d 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.QueryServiceConfig.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.QueryServiceConfig.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.QueryServiceStatus.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.QueryServiceStatus.cs index e9a4cf96bd96c..d539a8fe3ea72 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.QueryServiceStatus.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.QueryServiceStatus.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.SecurityImpersonationLevel.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.SecurityImpersonationLevel.cs index 4325a767afb93..5f0815b76215d 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.SecurityImpersonationLevel.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.SecurityImpersonationLevel.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.StartService.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.StartService.cs index 531cd2b42d0f3..44cd51854a58c 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.StartService.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.StartService.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.TOKEN_PRIVILEGE.cs b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.TOKEN_PRIVILEGE.cs index ec5790ea806bb..2d9dae673a314 100644 --- a/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.TOKEN_PRIVILEGE.cs +++ b/src/libraries/Common/src/Interop/Windows/Advapi32/Interop.TOKEN_PRIVILEGE.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/BCrypt/BCryptAlgorithmCache.cs b/src/libraries/Common/src/Interop/Windows/BCrypt/BCryptAlgorithmCache.cs index 5f060292a666c..5c40275aeeb1e 100644 --- a/src/libraries/Common/src/Interop/Windows/BCrypt/BCryptAlgorithmCache.cs +++ b/src/libraries/Common/src/Interop/Windows/BCrypt/BCryptAlgorithmCache.cs @@ -1,9 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Diagnostics; using System.Collections.Concurrent; - +using System.Diagnostics; using Microsoft.Win32.SafeHandles; internal static partial class Interop diff --git a/src/libraries/Common/src/Interop/Windows/BCrypt/Cng.cs b/src/libraries/Common/src/Interop/Windows/BCrypt/Cng.cs index 31e827630fbcf..bf3a7426fd177 100644 --- a/src/libraries/Common/src/Interop/Windows/BCrypt/Cng.cs +++ b/src/libraries/Common/src/Interop/Windows/BCrypt/Cng.cs @@ -2,14 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Text; using System.Diagnostics; using System.Runtime.InteropServices; using System.Security.Cryptography; - +using System.Text; using Internal.Cryptography; using Microsoft.Win32.SafeHandles; - using static Interop; using static Interop.BCrypt; diff --git a/src/libraries/Common/src/Interop/Windows/HttpApi/Interop.HttpApi.cs b/src/libraries/Common/src/Interop/Windows/HttpApi/Interop.HttpApi.cs index a74859093d529..c760bee05892c 100644 --- a/src/libraries/Common/src/Interop/Windows/HttpApi/Interop.HttpApi.cs +++ b/src/libraries/Common/src/Interop/Windows/HttpApi/Interop.HttpApi.cs @@ -1,7 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System; using System.Collections.Generic; using System.Net; @@ -9,6 +8,7 @@ using System.Runtime.InteropServices; using System.Security.Authentication.ExtendedProtection; using System.Threading; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/IpHlpApi/Interop.NetworkInformation.cs b/src/libraries/Common/src/Interop/Windows/IpHlpApi/Interop.NetworkInformation.cs index b01bb8ee9d3c9..7e31f18a92b3e 100644 --- a/src/libraries/Common/src/Interop/Windows/IpHlpApi/Interop.NetworkInformation.cs +++ b/src/libraries/Common/src/Interop/Windows/IpHlpApi/Interop.NetworkInformation.cs @@ -1,13 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; - using System; using System.Net; using System.Net.NetworkInformation; using System.Net.Sockets; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.ClearCommBreak.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.ClearCommBreak.cs index b5b597bf0dc10..7bf1ef4b107f2 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.ClearCommBreak.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.ClearCommBreak.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.ClearCommError.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.ClearCommError.cs index 3a17ea9b96d86..d0618fe95341c 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.ClearCommError.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.ClearCommError.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.ConnectNamedPipe.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.ConnectNamedPipe.cs index 77eabe4950325..16983f3bacc8f 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.ConnectNamedPipe.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.ConnectNamedPipe.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System; using System.Runtime.InteropServices; using System.Threading; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CreateDirectory.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CreateDirectory.cs index 2b889d797a103..025a3b402d441 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CreateDirectory.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CreateDirectory.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.IO; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CreateFile.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CreateFile.cs index cf75397a85698..f87e4f8d7d7f0 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CreateFile.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CreateFile.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System; using System.IO; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CreateFileMapping.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CreateFileMapping.cs index 7e8810573e208..fffb619009479 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CreateFileMapping.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CreateFileMapping.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CreateNamedPipe.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CreateNamedPipe.cs index 761921953664c..a2622b0dce175 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CreateNamedPipe.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CreateNamedPipe.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CreateNamedPipeClient.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CreateNamedPipeClient.cs index 00cefe210f317..8bdc4d1ed7952 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CreateNamedPipeClient.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CreateNamedPipeClient.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System; using System.IO; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CreatePipe_SafeFileHandle.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CreatePipe_SafeFileHandle.cs index d09b9a09d3ccc..ac9688de55fe7 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CreatePipe_SafeFileHandle.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CreatePipe_SafeFileHandle.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CreatePipe_SafePipeHandle.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CreatePipe_SafePipeHandle.cs index 97ee5e67f77d7..c8b49eb5efc5a 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CreatePipe_SafePipeHandle.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CreatePipe_SafePipeHandle.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CreateProcess.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CreateProcess.cs index c804e06091df2..1acb58dafaa63 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CreateProcess.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CreateProcess.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System; using System.Runtime.InteropServices; using System.Text; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.DeleteFile.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.DeleteFile.cs index 2713030dc075a..155f38979d283 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.DeleteFile.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.DeleteFile.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.IO; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.DeleteVolumeMountPoint.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.DeleteVolumeMountPoint.cs index e62fed5d5bc6f..5fd922988643b 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.DeleteVolumeMountPoint.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.DeleteVolumeMountPoint.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.IO; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.DisconnectNamedPipe.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.DisconnectNamedPipe.cs index 0c3d3d535524b..b30611cb32b19 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.DisconnectNamedPipe.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.DisconnectNamedPipe.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.DuplicateHandle_SafeAccessTokenHandle.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.DuplicateHandle_SafeAccessTokenHandle.cs index fb80482270b74..6fa839d3c0255 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.DuplicateHandle_SafeAccessTokenHandle.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.DuplicateHandle_SafeAccessTokenHandle.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.DuplicateHandle_SafeFileHandle.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.DuplicateHandle_SafeFileHandle.cs index b2d2e1643f1a1..881a9ba0303eb 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.DuplicateHandle_SafeFileHandle.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.DuplicateHandle_SafeFileHandle.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.DuplicateHandle_SafePipeHandle.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.DuplicateHandle_SafePipeHandle.cs index edcaf54cb2d0f..2743f941a5345 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.DuplicateHandle_SafePipeHandle.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.DuplicateHandle_SafePipeHandle.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.DuplicateHandle_SafeWaitHandle.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.DuplicateHandle_SafeWaitHandle.cs index 4c600111a6cb0..75306402d5d58 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.DuplicateHandle_SafeWaitHandle.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.DuplicateHandle_SafeWaitHandle.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.EnumProcessModulesEx.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.EnumProcessModulesEx.cs index 7c400c76e4a71..e6f4d2992369a 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.EnumProcessModulesEx.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.EnumProcessModulesEx.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.EscapeCommFunction.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.EscapeCommFunction.cs index 881d5f320e896..e6dcd5f8c6d3f 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.EscapeCommFunction.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.EscapeCommFunction.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.EventWaitHandle.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.EventWaitHandle.cs index f265ff1022f08..012baaeaf55b3 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.EventWaitHandle.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.EventWaitHandle.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FindFirstFileEx.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FindFirstFileEx.cs index 0095c09cdac3a..0c72aa65de025 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FindFirstFileEx.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FindFirstFileEx.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System; using System.IO; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FindNextFile.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FindNextFile.cs index 131384fbad9b1..4bc7701a805af 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FindNextFile.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FindNextFile.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetCommModemStatus.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetCommModemStatus.cs index e55bd089169a7..df32837d81d81 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetCommModemStatus.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetCommModemStatus.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetCommProperties.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetCommProperties.cs index 3d17ae7cd3c8e..bf8d8ee3f3891 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetCommProperties.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetCommProperties.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetCommState.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetCommState.cs index 1d85a6e7e9f18..e252756d987a0 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetCommState.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetCommState.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetExitCodeProcess.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetExitCodeProcess.cs index 1789bac255a55..b3062247b2079 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetExitCodeProcess.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetExitCodeProcess.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetFileInformationByHandle.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetFileInformationByHandle.cs index 4e3b349327845..46726774445ac 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetFileInformationByHandle.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetFileInformationByHandle.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetFileInformationByHandleEx.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetFileInformationByHandleEx.cs index 6f978f9d848a0..9bc2aec70f765 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetFileInformationByHandleEx.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetFileInformationByHandleEx.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetOverlappedResult.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetOverlappedResult.cs index 6ef5b0c3a991a..d4c5092a7e81f 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetOverlappedResult.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetOverlappedResult.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Runtime.InteropServices; using System.Threading; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetPriorityClass.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetPriorityClass.cs index 8cedaaf88edce..718834c19cd18 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetPriorityClass.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetPriorityClass.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetProcessAffinityMask.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetProcessAffinityMask.cs index c09afa13ce416..6f5c7220da77c 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetProcessAffinityMask.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetProcessAffinityMask.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetProcessId.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetProcessId.cs index 2465c0d1d0a04..f54c842f7f199 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetProcessId.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetProcessId.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetProcessPriorityBoost.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetProcessPriorityBoost.cs index 6258f55f22ee7..6db3a0597618b 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetProcessPriorityBoost.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetProcessPriorityBoost.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetProcessTimes.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetProcessTimes.cs index 64c234ba981d3..e4033b694cd92 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetProcessTimes.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetProcessTimes.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetProcessWorkingSetSizeEx.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetProcessWorkingSetSizeEx.cs index 859a85ae16e5a..adcbfc181f34c 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetProcessWorkingSetSizeEx.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetProcessWorkingSetSizeEx.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetThreadPriority.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetThreadPriority.cs index bcbd89bb93cf1..45ce10031b39e 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetThreadPriority.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetThreadPriority.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetThreadPriorityBoost.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetThreadPriorityBoost.cs index 97aa81ef2c30a..4504bb211721c 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetThreadPriorityBoost.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetThreadPriorityBoost.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetThreadTimes.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetThreadTimes.cs index d1e72cec336c5..e250961045266 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetThreadTimes.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetThreadTimes.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.HandleInformation.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.HandleInformation.cs index 5576bdd3e6cbe..57ae67529f36b 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.HandleInformation.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.HandleInformation.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.IsWow64Process_SafeProcessHandle.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.IsWow64Process_SafeProcessHandle.cs index 2be93bc6c111d..1725661ba6abf 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.IsWow64Process_SafeProcessHandle.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.IsWow64Process_SafeProcessHandle.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.LockFile.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.LockFile.cs index 9584a8b997173..eaebad72b3a16 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.LockFile.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.LockFile.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.MapViewOfFile.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.MapViewOfFile.cs index 898f47677b2cc..7969974173197 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.MapViewOfFile.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.MapViewOfFile.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.MoveFileEx.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.MoveFileEx.cs index da1d8bbdaeb52..03d769e8ad88a 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.MoveFileEx.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.MoveFileEx.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.IO; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.Mutex.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.Mutex.cs index 9b9bfff8202c4..c84f05ad659c8 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.Mutex.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.Mutex.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.OpenFileMapping.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.OpenFileMapping.cs index 347ec7c74b34b..d6d1abc3795e8 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.OpenFileMapping.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.OpenFileMapping.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.OpenProcess.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.OpenProcess.cs index 2a1fdd11f41a1..7418e8363ad29 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.OpenProcess.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.OpenProcess.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.OpenThread.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.OpenThread.cs index 7009218ef1783..20225e124a98c 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.OpenThread.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.OpenThread.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.ProcessWaitHandle.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.ProcessWaitHandle.cs index 3090de5ad6feb..38cd5e0afe708 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.ProcessWaitHandle.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.ProcessWaitHandle.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System; using System.Runtime.InteropServices; using System.Threading; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.PurgeComm.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.PurgeComm.cs index 757e72b83c946..1eb4904a96976 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.PurgeComm.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.PurgeComm.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.ReadDirectoryChangesW.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.ReadDirectoryChangesW.cs index b5eec92929849..55bd2e4266a82 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.ReadDirectoryChangesW.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.ReadDirectoryChangesW.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System; using System.Runtime.InteropServices; using System.Threading; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.RemoveDirectory.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.RemoveDirectory.cs index 7c123d17d81f5..235e17b0f2816 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.RemoveDirectory.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.RemoveDirectory.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.IO; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.Semaphore.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.Semaphore.cs index 150df2d5fb9d3..34e1935ec4919 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.Semaphore.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.Semaphore.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetCommBreak.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetCommBreak.cs index 238c96797d035..e1ee844e624ee 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetCommBreak.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetCommBreak.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetCommMask.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetCommMask.cs index 6179d1a5539ed..ec60f5d895355 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetCommMask.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetCommMask.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetCommState.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetCommState.cs index 1f88b89923853..f252e0273acc7 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetCommState.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetCommState.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetCommTimeouts.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetCommTimeouts.cs index 58b3c7a2f0021..310678efba92f 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetCommTimeouts.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetCommTimeouts.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetConsoleCtrlHandler.Delegate.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetConsoleCtrlHandler.Delegate.cs index 3148bcf07f2d9..d0a77c79d751b 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetConsoleCtrlHandler.Delegate.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetConsoleCtrlHandler.Delegate.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetFileInformationByHandle.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetFileInformationByHandle.cs index e80bf32dbb6ea..50e2615dd4740 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetFileInformationByHandle.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetFileInformationByHandle.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetFilePointerEx.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetFilePointerEx.cs index e7050d1c49ec2..c063a4fa6886b 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetFilePointerEx.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetFilePointerEx.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetNamedPipeHandleState.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetNamedPipeHandleState.cs index b618d105d931e..f307d605d86a0 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetNamedPipeHandleState.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetNamedPipeHandleState.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetPriorityClass.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetPriorityClass.cs index 000002efbd5c9..2290988c25b8a 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetPriorityClass.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetPriorityClass.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetProcessAffinityMask.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetProcessAffinityMask.cs index 67edaa145652c..375e1a9c14b0a 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetProcessAffinityMask.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetProcessAffinityMask.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetProcessPriorityBoost.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetProcessPriorityBoost.cs index 31ab0f472a042..aba42d8aeb067 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetProcessPriorityBoost.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetProcessPriorityBoost.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetProcessWorkingSetSizeEx.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetProcessWorkingSetSizeEx.cs index 02cd318310a73..daf2a6ffd9f6b 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetProcessWorkingSetSizeEx.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetProcessWorkingSetSizeEx.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetThreadAffinityMask.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetThreadAffinityMask.cs index 65e762cac4598..476fa017c8c84 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetThreadAffinityMask.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetThreadAffinityMask.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetThreadIdealProcessor.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetThreadIdealProcessor.cs index f96dfe16484c5..8791f00a5d673 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetThreadIdealProcessor.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetThreadIdealProcessor.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetThreadPriority.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetThreadPriority.cs index 5b62e530e13f7..d3dea9c7be760 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetThreadPriority.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetThreadPriority.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetThreadPriorityBoost.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetThreadPriorityBoost.cs index 24f869a56eb0d..518edf7e81454 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetThreadPriorityBoost.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetThreadPriorityBoost.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetupComm.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetupComm.cs index 574d9abc86d46..42ee13ce16289 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetupComm.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.SetupComm.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.TerminateProcess.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.TerminateProcess.cs index 0835d1dfd9951..898207679e393 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.TerminateProcess.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.TerminateProcess.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.Threading.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.Threading.cs index 9a53b48bec17c..588a151d385c7 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.Threading.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.Threading.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.WaitCommEvent.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.WaitCommEvent.cs index 0a73d3a646b1c..53d7c090ace32 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.WaitCommEvent.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.WaitCommEvent.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Runtime.InteropServices; using System.Threading; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/NCrypt/Interop.NCryptDeriveKeyMaterial.cs b/src/libraries/Common/src/Interop/Windows/NCrypt/Interop.NCryptDeriveKeyMaterial.cs index 0bb0ba115eacd..4841a97482c11 100644 --- a/src/libraries/Common/src/Interop/Windows/NCrypt/Interop.NCryptDeriveKeyMaterial.cs +++ b/src/libraries/Common/src/Interop/Windows/NCrypt/Interop.NCryptDeriveKeyMaterial.cs @@ -5,8 +5,8 @@ using System.Runtime.InteropServices; using System.Security.Cryptography; using Internal.Cryptography; -using Microsoft.Win32.SafeHandles; using Internal.NativeCrypto; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/NtDll/Interop.NtQueryInformationFile.cs b/src/libraries/Common/src/Interop/Windows/NtDll/Interop.NtQueryInformationFile.cs index b7a845249299d..30ce97d7c4813 100644 --- a/src/libraries/Common/src/Interop/Windows/NtDll/Interop.NtQueryInformationFile.cs +++ b/src/libraries/Common/src/Interop/Windows/NtDll/Interop.NtQueryInformationFile.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/NtDll/Interop.NtQueryInformationProcess.cs b/src/libraries/Common/src/Interop/Windows/NtDll/Interop.NtQueryInformationProcess.cs index 526530f40a039..746b41e0f448c 100644 --- a/src/libraries/Common/src/Interop/Windows/NtDll/Interop.NtQueryInformationProcess.cs +++ b/src/libraries/Common/src/Interop/Windows/NtDll/Interop.NtQueryInformationProcess.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/SspiCli/Interop.LSAStructs.cs b/src/libraries/Common/src/Interop/Windows/SspiCli/Interop.LSAStructs.cs index 724443efa019a..4775cb4925d81 100644 --- a/src/libraries/Common/src/Interop/Windows/SspiCli/Interop.LSAStructs.cs +++ b/src/libraries/Common/src/Interop/Windows/SspiCli/Interop.LSAStructs.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System; using System.Diagnostics; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/SspiCli/SafeDeleteContext.cs b/src/libraries/Common/src/Interop/Windows/SspiCli/SafeDeleteContext.cs index 8718558557fc6..d29aea97e1b95 100644 --- a/src/libraries/Common/src/Interop/Windows/SspiCli/SafeDeleteContext.cs +++ b/src/libraries/Common/src/Interop/Windows/SspiCli/SafeDeleteContext.cs @@ -1,12 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; - using System.Diagnostics; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Security.Authentication.ExtendedProtection; +using Microsoft.Win32.SafeHandles; namespace System.Net.Security { diff --git a/src/libraries/Common/src/Interop/Windows/WebSocket/Interop.WebSocketEndServerHandshake.cs b/src/libraries/Common/src/Interop/Windows/WebSocket/Interop.WebSocketEndServerHandshake.cs index e7a43c95ca836..8089f56c3e33b 100644 --- a/src/libraries/Common/src/Interop/Windows/WebSocket/Interop.WebSocketEndServerHandshake.cs +++ b/src/libraries/Common/src/Interop/Windows/WebSocket/Interop.WebSocketEndServerHandshake.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Diagnostics; using System.IO; using System.Runtime.InteropServices; using System.Security; -using System.Diagnostics; using Microsoft.Win32.SafeHandles; internal static partial class Interop diff --git a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.WSAConnect.cs b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.WSAConnect.cs index 6f3faacef3279..4419297a3c0d0 100644 --- a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.WSAConnect.cs +++ b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.WSAConnect.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Runtime.InteropServices; using System.Net.Sockets; +using System.Runtime.InteropServices; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.WSAGetOverlappedResult.cs b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.WSAGetOverlappedResult.cs index da2513498838e..5a18e929ba174 100644 --- a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.WSAGetOverlappedResult.cs +++ b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.WSAGetOverlappedResult.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Runtime.InteropServices; using System.Net.Sockets; +using System.Runtime.InteropServices; using System.Threading; internal static partial class Interop diff --git a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.WSAPROTOCOL_INFOW.cs b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.WSAPROTOCOL_INFOW.cs index 036b8a004c0e7..124bd99346aac 100644 --- a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.WSAPROTOCOL_INFOW.cs +++ b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.WSAPROTOCOL_INFOW.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Runtime.InteropServices; using System.Net.Sockets; +using System.Runtime.InteropServices; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.WSAStartup.cs b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.WSAStartup.cs index c9f4926a595c1..900b2d8ed0459 100644 --- a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.WSAStartup.cs +++ b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.WSAStartup.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Diagnostics; -using System.Runtime.InteropServices; using System.Net.Sockets; +using System.Runtime.InteropServices; using System.Threading; internal static partial class Interop diff --git a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.bind.cs b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.bind.cs index 158b8f5466e56..54ee4c4b8043f 100644 --- a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.bind.cs +++ b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.bind.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Runtime.InteropServices; using System.Net.Sockets; +using System.Runtime.InteropServices; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.getpeername.cs b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.getpeername.cs index 67cf50cae1116..947e1df0b7264 100644 --- a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.getpeername.cs +++ b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.getpeername.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Runtime.InteropServices; using System.Net.Sockets; +using System.Runtime.InteropServices; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.getsockname.cs b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.getsockname.cs index 8d1d9d0471f55..a84a021acdbdb 100644 --- a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.getsockname.cs +++ b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.getsockname.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Runtime.InteropServices; using System.Net.Sockets; +using System.Runtime.InteropServices; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.getsockopt.cs b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.getsockopt.cs index aa06846f8c4e1..aeea5ea6051af 100644 --- a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.getsockopt.cs +++ b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.getsockopt.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Runtime.InteropServices; using System.Net.Sockets; +using System.Runtime.InteropServices; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.listen.cs b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.listen.cs index cc7940e30290d..43475514fd750 100644 --- a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.listen.cs +++ b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.listen.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Runtime.InteropServices; using System.Net.Sockets; +using System.Runtime.InteropServices; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.recv.cs b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.recv.cs index 479d412bc3c4c..b3c43f3d5ecf8 100644 --- a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.recv.cs +++ b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.recv.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Runtime.InteropServices; using System.Net.Sockets; +using System.Runtime.InteropServices; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.recvfrom.cs b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.recvfrom.cs index 70d76733825ac..3b6a499b8127b 100644 --- a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.recvfrom.cs +++ b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.recvfrom.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Runtime.InteropServices; using System.Net.Sockets; +using System.Runtime.InteropServices; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.send.cs b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.send.cs index 69dd71fdceebb..0e093671f19ac 100644 --- a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.send.cs +++ b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.send.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Runtime.InteropServices; using System.Net.Sockets; +using System.Runtime.InteropServices; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.sendto.cs b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.sendto.cs index e93d609401513..d3a3a7b9f7e12 100644 --- a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.sendto.cs +++ b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.sendto.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Runtime.InteropServices; using System.Net.Sockets; +using System.Runtime.InteropServices; internal static partial class Interop { diff --git a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.shutdown.cs b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.shutdown.cs index 4fd9231d64711..c897bb5e93cac 100644 --- a/src/libraries/Common/src/Interop/Windows/WinSock/Interop.shutdown.cs +++ b/src/libraries/Common/src/Interop/Windows/WinSock/Interop.shutdown.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Runtime.InteropServices; using System.Net.Sockets; +using System.Runtime.InteropServices; internal static partial class Interop { diff --git a/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeBioHandle.Unix.cs b/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeBioHandle.Unix.cs index 8bfdb74716d78..510250dee9e69 100644 --- a/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeBioHandle.Unix.cs +++ b/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeBioHandle.Unix.cs @@ -2,9 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Security; -using System.Runtime.InteropServices; using System.Diagnostics; +using System.Runtime.InteropServices; +using System.Security; namespace Microsoft.Win32.SafeHandles { diff --git a/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeDsaHandle.Unix.cs b/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeDsaHandle.Unix.cs index 10f4065c2cb20..123909415de1f 100644 --- a/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeDsaHandle.Unix.cs +++ b/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeDsaHandle.Unix.cs @@ -3,8 +3,8 @@ using System; using System.Diagnostics; -using System.Security; using System.Runtime.InteropServices; +using System.Security; namespace Microsoft.Win32.SafeHandles { diff --git a/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeEcKeyHandle.Unix.cs b/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeEcKeyHandle.Unix.cs index 04b5fe578c3d9..890d0d422a4ba 100644 --- a/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeEcKeyHandle.Unix.cs +++ b/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeEcKeyHandle.Unix.cs @@ -3,8 +3,8 @@ using System; using System.Diagnostics; -using System.Security; using System.Runtime.InteropServices; +using System.Security; namespace Microsoft.Win32.SafeHandles { diff --git a/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeEvpCipherCtxHandle.Unix.cs b/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeEvpCipherCtxHandle.Unix.cs index f5b5cd3dca266..1ad318413f237 100644 --- a/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeEvpCipherCtxHandle.Unix.cs +++ b/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeEvpCipherCtxHandle.Unix.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Security; using System.Runtime.InteropServices; +using System.Security; namespace Microsoft.Win32.SafeHandles { diff --git a/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeEvpMdCtxHandle.Unix.cs b/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeEvpMdCtxHandle.Unix.cs index b1e0bfe74679c..8d8e326152f80 100644 --- a/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeEvpMdCtxHandle.Unix.cs +++ b/src/libraries/Common/src/Microsoft/Win32/SafeHandles/SafeEvpMdCtxHandle.Unix.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Security; using System.Runtime.InteropServices; +using System.Security; namespace Microsoft.Win32.SafeHandles { diff --git a/src/libraries/Common/src/System/Data/ProviderBase/DbConnectionFactory.cs b/src/libraries/Common/src/System/Data/ProviderBase/DbConnectionFactory.cs index 9d4ae11d35337..671c6eb0d5df8 100644 --- a/src/libraries/Common/src/System/Data/ProviderBase/DbConnectionFactory.cs +++ b/src/libraries/Common/src/System/Data/ProviderBase/DbConnectionFactory.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Collections.Generic; -using System.Diagnostics; using System.Data.Common; +using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Threading; using System.Threading.Tasks; diff --git a/src/libraries/Common/src/System/Diagnostics/NetFrameworkUtils.cs b/src/libraries/Common/src/System/Diagnostics/NetFrameworkUtils.cs index c7a5958d00563..67316269a6458 100644 --- a/src/libraries/Common/src/System/Diagnostics/NetFrameworkUtils.cs +++ b/src/libraries/Common/src/System/Diagnostics/NetFrameworkUtils.cs @@ -4,8 +4,8 @@ using System.IO; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -using System.Threading; using System.Text; +using System.Threading; using Microsoft.Win32; namespace System.Diagnostics diff --git a/src/libraries/Common/src/System/IO/ChunkedMemoryStream.cs b/src/libraries/Common/src/System/IO/ChunkedMemoryStream.cs index 585ad878c2c1d..bd4b9714503a5 100644 --- a/src/libraries/Common/src/System/IO/ChunkedMemoryStream.cs +++ b/src/libraries/Common/src/System/IO/ChunkedMemoryStream.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System; using System.Diagnostics; using System.Threading; using System.Threading.Tasks; -using System; namespace System.IO { diff --git a/src/libraries/Common/src/System/IO/FileSystem.Attributes.Windows.cs b/src/libraries/Common/src/System/IO/FileSystem.Attributes.Windows.cs index 26c2f6c3cf31f..0678dbff63c16 100644 --- a/src/libraries/Common/src/System/IO/FileSystem.Attributes.Windows.cs +++ b/src/libraries/Common/src/System/IO/FileSystem.Attributes.Windows.cs @@ -1,13 +1,13 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System; using System.Collections.Generic; using System.Diagnostics; -using System.Runtime.InteropServices; using System.IO; +using System.Runtime.InteropServices; using System.Text; +using Microsoft.Win32.SafeHandles; namespace System.IO { diff --git a/src/libraries/Common/src/System/IO/FileSystem.DirectoryCreation.Windows.cs b/src/libraries/Common/src/System/IO/FileSystem.DirectoryCreation.Windows.cs index dbce84a8676ed..2e9b19da4f873 100644 --- a/src/libraries/Common/src/System/IO/FileSystem.DirectoryCreation.Windows.cs +++ b/src/libraries/Common/src/System/IO/FileSystem.DirectoryCreation.Windows.cs @@ -1,13 +1,13 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System; using System.Collections.Generic; using System.Diagnostics; -using System.Runtime.InteropServices; using System.IO; +using System.Runtime.InteropServices; using System.Text; +using Microsoft.Win32.SafeHandles; namespace System.IO { diff --git a/src/libraries/Common/src/System/IO/PathInternal.Unix.cs b/src/libraries/Common/src/System/IO/PathInternal.Unix.cs index 4914071a44871..58b004fd35495 100644 --- a/src/libraries/Common/src/System/IO/PathInternal.Unix.cs +++ b/src/libraries/Common/src/System/IO/PathInternal.Unix.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Diagnostics; -using System.Text; using System.Diagnostics.CodeAnalysis; +using System.Text; namespace System.IO { diff --git a/src/libraries/Common/src/System/Net/Logging/NetEventSource.Common.Associate.cs b/src/libraries/Common/src/System/Net/Logging/NetEventSource.Common.Associate.cs index b63eda98b6818..82d9e70f6eb5b 100644 --- a/src/libraries/Common/src/System/Net/Logging/NetEventSource.Common.Associate.cs +++ b/src/libraries/Common/src/System/Net/Logging/NetEventSource.Common.Associate.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Diagnostics.Tracing; +using System.Diagnostics; using System.Diagnostics.CodeAnalysis; +using System.Diagnostics.Tracing; using System.Runtime.CompilerServices; -using System.Diagnostics; namespace System.Net { diff --git a/src/libraries/Common/src/System/Net/Logging/NetEventSource.Common.DumpBuffer.cs b/src/libraries/Common/src/System/Net/Logging/NetEventSource.Common.DumpBuffer.cs index 8ddcaeb625315..522436249dad4 100644 --- a/src/libraries/Common/src/System/Net/Logging/NetEventSource.Common.DumpBuffer.cs +++ b/src/libraries/Common/src/System/Net/Logging/NetEventSource.Common.DumpBuffer.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Diagnostics.Tracing; using System.Diagnostics.CodeAnalysis; +using System.Diagnostics.Tracing; using System.Runtime.CompilerServices; namespace System.Net diff --git a/src/libraries/Common/src/System/Net/Security/CertificateHelper.cs b/src/libraries/Common/src/System/Net/Security/CertificateHelper.cs index e2bc4e7c6196c..94e89e4ae37b2 100644 --- a/src/libraries/Common/src/System/Net/Security/CertificateHelper.cs +++ b/src/libraries/Common/src/System/Net/Security/CertificateHelper.cs @@ -1,11 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Diagnostics; using System.Globalization; using System.Security.Cryptography; using System.Security.Cryptography.X509Certificates; +using Microsoft.Win32.SafeHandles; namespace System.Net.Security { diff --git a/src/libraries/Common/src/System/Net/Security/CertificateValidation.OSX.cs b/src/libraries/Common/src/System/Net/Security/CertificateValidation.OSX.cs index fbb5a80f9612e..aee4b77b50834 100644 --- a/src/libraries/Common/src/System/Net/Security/CertificateValidation.OSX.cs +++ b/src/libraries/Common/src/System/Net/Security/CertificateValidation.OSX.cs @@ -1,11 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Diagnostics; using System.Globalization; using System.Runtime.InteropServices; using System.Security.Cryptography.X509Certificates; +using Microsoft.Win32.SafeHandles; namespace System.Net.Security { diff --git a/src/libraries/Common/src/System/Net/Security/CertificateValidation.Unix.cs b/src/libraries/Common/src/System/Net/Security/CertificateValidation.Unix.cs index 02af97bde7486..65a1adb492fa2 100644 --- a/src/libraries/Common/src/System/Net/Security/CertificateValidation.Unix.cs +++ b/src/libraries/Common/src/System/Net/Security/CertificateValidation.Unix.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Diagnostics; using System.Globalization; using System.Security.Cryptography.X509Certificates; +using Microsoft.Win32.SafeHandles; namespace System.Net.Security { diff --git a/src/libraries/Common/src/System/Net/Security/CertificateValidation.Windows.cs b/src/libraries/Common/src/System/Net/Security/CertificateValidation.Windows.cs index 34dc3358e1e2b..d068015e534c4 100644 --- a/src/libraries/Common/src/System/Net/Security/CertificateValidation.Windows.cs +++ b/src/libraries/Common/src/System/Net/Security/CertificateValidation.Windows.cs @@ -1,13 +1,13 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Diagnostics; using System.Net.Security; using System.Runtime.InteropServices; using System.Security.Cryptography; using System.Security.Cryptography.X509Certificates; using System.Security.Principal; +using Microsoft.Win32.SafeHandles; namespace System.Net { diff --git a/src/libraries/Common/src/System/Net/Security/SecurityContextTokenHandle.cs b/src/libraries/Common/src/System/Net/Security/SecurityContextTokenHandle.cs index 754ef64c05540..aff224dbfbff0 100644 --- a/src/libraries/Common/src/System/Net/Security/SecurityContextTokenHandle.cs +++ b/src/libraries/Common/src/System/Net/Security/SecurityContextTokenHandle.cs @@ -1,9 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; - using System.Threading; +using Microsoft.Win32.SafeHandles; namespace System.Net.Security { diff --git a/src/libraries/Common/src/System/Net/Security/Unix/SafeDeleteSslContext.cs b/src/libraries/Common/src/System/Net/Security/Unix/SafeDeleteSslContext.cs index 0a870ef627327..9c1b74455387a 100644 --- a/src/libraries/Common/src/System/Net/Security/Unix/SafeDeleteSslContext.cs +++ b/src/libraries/Common/src/System/Net/Security/Unix/SafeDeleteSslContext.cs @@ -1,8 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; - using System.Diagnostics; using System.Net.Security; using System.Runtime.InteropServices; @@ -10,6 +8,7 @@ using System.Security.Authentication.ExtendedProtection; using System.Security.Cryptography; using System.Security.Cryptography.X509Certificates; +using Microsoft.Win32.SafeHandles; namespace System.Net.Security { diff --git a/src/libraries/Common/src/System/Resources/ResourceWriter.cs b/src/libraries/Common/src/System/Resources/ResourceWriter.cs index 11804d9e317c6..ab3052773cb2e 100644 --- a/src/libraries/Common/src/System/Resources/ResourceWriter.cs +++ b/src/libraries/Common/src/System/Resources/ResourceWriter.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.IO; -using System.Text; using System.Collections.Generic; using System.Diagnostics; +using System.IO; +using System.Text; namespace System.Resources #if RESOURCES_EXTENSIONS diff --git a/src/libraries/Common/src/System/Runtime/InteropServices/ComEventsMethod.cs b/src/libraries/Common/src/System/Runtime/InteropServices/ComEventsMethod.cs index 9ffd267a881a4..24edd51671502 100644 --- a/src/libraries/Common/src/System/Runtime/InteropServices/ComEventsMethod.cs +++ b/src/libraries/Common/src/System/Runtime/InteropServices/ComEventsMethod.cs @@ -3,8 +3,8 @@ using System.Collections.Generic; using System.Diagnostics; -using System.Threading; using System.Reflection; +using System.Threading; namespace System.Runtime.InteropServices { diff --git a/src/libraries/Common/src/System/Security/Cryptography/DSACng.ImportExport.cs b/src/libraries/Common/src/System/Security/Cryptography/DSACng.ImportExport.cs index c481a9479a660..31a2418f5e5ce 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/DSACng.ImportExport.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/DSACng.ImportExport.cs @@ -1,10 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Internal.Cryptography; using System.Buffers.Binary; using System.Diagnostics; - +using Internal.Cryptography; using static Interop.BCrypt; using static Interop.NCrypt; using KeyBlobMagicNumber = Interop.BCrypt.KeyBlobMagicNumber; diff --git a/src/libraries/Common/src/System/Security/Cryptography/DSACng.cs b/src/libraries/Common/src/System/Security/Cryptography/DSACng.cs index 200b33d018ab0..383e43534fd6f 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/DSACng.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/DSACng.cs @@ -1,11 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Internal.Cryptography; using System.Diagnostics; using System.IO; using System.Runtime.InteropServices; using System.Runtime.Versioning; +using Internal.Cryptography; namespace System.Security.Cryptography { diff --git a/src/libraries/Common/src/System/Security/Cryptography/ECAndroid.ImportExport.cs b/src/libraries/Common/src/System/Security/Cryptography/ECAndroid.ImportExport.cs index 6015d06387dfb..0eeeb3dabb435 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/ECAndroid.ImportExport.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/ECAndroid.ImportExport.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Diagnostics; +using Microsoft.Win32.SafeHandles; namespace System.Security.Cryptography { diff --git a/src/libraries/Common/src/System/Security/Cryptography/ECCng.ImportExport.cs b/src/libraries/Common/src/System/Security/Cryptography/ECCng.ImportExport.cs index dcd36ca435cdc..b80904aef0c52 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/ECCng.ImportExport.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/ECCng.ImportExport.cs @@ -1,15 +1,14 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Internal.Cryptography; -using Microsoft.Win32.SafeHandles; using System.Diagnostics; using System.Runtime.InteropServices; +using Internal.Cryptography; +using Microsoft.Win32.SafeHandles; using static Internal.NativeCrypto.BCryptNative; - +using BCRYPT_ECC_PARAMETER_HEADER = Interop.BCrypt.BCRYPT_ECC_PARAMETER_HEADER; using BCRYPT_ECCFULLKEY_BLOB = Interop.BCrypt.BCRYPT_ECCFULLKEY_BLOB; using BCRYPT_ECCKEY_BLOB = Interop.BCrypt.BCRYPT_ECCKEY_BLOB; -using BCRYPT_ECC_PARAMETER_HEADER = Interop.BCrypt.BCRYPT_ECC_PARAMETER_HEADER; using ErrorCode = Interop.NCrypt.ErrorCode; using KeyBlobMagicNumber = Interop.BCrypt.KeyBlobMagicNumber; diff --git a/src/libraries/Common/src/System/Security/Cryptography/ECDiffieHellmanAndroid.Derive.cs b/src/libraries/Common/src/System/Security/Cryptography/ECDiffieHellmanAndroid.Derive.cs index c3f9fbed2ae4b..67f59f65ae3a1 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/ECDiffieHellmanAndroid.Derive.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/ECDiffieHellmanAndroid.Derive.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Diagnostics; -using Microsoft.Win32.SafeHandles; using Internal.Cryptography; +using Microsoft.Win32.SafeHandles; namespace System.Security.Cryptography { diff --git a/src/libraries/Common/src/System/Security/Cryptography/ECDsaCng.SignVerify.cs b/src/libraries/Common/src/System/Security/Cryptography/ECDsaCng.SignVerify.cs index d177f8dccb2bd..6b40ace184099 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/ECDsaCng.SignVerify.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/ECDsaCng.SignVerify.cs @@ -2,11 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Diagnostics; - -using Microsoft.Win32.SafeHandles; - using Internal.Cryptography; - +using Microsoft.Win32.SafeHandles; using AsymmetricPaddingMode = Interop.NCrypt.AsymmetricPaddingMode; namespace System.Security.Cryptography diff --git a/src/libraries/Common/src/System/Security/Cryptography/ECOpenSsl.ImportExport.cs b/src/libraries/Common/src/System/Security/Cryptography/ECOpenSsl.ImportExport.cs index 9f2c31fa7aebf..bfa3ae2cec0aa 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/ECOpenSsl.ImportExport.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/ECOpenSsl.ImportExport.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Diagnostics; +using Microsoft.Win32.SafeHandles; namespace System.Security.Cryptography { diff --git a/src/libraries/Common/src/System/Security/Cryptography/Helpers.cs b/src/libraries/Common/src/System/Security/Cryptography/Helpers.cs index 27dc3a2e79674..0071c345d1d20 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/Helpers.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/Helpers.cs @@ -3,8 +3,8 @@ using System; using System.Diagnostics.CodeAnalysis; -using System.Security.Cryptography; using System.Runtime.Versioning; +using System.Security.Cryptography; namespace Internal.Cryptography { diff --git a/src/libraries/Common/src/System/Security/Cryptography/RSACng.EncryptDecrypt.cs b/src/libraries/Common/src/System/Security/Cryptography/RSACng.EncryptDecrypt.cs index 00a5bf607380b..84a18777929af 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/RSACng.EncryptDecrypt.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/RSACng.EncryptDecrypt.cs @@ -2,12 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Runtime.InteropServices; -using Microsoft.Win32.SafeHandles; using Internal.Cryptography; - -using ErrorCode = Interop.NCrypt.ErrorCode; +using Microsoft.Win32.SafeHandles; using AsymmetricPaddingMode = Interop.NCrypt.AsymmetricPaddingMode; using BCRYPT_OAEP_PADDING_INFO = Interop.BCrypt.BCRYPT_OAEP_PADDING_INFO; +using ErrorCode = Interop.NCrypt.ErrorCode; namespace System.Security.Cryptography { diff --git a/src/libraries/Common/src/System/Security/Cryptography/RSACng.SignVerify.cs b/src/libraries/Common/src/System/Security/Cryptography/RSACng.SignVerify.cs index 3b8ad78f470e9..8e1b7910d3ca4 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/RSACng.SignVerify.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/RSACng.SignVerify.cs @@ -4,9 +4,8 @@ using System.Collections.Concurrent; using System.Collections.Generic; using System.Runtime.InteropServices; -using Microsoft.Win32.SafeHandles; using Internal.Cryptography; - +using Microsoft.Win32.SafeHandles; using AsymmetricPaddingMode = Interop.NCrypt.AsymmetricPaddingMode; using BCRYPT_PKCS1_PADDING_INFO = Interop.BCrypt.BCRYPT_PKCS1_PADDING_INFO; using BCRYPT_PSS_PADDING_INFO = Interop.BCrypt.BCRYPT_PSS_PADDING_INFO; diff --git a/src/libraries/Common/src/System/Security/Cryptography/RSAOpenSsl.cs b/src/libraries/Common/src/System/Security/Cryptography/RSAOpenSsl.cs index 34ad612323f2d..7e6efbb2da57a 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/RSAOpenSsl.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/RSAOpenSsl.cs @@ -8,8 +8,8 @@ using System.IO; using System.Runtime.Versioning; using System.Security.Cryptography.Asn1; -using Microsoft.Win32.SafeHandles; using Internal.Cryptography; +using Microsoft.Win32.SafeHandles; namespace System.Security.Cryptography { diff --git a/src/libraries/Common/src/System/Security/Cryptography/SP800108HmacCounterKdfImplementationCng.cs b/src/libraries/Common/src/System/Security/Cryptography/SP800108HmacCounterKdfImplementationCng.cs index 46143f15c86ac..e02a47a072ada 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/SP800108HmacCounterKdfImplementationCng.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/SP800108HmacCounterKdfImplementationCng.cs @@ -1,9 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Diagnostics; - +using Microsoft.Win32.SafeHandles; using BCryptBuffer = Interop.BCrypt.BCryptBuffer; using CngBufferDescriptors = Interop.BCrypt.CngBufferDescriptors; using NTSTATUS = Interop.BCrypt.NTSTATUS; diff --git a/src/libraries/Common/src/System/Security/Cryptography/SP800108HmacCounterKdfImplementationManaged.cs b/src/libraries/Common/src/System/Security/Cryptography/SP800108HmacCounterKdfImplementationManaged.cs index c009b69ebd9af..f7928c6925158 100644 --- a/src/libraries/Common/src/System/Security/Cryptography/SP800108HmacCounterKdfImplementationManaged.cs +++ b/src/libraries/Common/src/System/Security/Cryptography/SP800108HmacCounterKdfImplementationManaged.cs @@ -3,8 +3,8 @@ using System.Buffers.Binary; using System.Diagnostics; -using System.Threading; using System.Runtime.Versioning; +using System.Threading; #pragma warning disable CA1513 diff --git a/src/libraries/Common/src/System/Text/DBCSDecoder.cs b/src/libraries/Common/src/System/Text/DBCSDecoder.cs index daf78fc064362..bc7fe7db110dc 100644 --- a/src/libraries/Common/src/System/Text/DBCSDecoder.cs +++ b/src/libraries/Common/src/System/Text/DBCSDecoder.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Text; using System.Diagnostics; +using System.Text; namespace System.Text { diff --git a/src/libraries/Common/src/System/Text/OSEncoder.cs b/src/libraries/Common/src/System/Text/OSEncoder.cs index 1bc859827649f..ea6755250fdeb 100644 --- a/src/libraries/Common/src/System/Text/OSEncoder.cs +++ b/src/libraries/Common/src/System/Text/OSEncoder.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Text; using System.Diagnostics; +using System.Text; namespace System.Text { diff --git a/src/libraries/Common/src/System/Text/OSEncoding.Windows.cs b/src/libraries/Common/src/System/Text/OSEncoding.Windows.cs index c7ead4c54e3dd..fc3f866ec96a6 100644 --- a/src/libraries/Common/src/System/Text/OSEncoding.Windows.cs +++ b/src/libraries/Common/src/System/Text/OSEncoding.Windows.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Text; using System.Collections.Generic; +using System.Text; namespace System.Text { diff --git a/src/libraries/Common/tests/System/IO/Compression/CompressionStreamUnitTestBase.cs b/src/libraries/Common/tests/System/IO/Compression/CompressionStreamUnitTestBase.cs index 17ec46fe78be0..4bda844873bcb 100644 --- a/src/libraries/Common/tests/System/IO/Compression/CompressionStreamUnitTestBase.cs +++ b/src/libraries/Common/tests/System/IO/Compression/CompressionStreamUnitTestBase.cs @@ -13,6 +13,35 @@ public abstract class CompressionStreamUnitTestBase : CompressionStreamTestBase { private const int TaskTimeout = 30 * 1000; // Generous timeout for official test runs + [Fact] + public async Task EmptyWritesAreEquivalentToNoWrites() + { + var dest = new MemoryStream(); + + CreateStream(dest, CompressionMode.Compress, leaveOpen: true).Dispose(); + long noWritesLength = dest.Length; + + dest.Position = 0; + using (Stream compress = CreateStream(dest, CompressionMode.Compress, leaveOpen: true)) + { + compress.Write(new byte[1], 0, 0); + compress.Write(ReadOnlySpan.Empty); + await compress.WriteAsync(new byte[1], 0, 0); + await compress.WriteAsync(ReadOnlyMemory.Empty); + } + + Assert.Equal(noWritesLength, dest.Length); + } + + [Fact] + public void EmptyStreamDecompresses() + { + using (Stream decompress = CreateStream(new MemoryStream(), CompressionMode.Decompress)) + { + Assert.Equal(-1, decompress.ReadByte()); + } + } + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))] public virtual void FlushAsync_DuringWriteAsync() { diff --git a/src/libraries/Microsoft.Bcl.Cryptography/src/System/Security/Cryptography/NetStandardShims.cs b/src/libraries/Microsoft.Bcl.Cryptography/src/System/Security/Cryptography/NetStandardShims.cs index 63cd4cd5e09cb..4dc6e7b867d7e 100644 --- a/src/libraries/Microsoft.Bcl.Cryptography/src/System/Security/Cryptography/NetStandardShims.cs +++ b/src/libraries/Microsoft.Bcl.Cryptography/src/System/Security/Cryptography/NetStandardShims.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Text; using System.Runtime.CompilerServices; +using System.Text; namespace System.Security.Cryptography { diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/BinderHelper.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/BinderHelper.cs index 9feac5c18c13e..cc35f5c8be47e 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/BinderHelper.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/BinderHelper.cs @@ -4,14 +4,14 @@ using System; using System.Collections.Generic; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Dynamic; using System.Linq; using System.Linq.Expressions; -using System.Runtime.InteropServices; -using System.Reflection; using System.Numerics.Hashing; +using System.Reflection; +using System.Runtime.InteropServices; using Microsoft.CSharp.RuntimeBinder.Errors; -using System.Diagnostics.CodeAnalysis; namespace Microsoft.CSharp.RuntimeBinder { diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ComClassMetaObject.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ComClassMetaObject.cs index ee0e2f5b75b31..e0b28ceba180a 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ComClassMetaObject.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ComClassMetaObject.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Dynamic; using System.Diagnostics.CodeAnalysis; +using System.Dynamic; using System.Linq.Expressions; namespace Microsoft.CSharp.RuntimeBinder.ComInterop diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ComTypeLibDesc.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ComTypeLibDesc.cs index 3ea0065d2612c..13b731d1abb65 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ComTypeLibDesc.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ComTypeLibDesc.cs @@ -3,8 +3,8 @@ using System; using System.Collections.Generic; -using System.Dynamic; using System.Diagnostics.CodeAnalysis; +using System.Dynamic; using System.Globalization; using System.Linq.Expressions; using System.Runtime.InteropServices; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ExcepInfo.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ExcepInfo.cs index 0426df6712f4d..7d65926d813c9 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ExcepInfo.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/ExcepInfo.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Diagnostics.CodeAnalysis; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Reflection; using System.Runtime.InteropServices; using ComTypes = System.Runtime.InteropServices.ComTypes; diff --git a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/IDispatchComObject.cs b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/IDispatchComObject.cs index 2e9b32f350cca..5e1f62f83d7c0 100644 --- a/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/IDispatchComObject.cs +++ b/src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/ComInterop/IDispatchComObject.cs @@ -7,8 +7,8 @@ using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Dynamic; -using System.Linq.Expressions; using System.Globalization; +using System.Linq.Expressions; using System.Reflection; using System.Runtime.InteropServices; using ComTypes = System.Runtime.InteropServices.ComTypes; diff --git a/src/libraries/Microsoft.Extensions.Configuration/src/ConfigurationReloadToken.cs b/src/libraries/Microsoft.Extensions.Configuration/src/ConfigurationReloadToken.cs index 97ab47bf41bcc..8168a93dcafe6 100644 --- a/src/libraries/Microsoft.Extensions.Configuration/src/ConfigurationReloadToken.cs +++ b/src/libraries/Microsoft.Extensions.Configuration/src/ConfigurationReloadToken.cs @@ -3,8 +3,8 @@ using System; using System.Threading; -using Microsoft.Extensions.Primitives; using Microsoft.Extensions.Internal; +using Microsoft.Extensions.Primitives; namespace Microsoft.Extensions.Configuration { diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection.Specification.Tests/src/Fakes/FakeDisposableCallbackOuterService.cs b/src/libraries/Microsoft.Extensions.DependencyInjection.Specification.Tests/src/Fakes/FakeDisposableCallbackOuterService.cs index bc00b305a06ff..84563ada0ccf0 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection.Specification.Tests/src/Fakes/FakeDisposableCallbackOuterService.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection.Specification.Tests/src/Fakes/FakeDisposableCallbackOuterService.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Linq; using System.Collections.Generic; +using System.Linq; namespace Microsoft.Extensions.DependencyInjection.Specification.Fakes { diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection.Specification.Tests/src/KeyedDependencyInjectionSpecificationTests.cs b/src/libraries/Microsoft.Extensions.DependencyInjection.Specification.Tests/src/KeyedDependencyInjectionSpecificationTests.cs index a0dc73d58f820..f7da106dc8ab9 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection.Specification.Tests/src/KeyedDependencyInjectionSpecificationTests.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection.Specification.Tests/src/KeyedDependencyInjectionSpecificationTests.cs @@ -2,10 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using Xunit; -using Microsoft.Extensions.DependencyInjection.Specification.Fakes; using System.Linq; using System.Security.Cryptography; +using Microsoft.Extensions.DependencyInjection.Specification.Fakes; +using Xunit; namespace Microsoft.Extensions.DependencyInjection.Specification { diff --git a/src/libraries/Microsoft.Extensions.DependencyModel/src/CollectionExtensions.cs b/src/libraries/Microsoft.Extensions.DependencyModel/src/CollectionExtensions.cs index a9a06f71c97bc..fb60063299e81 100644 --- a/src/libraries/Microsoft.Extensions.DependencyModel/src/CollectionExtensions.cs +++ b/src/libraries/Microsoft.Extensions.DependencyModel/src/CollectionExtensions.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Extensions.DependencyModel; using System.Linq; +using Microsoft.Extensions.DependencyModel; namespace System.Collections.Generic { diff --git a/src/libraries/Microsoft.Extensions.DependencyModel/src/CollectionExtensions.netcoreapp.cs b/src/libraries/Microsoft.Extensions.DependencyModel/src/CollectionExtensions.netcoreapp.cs index 988e97939cffc..60c5a3fce0292 100644 --- a/src/libraries/Microsoft.Extensions.DependencyModel/src/CollectionExtensions.netcoreapp.cs +++ b/src/libraries/Microsoft.Extensions.DependencyModel/src/CollectionExtensions.netcoreapp.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Extensions.DependencyModel; using System.Linq; +using Microsoft.Extensions.DependencyModel; namespace System.Collections.Generic { diff --git a/src/libraries/Microsoft.Extensions.DependencyModel/src/Library.cs b/src/libraries/Microsoft.Extensions.DependencyModel/src/Library.cs index 65852d4183584..f100d002c660d 100644 --- a/src/libraries/Microsoft.Extensions.DependencyModel/src/Library.cs +++ b/src/libraries/Microsoft.Extensions.DependencyModel/src/Library.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Linq; using System.Collections.Generic; +using System.Linq; namespace Microsoft.Extensions.DependencyModel { diff --git a/src/libraries/Microsoft.Extensions.DependencyModel/src/RuntimeAssetGroup.cs b/src/libraries/Microsoft.Extensions.DependencyModel/src/RuntimeAssetGroup.cs index 39a0b5b629c45..88c893471f7e9 100644 --- a/src/libraries/Microsoft.Extensions.DependencyModel/src/RuntimeAssetGroup.cs +++ b/src/libraries/Microsoft.Extensions.DependencyModel/src/RuntimeAssetGroup.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Linq; using System.Collections.Generic; +using System.Linq; namespace Microsoft.Extensions.DependencyModel { diff --git a/src/libraries/Microsoft.Extensions.Diagnostics/src/Metrics/MetricsServiceExtensions.cs b/src/libraries/Microsoft.Extensions.Diagnostics/src/Metrics/MetricsServiceExtensions.cs index 47fa1e0dee819..c779a0afef95c 100644 --- a/src/libraries/Microsoft.Extensions.Diagnostics/src/Metrics/MetricsServiceExtensions.cs +++ b/src/libraries/Microsoft.Extensions.Diagnostics/src/Metrics/MetricsServiceExtensions.cs @@ -1,12 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System; +using System.Diagnostics.Metrics; using Microsoft.Extensions.DependencyInjection.Extensions; using Microsoft.Extensions.Diagnostics.Metrics; using Microsoft.Extensions.Diagnostics.Metrics.Configuration; using Microsoft.Extensions.Options; -using System; -using System.Diagnostics.Metrics; namespace Microsoft.Extensions.DependencyInjection { diff --git a/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/IHostedLifecycleService.cs b/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/IHostedLifecycleService.cs index 114308606e80f..0e9c30d73de70 100644 --- a/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/IHostedLifecycleService.cs +++ b/src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/IHostedLifecycleService.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Threading.Tasks; using System.Threading; +using System.Threading.Tasks; namespace Microsoft.Extensions.Hosting { diff --git a/src/libraries/Microsoft.Extensions.Logging.Console/src/SimpleConsoleFormatter.cs b/src/libraries/Microsoft.Extensions.Logging.Console/src/SimpleConsoleFormatter.cs index c75c6236288c3..308c831dd2ea8 100644 --- a/src/libraries/Microsoft.Extensions.Logging.Console/src/SimpleConsoleFormatter.cs +++ b/src/libraries/Microsoft.Extensions.Logging.Console/src/SimpleConsoleFormatter.cs @@ -4,9 +4,9 @@ using System; using System.Diagnostics.CodeAnalysis; using System.IO; +using System.Runtime.InteropServices; using Microsoft.Extensions.Logging.Abstractions; using Microsoft.Extensions.Options; -using System.Runtime.InteropServices; namespace Microsoft.Extensions.Logging.Console { diff --git a/src/libraries/Microsoft.Extensions.Logging.Debug/src/DebugLoggerFactoryExtensions.cs b/src/libraries/Microsoft.Extensions.Logging.Debug/src/DebugLoggerFactoryExtensions.cs index 179c27ed80586..025bcb64460ac 100644 --- a/src/libraries/Microsoft.Extensions.Logging.Debug/src/DebugLoggerFactoryExtensions.cs +++ b/src/libraries/Microsoft.Extensions.Logging.Debug/src/DebugLoggerFactoryExtensions.cs @@ -1,11 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System; +using System.ComponentModel; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection.Extensions; using Microsoft.Extensions.Logging.Debug; -using System; -using System.ComponentModel; namespace Microsoft.Extensions.Logging { diff --git a/src/libraries/Microsoft.Extensions.Logging.EventLog/src/WindowsEventLog.cs b/src/libraries/Microsoft.Extensions.Logging.EventLog/src/WindowsEventLog.cs index a43f74614a70a..c6f4d7567e2c0 100644 --- a/src/libraries/Microsoft.Extensions.Logging.EventLog/src/WindowsEventLog.cs +++ b/src/libraries/Microsoft.Extensions.Logging.EventLog/src/WindowsEventLog.cs @@ -3,8 +3,8 @@ using System; using System.Diagnostics; -using System.Security; using System.Runtime.Versioning; +using System.Security; namespace Microsoft.Extensions.Logging.EventLog { diff --git a/src/libraries/Microsoft.Extensions.Logging/src/LoggerFactoryScopeProvider.cs b/src/libraries/Microsoft.Extensions.Logging/src/LoggerFactoryScopeProvider.cs index 5e2bfeb9b306b..4d9c2f5244e6c 100644 --- a/src/libraries/Microsoft.Extensions.Logging/src/LoggerFactoryScopeProvider.cs +++ b/src/libraries/Microsoft.Extensions.Logging/src/LoggerFactoryScopeProvider.cs @@ -2,11 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Text; -using System.Threading; using System.Collections; -using System.Diagnostics; using System.Collections.Generic; +using System.Diagnostics; +using System.Text; +using System.Threading; namespace Microsoft.Extensions.Logging { diff --git a/src/libraries/Microsoft.Extensions.Logging/src/LoggingServiceCollectionExtensions.cs b/src/libraries/Microsoft.Extensions.Logging/src/LoggingServiceCollectionExtensions.cs index e9f15e2804de3..eb324bd8bb5b0 100644 --- a/src/libraries/Microsoft.Extensions.Logging/src/LoggingServiceCollectionExtensions.cs +++ b/src/libraries/Microsoft.Extensions.Logging/src/LoggingServiceCollectionExtensions.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using Microsoft.Extensions.Logging; using Microsoft.Extensions.DependencyInjection.Extensions; +using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; namespace Microsoft.Extensions.DependencyInjection diff --git a/src/libraries/Microsoft.Extensions.Options/gen/Emitter.cs b/src/libraries/Microsoft.Extensions.Options/gen/Emitter.cs index bafb09781608b..467edba76d373 100644 --- a/src/libraries/Microsoft.Extensions.Options/gen/Emitter.cs +++ b/src/libraries/Microsoft.Extensions.Options/gen/Emitter.cs @@ -374,12 +374,83 @@ public void EmitCompareAttribute(string modifier, string prefix, string classNam """); } - public void EmitRangeAttribute(string modifier, string prefix, string className, string suffix) + public void EmitRangeAttribute(string modifier, string prefix, string className, string suffix, bool emitTimeSpanSupport) { OutGeneratedCodeAttribute(); string qualifiedClassName = $"{prefix}{suffix}_{className}"; + string initializationString = emitTimeSpanSupport ? + """ + if (OperandType == typeof(global::System.TimeSpan)) + { + if (!global::System.TimeSpan.TryParse((string)Minimum, culture, out global::System.TimeSpan timeSpanMinimum) || + !global::System.TimeSpan.TryParse((string)Maximum, culture, out global::System.TimeSpan timeSpanMaximum)) + { + throw new global::System.InvalidOperationException(c_minMaxError); + } + Minimum = timeSpanMinimum; + Maximum = timeSpanMaximum; + } + else + { + Minimum = ConvertValue(Minimum, culture) ?? throw new global::System.InvalidOperationException(c_minMaxError); + Maximum = ConvertValue(Maximum, culture) ?? throw new global::System.InvalidOperationException(c_minMaxError); + } + """ + : + """ + Minimum = ConvertValue(Minimum, culture) ?? throw new global::System.InvalidOperationException(c_minMaxError); + Maximum = ConvertValue(Maximum, culture) ?? throw new global::System.InvalidOperationException(c_minMaxError); + """; + + string convertValue = emitTimeSpanSupport ? + """ + if (OperandType == typeof(global::System.TimeSpan)) + { + if (value is global::System.TimeSpan) + { + convertedValue = value; + } + else if (value is string) + { + if (!global::System.TimeSpan.TryParse((string)value, formatProvider, out global::System.TimeSpan timeSpanValue)) + { + return false; + } + convertedValue = timeSpanValue; + } + else + { + throw new global::System.InvalidOperationException($"A value type {value.GetType()} that is not a TimeSpan or a string has been given. This might indicate a problem with the source generator."); + } + } + else + { + try + { + convertedValue = ConvertValue(value, formatProvider); + } + catch (global::System.Exception e) when (e is global::System.FormatException or global::System.InvalidCastException or global::System.NotSupportedException) + { + return false; + } + } + """ + : + """ + try + { + convertedValue = ConvertValue(value, formatProvider); + } + catch (global::System.Exception e) when (e is global::System.FormatException or global::System.InvalidCastException or global::System.NotSupportedException) + { + return false; + } + """; + + + OutLn($$""" [global::System.AttributeUsage(global::System.AttributeTargets.Property | global::System.AttributeTargets.Field | global::System.AttributeTargets.Parameter, AllowMultiple = false)] {{modifier}} class {{qualifiedClassName}} : {{StaticValidationAttributeType}} @@ -414,19 +485,20 @@ public override string FormatErrorMessage(string name) => string.Format(global::System.Globalization.CultureInfo.CurrentCulture, GetValidationErrorMessage(), name, Minimum, Maximum); private bool NeedToConvertMinMax { get; } private bool Initialized { get; set; } + private const string c_minMaxError = "The minimum and maximum values must be set to valid values."; + public override bool IsValid(object? value) { if (!Initialized) { if (Minimum is null || Maximum is null) { - throw new global::System.InvalidOperationException("The minimum and maximum values must be set to valid values."); + throw new global::System.InvalidOperationException(c_minMaxError); } if (NeedToConvertMinMax) { System.Globalization.CultureInfo culture = ParseLimitsInInvariantCulture ? global::System.Globalization.CultureInfo.InvariantCulture : global::System.Globalization.CultureInfo.CurrentCulture; - Minimum = ConvertValue(Minimum, culture) ?? throw new global::System.InvalidOperationException("The minimum and maximum values must be set to valid values."); - Maximum = ConvertValue(Maximum, culture) ?? throw new global::System.InvalidOperationException("The minimum and maximum values must be set to valid values."); +{{initializationString}} } int cmp = ((global::System.IComparable)Minimum).CompareTo((global::System.IComparable)Maximum); if (cmp > 0) @@ -448,14 +520,7 @@ public override bool IsValid(object? value) System.Globalization.CultureInfo formatProvider = ConvertValueInInvariantCulture ? global::System.Globalization.CultureInfo.InvariantCulture : global::System.Globalization.CultureInfo.CurrentCulture; object? convertedValue; - try - { - convertedValue = ConvertValue(value, formatProvider); - } - catch (global::System.Exception e) when (e is global::System.FormatException or global::System.InvalidCastException or global::System.NotSupportedException) - { - return false; - } +{{convertValue}} var min = (global::System.IComparable)Minimum; var max = (global::System.IComparable)Maximum; @@ -574,7 +639,7 @@ private void GenValidationAttributesClasses() } else if (attributeData.Key == _symbolHolder.RangeAttributeSymbol.Name) { - EmitRangeAttribute(_optionsSourceGenContext.ClassModifier, Emitter.StaticAttributeClassNamePrefix, attributeData.Key, _optionsSourceGenContext.Suffix); + EmitRangeAttribute(_optionsSourceGenContext.ClassModifier, Emitter.StaticAttributeClassNamePrefix, attributeData.Key, _optionsSourceGenContext.Suffix, attributeData.Value is not null); } } diff --git a/src/libraries/Microsoft.Extensions.Options/gen/Parser.cs b/src/libraries/Microsoft.Extensions.Options/gen/Parser.cs index ab2c19de81923..8a88ec6f2f4e6 100644 --- a/src/libraries/Microsoft.Extensions.Options/gen/Parser.cs +++ b/src/libraries/Microsoft.Extensions.Options/gen/Parser.cs @@ -624,10 +624,21 @@ private void TrackCompareAttributeForSubstitution(AttributeData attribute, IType private void TrackRangeAttributeForSubstitution(AttributeData attribute, ITypeSymbol memberType, ref string attributeFullQualifiedName) { ImmutableArray constructorParameters = attribute.AttributeConstructor?.Parameters ?? ImmutableArray.Empty; - SpecialType argumentSpecialType = SpecialType.None; + ITypeSymbol? argumentType = null; + bool hasTimeSpanType = false; + + ITypeSymbol typeSymbol = memberType; + if (typeSymbol.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T) + { + typeSymbol = ((INamedTypeSymbol)typeSymbol).TypeArguments[0]; + } + if (constructorParameters.Length == 2) { - argumentSpecialType = constructorParameters[0].Type.SpecialType; + if (OptionsSourceGenContext.IsConvertibleBasicType(typeSymbol)) + { + argumentType = constructorParameters[0].Type; + } } else if (constructorParameters.Length == 3) { @@ -641,23 +652,25 @@ private void TrackRangeAttributeForSubstitution(AttributeData attribute, ITypeSy } } - if (argumentValue is INamedTypeSymbol namedTypeSymbol && OptionsSourceGenContext.IsConvertibleBasicType(namedTypeSymbol)) + if (argumentValue is INamedTypeSymbol namedTypeSymbol) { - argumentSpecialType = namedTypeSymbol.SpecialType; + // When type is provided as a parameter, it has to match the property type. + if (OptionsSourceGenContext.IsConvertibleBasicType(namedTypeSymbol) && typeSymbol.SpecialType == namedTypeSymbol.SpecialType) + { + argumentType = namedTypeSymbol; + } + else if (SymbolEqualityComparer.Default.Equals(namedTypeSymbol, _symbolHolder.TimeSpanSymbol) && + (SymbolEqualityComparer.Default.Equals(typeSymbol, _symbolHolder.TimeSpanSymbol) || typeSymbol.SpecialType == SpecialType.System_String)) + { + hasTimeSpanType = true; + argumentType = _symbolHolder.TimeSpanSymbol; + } } } - ITypeSymbol typeSymbol = memberType; - if (typeSymbol.OriginalDefinition.SpecialType == SpecialType.System_Nullable_T) - { - typeSymbol = ((INamedTypeSymbol)typeSymbol).TypeArguments[0]; - } - - if (argumentSpecialType != SpecialType.None && - OptionsSourceGenContext.IsConvertibleBasicType(typeSymbol) && - (constructorParameters.Length != 3 || typeSymbol.SpecialType == argumentSpecialType)) // When type is provided as a parameter, it has to match the property type. + if (argumentType is not null) { - _optionsSourceGenContext.EnsureTrackingAttribute(attribute.AttributeClass!.Name, createValue: false, out _); + _optionsSourceGenContext.EnsureTrackingAttribute(attribute.AttributeClass!.Name, createValue: hasTimeSpanType, out _); attributeFullQualifiedName = $"{Emitter.StaticGeneratedValidationAttributesClassesNamespace}.{Emitter.StaticAttributeClassNamePrefix}{_optionsSourceGenContext.Suffix}_{attribute.AttributeClass!.Name}"; } } diff --git a/src/libraries/Microsoft.Extensions.Options/gen/SymbolHolder.cs b/src/libraries/Microsoft.Extensions.Options/gen/SymbolHolder.cs index 3447a07d39830..8e7073f8ec218 100644 --- a/src/libraries/Microsoft.Extensions.Options/gen/SymbolHolder.cs +++ b/src/libraries/Microsoft.Extensions.Options/gen/SymbolHolder.cs @@ -23,6 +23,7 @@ internal sealed record class SymbolHolder( INamedTypeSymbol IValidatableObjectSymbol, INamedTypeSymbol GenericIEnumerableSymbol, INamedTypeSymbol TypeSymbol, + INamedTypeSymbol TimeSpanSymbol, INamedTypeSymbol ValidateObjectMembersAttributeSymbol, INamedTypeSymbol ValidateEnumeratedItemsAttributeSymbol); } diff --git a/src/libraries/Microsoft.Extensions.Options/gen/SymbolLoader.cs b/src/libraries/Microsoft.Extensions.Options/gen/SymbolLoader.cs index ea55622892975..5be4932d8d6c4 100644 --- a/src/libraries/Microsoft.Extensions.Options/gen/SymbolLoader.cs +++ b/src/libraries/Microsoft.Extensions.Options/gen/SymbolLoader.cs @@ -19,6 +19,7 @@ internal static class SymbolLoader internal const string IValidatableObjectType = "System.ComponentModel.DataAnnotations.IValidatableObject"; internal const string IValidateOptionsType = "Microsoft.Extensions.Options.IValidateOptions`1"; internal const string TypeOfType = "System.Type"; + internal const string TimeSpanType = "System.TimeSpan"; internal const string ValidateObjectMembersAttribute = "Microsoft.Extensions.Options.ValidateObjectMembersAttribute"; internal const string ValidateEnumeratedItemsAttribute = "Microsoft.Extensions.Options.ValidateEnumeratedItemsAttribute"; internal const string GenericIEnumerableType = "System.Collections.Generic.IEnumerable`1"; @@ -42,6 +43,7 @@ public static bool TryLoad(Compilation compilation, out SymbolHolder? symbolHold var validateOptionsSymbol = GetSymbol(IValidateOptionsType); var genericIEnumerableSymbol = GetSymbol(GenericIEnumerableType); var typeSymbol = GetSymbol(TypeOfType); + var timeSpanSymbol = GetSymbol(TimeSpanType); var validateObjectMembersAttribute = GetSymbol(ValidateObjectMembersAttribute); var validateEnumeratedItemsAttribute = GetSymbol(ValidateEnumeratedItemsAttribute); var unconditionalSuppressMessageAttributeSymbol = GetSymbol(UnconditionalSuppressMessageAttributeType); @@ -70,6 +72,7 @@ public static bool TryLoad(Compilation compilation, out SymbolHolder? symbolHold validateOptionsSymbol == null || genericIEnumerableSymbol == null || typeSymbol == null || + timeSpanSymbol == null || validateObjectMembersAttribute == null || validateEnumeratedItemsAttribute == null) { @@ -93,6 +96,7 @@ public static bool TryLoad(Compilation compilation, out SymbolHolder? symbolHold ivalidatableObjectSymbol, genericIEnumerableSymbol, typeSymbol, + timeSpanSymbol, validateObjectMembersAttribute, validateEnumeratedItemsAttribute); diff --git a/src/libraries/Microsoft.Extensions.Options/tests/SourceGeneration.Unit.Tests/Baselines/EmitterWithCustomValidator.netcore.g.cs b/src/libraries/Microsoft.Extensions.Options/tests/SourceGeneration.Unit.Tests/Baselines/EmitterWithCustomValidator.netcore.g.cs index 2c5af12c5b5f2..38bacf966df05 100644 --- a/src/libraries/Microsoft.Extensions.Options/tests/SourceGeneration.Unit.Tests/Baselines/EmitterWithCustomValidator.netcore.g.cs +++ b/src/libraries/Microsoft.Extensions.Options/tests/SourceGeneration.Unit.Tests/Baselines/EmitterWithCustomValidator.netcore.g.cs @@ -99,19 +99,21 @@ public override string FormatErrorMessage(string name) => string.Format(global::System.Globalization.CultureInfo.CurrentCulture, GetValidationErrorMessage(), name, Minimum, Maximum); private bool NeedToConvertMinMax { get; } private bool Initialized { get; set; } + private const string c_minMaxError = "The minimum and maximum values must be set to valid values."; + public override bool IsValid(object? value) { if (!Initialized) { if (Minimum is null || Maximum is null) { - throw new global::System.InvalidOperationException("The minimum and maximum values must be set to valid values."); + throw new global::System.InvalidOperationException(c_minMaxError); } if (NeedToConvertMinMax) { System.Globalization.CultureInfo culture = ParseLimitsInInvariantCulture ? global::System.Globalization.CultureInfo.InvariantCulture : global::System.Globalization.CultureInfo.CurrentCulture; - Minimum = ConvertValue(Minimum, culture) ?? throw new global::System.InvalidOperationException("The minimum and maximum values must be set to valid values."); - Maximum = ConvertValue(Maximum, culture) ?? throw new global::System.InvalidOperationException("The minimum and maximum values must be set to valid values."); + Minimum = ConvertValue(Minimum, culture) ?? throw new global::System.InvalidOperationException(c_minMaxError); + Maximum = ConvertValue(Maximum, culture) ?? throw new global::System.InvalidOperationException(c_minMaxError); } int cmp = ((global::System.IComparable)Minimum).CompareTo((global::System.IComparable)Maximum); if (cmp > 0) diff --git a/src/libraries/Microsoft.Extensions.Options/tests/SourceGeneration.Unit.Tests/Baselines/EmitterWithCustomValidator.netfx.g.cs b/src/libraries/Microsoft.Extensions.Options/tests/SourceGeneration.Unit.Tests/Baselines/EmitterWithCustomValidator.netfx.g.cs index 9dc3ded5bd462..fe77e3e6bd924 100644 --- a/src/libraries/Microsoft.Extensions.Options/tests/SourceGeneration.Unit.Tests/Baselines/EmitterWithCustomValidator.netfx.g.cs +++ b/src/libraries/Microsoft.Extensions.Options/tests/SourceGeneration.Unit.Tests/Baselines/EmitterWithCustomValidator.netfx.g.cs @@ -97,19 +97,21 @@ public override string FormatErrorMessage(string name) => string.Format(global::System.Globalization.CultureInfo.CurrentCulture, GetValidationErrorMessage(), name, Minimum, Maximum); private bool NeedToConvertMinMax { get; } private bool Initialized { get; set; } + private const string c_minMaxError = "The minimum and maximum values must be set to valid values."; + public override bool IsValid(object? value) { if (!Initialized) { if (Minimum is null || Maximum is null) { - throw new global::System.InvalidOperationException("The minimum and maximum values must be set to valid values."); + throw new global::System.InvalidOperationException(c_minMaxError); } if (NeedToConvertMinMax) { System.Globalization.CultureInfo culture = ParseLimitsInInvariantCulture ? global::System.Globalization.CultureInfo.InvariantCulture : global::System.Globalization.CultureInfo.CurrentCulture; - Minimum = ConvertValue(Minimum, culture) ?? throw new global::System.InvalidOperationException("The minimum and maximum values must be set to valid values."); - Maximum = ConvertValue(Maximum, culture) ?? throw new global::System.InvalidOperationException("The minimum and maximum values must be set to valid values."); + Minimum = ConvertValue(Minimum, culture) ?? throw new global::System.InvalidOperationException(c_minMaxError); + Maximum = ConvertValue(Maximum, culture) ?? throw new global::System.InvalidOperationException(c_minMaxError); } int cmp = ((global::System.IComparable)Minimum).CompareTo((global::System.IComparable)Maximum); if (cmp > 0) diff --git a/src/libraries/Microsoft.Extensions.Options/tests/SourceGeneration.Unit.Tests/Baselines/GeneratedAttributesTest.netcore.lang10.g.cs b/src/libraries/Microsoft.Extensions.Options/tests/SourceGeneration.Unit.Tests/Baselines/GeneratedAttributesTest.netcore.lang10.g.cs index cc9864a2619c4..7cf1fe61e1a94 100644 --- a/src/libraries/Microsoft.Extensions.Options/tests/SourceGeneration.Unit.Tests/Baselines/GeneratedAttributesTest.netcore.lang10.g.cs +++ b/src/libraries/Microsoft.Extensions.Options/tests/SourceGeneration.Unit.Tests/Baselines/GeneratedAttributesTest.netcore.lang10.g.cs @@ -150,6 +150,26 @@ partial class OptionsUsingGeneratedAttributesValidator (builder ??= new()).AddResults(validationResults); } + context.MemberName = "P13"; + context.DisplayName = string.IsNullOrEmpty(name) ? "OptionsUsingGeneratedAttributes.P13" : $"{name}.P13"; + validationResults.Clear(); + validationAttributes.Clear(); + validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes_2C497155.A6); + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P13, context, validationResults, validationAttributes)) + { + (builder ??= new()).AddResults(validationResults); + } + + context.MemberName = "P14"; + context.DisplayName = string.IsNullOrEmpty(name) ? "OptionsUsingGeneratedAttributes.P14" : $"{name}.P14"; + validationResults.Clear(); + validationAttributes.Clear(); + validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes_2C497155.A7); + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P14, context, validationResults, validationAttributes)) + { + (builder ??= new()).AddResults(validationResults); + } + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } @@ -175,6 +195,16 @@ internal static class __Attributes_2C497155 internal static readonly __OptionValidationGeneratedAttributes.__SourceGen__2C497155_CompareAttribute A5 = new __OptionValidationGeneratedAttributes.__SourceGen__2C497155_CompareAttribute( "P5"); + + internal static readonly __OptionValidationGeneratedAttributes.__SourceGen__2C497155_RangeAttribute A6 = new __OptionValidationGeneratedAttributes.__SourceGen__2C497155_RangeAttribute( + typeof(global::System.TimeSpan), + "00:00:00", + "23:59:59"); + + internal static readonly __OptionValidationGeneratedAttributes.__SourceGen__2C497155_RangeAttribute A7 = new __OptionValidationGeneratedAttributes.__SourceGen__2C497155_RangeAttribute( + typeof(global::System.TimeSpan), + "01:00:00", + "23:59:59"); } } namespace __OptionValidationStaticInstances @@ -395,19 +425,34 @@ public override string FormatErrorMessage(string name) => string.Format(global::System.Globalization.CultureInfo.CurrentCulture, GetValidationErrorMessage(), name, Minimum, Maximum); private bool NeedToConvertMinMax { get; } private bool Initialized { get; set; } + private const string c_minMaxError = "The minimum and maximum values must be set to valid values."; + public override bool IsValid(object? value) { if (!Initialized) { if (Minimum is null || Maximum is null) { - throw new global::System.InvalidOperationException("The minimum and maximum values must be set to valid values."); + throw new global::System.InvalidOperationException(c_minMaxError); } if (NeedToConvertMinMax) { System.Globalization.CultureInfo culture = ParseLimitsInInvariantCulture ? global::System.Globalization.CultureInfo.InvariantCulture : global::System.Globalization.CultureInfo.CurrentCulture; - Minimum = ConvertValue(Minimum, culture) ?? throw new global::System.InvalidOperationException("The minimum and maximum values must be set to valid values."); - Maximum = ConvertValue(Maximum, culture) ?? throw new global::System.InvalidOperationException("The minimum and maximum values must be set to valid values."); + if (OperandType == typeof(global::System.TimeSpan)) + { + if (!global::System.TimeSpan.TryParse((string)Minimum, culture, out global::System.TimeSpan timeSpanMinimum) || + !global::System.TimeSpan.TryParse((string)Maximum, culture, out global::System.TimeSpan timeSpanMaximum)) + { + throw new global::System.InvalidOperationException(c_minMaxError); + } + Minimum = timeSpanMinimum; + Maximum = timeSpanMaximum; + } + else + { + Minimum = ConvertValue(Minimum, culture) ?? throw new global::System.InvalidOperationException(c_minMaxError); + Maximum = ConvertValue(Maximum, culture) ?? throw new global::System.InvalidOperationException(c_minMaxError); + } } int cmp = ((global::System.IComparable)Minimum).CompareTo((global::System.IComparable)Maximum); if (cmp > 0) @@ -429,13 +474,35 @@ public override bool IsValid(object? value) System.Globalization.CultureInfo formatProvider = ConvertValueInInvariantCulture ? global::System.Globalization.CultureInfo.InvariantCulture : global::System.Globalization.CultureInfo.CurrentCulture; object? convertedValue; - try + if (OperandType == typeof(global::System.TimeSpan)) { - convertedValue = ConvertValue(value, formatProvider); + if (value is global::System.TimeSpan) + { + convertedValue = value; + } + else if (value is string) + { + if (!global::System.TimeSpan.TryParse((string)value, formatProvider, out global::System.TimeSpan timeSpanValue)) + { + return false; + } + convertedValue = timeSpanValue; + } + else + { + throw new global::System.InvalidOperationException($"A value type {value.GetType()} that is not a TimeSpan or a string has been given. This might indicate a problem with the source generator."); + } } - catch (global::System.Exception e) when (e is global::System.FormatException or global::System.InvalidCastException or global::System.NotSupportedException) + else { - return false; + try + { + convertedValue = ConvertValue(value, formatProvider); + } + catch (global::System.Exception e) when (e is global::System.FormatException or global::System.InvalidCastException or global::System.NotSupportedException) + { + return false; + } } var min = (global::System.IComparable)Minimum; diff --git a/src/libraries/Microsoft.Extensions.Options/tests/SourceGeneration.Unit.Tests/Baselines/GeneratedAttributesTest.netcore.lang11.g.cs b/src/libraries/Microsoft.Extensions.Options/tests/SourceGeneration.Unit.Tests/Baselines/GeneratedAttributesTest.netcore.lang11.g.cs index 2a33e51b0b617..f7bba04603342 100644 --- a/src/libraries/Microsoft.Extensions.Options/tests/SourceGeneration.Unit.Tests/Baselines/GeneratedAttributesTest.netcore.lang11.g.cs +++ b/src/libraries/Microsoft.Extensions.Options/tests/SourceGeneration.Unit.Tests/Baselines/GeneratedAttributesTest.netcore.lang11.g.cs @@ -150,6 +150,26 @@ partial class OptionsUsingGeneratedAttributesValidator (builder ??= new()).AddResults(validationResults); } + context.MemberName = "P13"; + context.DisplayName = string.IsNullOrEmpty(name) ? "OptionsUsingGeneratedAttributes.P13" : $"{name}.P13"; + validationResults.Clear(); + validationAttributes.Clear(); + validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A6); + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P13, context, validationResults, validationAttributes)) + { + (builder ??= new()).AddResults(validationResults); + } + + context.MemberName = "P14"; + context.DisplayName = string.IsNullOrEmpty(name) ? "OptionsUsingGeneratedAttributes.P14" : $"{name}.P14"; + validationResults.Clear(); + validationAttributes.Clear(); + validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A7); + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P14, context, validationResults, validationAttributes)) + { + (builder ??= new()).AddResults(validationResults); + } + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } @@ -175,6 +195,16 @@ file static class __Attributes internal static readonly __OptionValidationGeneratedAttributes.__SourceGen__CompareAttribute A5 = new __OptionValidationGeneratedAttributes.__SourceGen__CompareAttribute( "P5"); + + internal static readonly __OptionValidationGeneratedAttributes.__SourceGen__RangeAttribute A6 = new __OptionValidationGeneratedAttributes.__SourceGen__RangeAttribute( + typeof(global::System.TimeSpan), + "00:00:00", + "23:59:59"); + + internal static readonly __OptionValidationGeneratedAttributes.__SourceGen__RangeAttribute A7 = new __OptionValidationGeneratedAttributes.__SourceGen__RangeAttribute( + typeof(global::System.TimeSpan), + "01:00:00", + "23:59:59"); } } namespace __OptionValidationStaticInstances @@ -395,19 +425,34 @@ public override string FormatErrorMessage(string name) => string.Format(global::System.Globalization.CultureInfo.CurrentCulture, GetValidationErrorMessage(), name, Minimum, Maximum); private bool NeedToConvertMinMax { get; } private bool Initialized { get; set; } + private const string c_minMaxError = "The minimum and maximum values must be set to valid values."; + public override bool IsValid(object? value) { if (!Initialized) { if (Minimum is null || Maximum is null) { - throw new global::System.InvalidOperationException("The minimum and maximum values must be set to valid values."); + throw new global::System.InvalidOperationException(c_minMaxError); } if (NeedToConvertMinMax) { System.Globalization.CultureInfo culture = ParseLimitsInInvariantCulture ? global::System.Globalization.CultureInfo.InvariantCulture : global::System.Globalization.CultureInfo.CurrentCulture; - Minimum = ConvertValue(Minimum, culture) ?? throw new global::System.InvalidOperationException("The minimum and maximum values must be set to valid values."); - Maximum = ConvertValue(Maximum, culture) ?? throw new global::System.InvalidOperationException("The minimum and maximum values must be set to valid values."); + if (OperandType == typeof(global::System.TimeSpan)) + { + if (!global::System.TimeSpan.TryParse((string)Minimum, culture, out global::System.TimeSpan timeSpanMinimum) || + !global::System.TimeSpan.TryParse((string)Maximum, culture, out global::System.TimeSpan timeSpanMaximum)) + { + throw new global::System.InvalidOperationException(c_minMaxError); + } + Minimum = timeSpanMinimum; + Maximum = timeSpanMaximum; + } + else + { + Minimum = ConvertValue(Minimum, culture) ?? throw new global::System.InvalidOperationException(c_minMaxError); + Maximum = ConvertValue(Maximum, culture) ?? throw new global::System.InvalidOperationException(c_minMaxError); + } } int cmp = ((global::System.IComparable)Minimum).CompareTo((global::System.IComparable)Maximum); if (cmp > 0) @@ -429,13 +474,35 @@ public override bool IsValid(object? value) System.Globalization.CultureInfo formatProvider = ConvertValueInInvariantCulture ? global::System.Globalization.CultureInfo.InvariantCulture : global::System.Globalization.CultureInfo.CurrentCulture; object? convertedValue; - try + if (OperandType == typeof(global::System.TimeSpan)) { - convertedValue = ConvertValue(value, formatProvider); + if (value is global::System.TimeSpan) + { + convertedValue = value; + } + else if (value is string) + { + if (!global::System.TimeSpan.TryParse((string)value, formatProvider, out global::System.TimeSpan timeSpanValue)) + { + return false; + } + convertedValue = timeSpanValue; + } + else + { + throw new global::System.InvalidOperationException($"A value type {value.GetType()} that is not a TimeSpan or a string has been given. This might indicate a problem with the source generator."); + } } - catch (global::System.Exception e) when (e is global::System.FormatException or global::System.InvalidCastException or global::System.NotSupportedException) + else { - return false; + try + { + convertedValue = ConvertValue(value, formatProvider); + } + catch (global::System.Exception e) when (e is global::System.FormatException or global::System.InvalidCastException or global::System.NotSupportedException) + { + return false; + } } var min = (global::System.IComparable)Minimum; diff --git a/src/libraries/Microsoft.Extensions.Options/tests/SourceGeneration.Unit.Tests/Baselines/GeneratedAttributesTest.netfx.lang10.g.cs b/src/libraries/Microsoft.Extensions.Options/tests/SourceGeneration.Unit.Tests/Baselines/GeneratedAttributesTest.netfx.lang10.g.cs index 7f5eb90a20281..4b28eb159d147 100644 --- a/src/libraries/Microsoft.Extensions.Options/tests/SourceGeneration.Unit.Tests/Baselines/GeneratedAttributesTest.netfx.lang10.g.cs +++ b/src/libraries/Microsoft.Extensions.Options/tests/SourceGeneration.Unit.Tests/Baselines/GeneratedAttributesTest.netfx.lang10.g.cs @@ -118,6 +118,26 @@ partial class OptionsUsingGeneratedAttributesValidator (builder ??= new()).AddResults(validationResults); } + context.MemberName = "P13"; + context.DisplayName = string.IsNullOrEmpty(name) ? "OptionsUsingGeneratedAttributes.P13" : $"{name}.P13"; + validationResults.Clear(); + validationAttributes.Clear(); + validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes_2C497155.A5); + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P13, context, validationResults, validationAttributes)) + { + (builder ??= new()).AddResults(validationResults); + } + + context.MemberName = "P14"; + context.DisplayName = string.IsNullOrEmpty(name) ? "OptionsUsingGeneratedAttributes.P14" : $"{name}.P14"; + validationResults.Clear(); + validationAttributes.Clear(); + validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes_2C497155.A6); + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P14, context, validationResults, validationAttributes)) + { + (builder ??= new()).AddResults(validationResults); + } + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } @@ -139,6 +159,16 @@ internal static class __Attributes_2C497155 internal static readonly __OptionValidationGeneratedAttributes.__SourceGen__2C497155_CompareAttribute A4 = new __OptionValidationGeneratedAttributes.__SourceGen__2C497155_CompareAttribute( "P5"); + + internal static readonly __OptionValidationGeneratedAttributes.__SourceGen__2C497155_RangeAttribute A5 = new __OptionValidationGeneratedAttributes.__SourceGen__2C497155_RangeAttribute( + typeof(global::System.TimeSpan), + "00:00:00", + "23:59:59"); + + internal static readonly __OptionValidationGeneratedAttributes.__SourceGen__2C497155_RangeAttribute A6 = new __OptionValidationGeneratedAttributes.__SourceGen__2C497155_RangeAttribute( + typeof(global::System.TimeSpan), + "01:00:00", + "23:59:59"); } } namespace __OptionValidationStaticInstances @@ -310,19 +340,34 @@ public override string FormatErrorMessage(string name) => string.Format(global::System.Globalization.CultureInfo.CurrentCulture, GetValidationErrorMessage(), name, Minimum, Maximum); private bool NeedToConvertMinMax { get; } private bool Initialized { get; set; } + private const string c_minMaxError = "The minimum and maximum values must be set to valid values."; + public override bool IsValid(object? value) { if (!Initialized) { if (Minimum is null || Maximum is null) { - throw new global::System.InvalidOperationException("The minimum and maximum values must be set to valid values."); + throw new global::System.InvalidOperationException(c_minMaxError); } if (NeedToConvertMinMax) { System.Globalization.CultureInfo culture = ParseLimitsInInvariantCulture ? global::System.Globalization.CultureInfo.InvariantCulture : global::System.Globalization.CultureInfo.CurrentCulture; - Minimum = ConvertValue(Minimum, culture) ?? throw new global::System.InvalidOperationException("The minimum and maximum values must be set to valid values."); - Maximum = ConvertValue(Maximum, culture) ?? throw new global::System.InvalidOperationException("The minimum and maximum values must be set to valid values."); + if (OperandType == typeof(global::System.TimeSpan)) + { + if (!global::System.TimeSpan.TryParse((string)Minimum, culture, out global::System.TimeSpan timeSpanMinimum) || + !global::System.TimeSpan.TryParse((string)Maximum, culture, out global::System.TimeSpan timeSpanMaximum)) + { + throw new global::System.InvalidOperationException(c_minMaxError); + } + Minimum = timeSpanMinimum; + Maximum = timeSpanMaximum; + } + else + { + Minimum = ConvertValue(Minimum, culture) ?? throw new global::System.InvalidOperationException(c_minMaxError); + Maximum = ConvertValue(Maximum, culture) ?? throw new global::System.InvalidOperationException(c_minMaxError); + } } int cmp = ((global::System.IComparable)Minimum).CompareTo((global::System.IComparable)Maximum); if (cmp > 0) @@ -344,13 +389,35 @@ public override bool IsValid(object? value) System.Globalization.CultureInfo formatProvider = ConvertValueInInvariantCulture ? global::System.Globalization.CultureInfo.InvariantCulture : global::System.Globalization.CultureInfo.CurrentCulture; object? convertedValue; - try + if (OperandType == typeof(global::System.TimeSpan)) { - convertedValue = ConvertValue(value, formatProvider); + if (value is global::System.TimeSpan) + { + convertedValue = value; + } + else if (value is string) + { + if (!global::System.TimeSpan.TryParse((string)value, formatProvider, out global::System.TimeSpan timeSpanValue)) + { + return false; + } + convertedValue = timeSpanValue; + } + else + { + throw new global::System.InvalidOperationException($"A value type {value.GetType()} that is not a TimeSpan or a string has been given. This might indicate a problem with the source generator."); + } } - catch (global::System.Exception e) when (e is global::System.FormatException or global::System.InvalidCastException or global::System.NotSupportedException) + else { - return false; + try + { + convertedValue = ConvertValue(value, formatProvider); + } + catch (global::System.Exception e) when (e is global::System.FormatException or global::System.InvalidCastException or global::System.NotSupportedException) + { + return false; + } } var min = (global::System.IComparable)Minimum; diff --git a/src/libraries/Microsoft.Extensions.Options/tests/SourceGeneration.Unit.Tests/Baselines/GeneratedAttributesTest.netfx.lang11.g.cs b/src/libraries/Microsoft.Extensions.Options/tests/SourceGeneration.Unit.Tests/Baselines/GeneratedAttributesTest.netfx.lang11.g.cs index 3ab56e21320a0..4c300abc6d05b 100644 --- a/src/libraries/Microsoft.Extensions.Options/tests/SourceGeneration.Unit.Tests/Baselines/GeneratedAttributesTest.netfx.lang11.g.cs +++ b/src/libraries/Microsoft.Extensions.Options/tests/SourceGeneration.Unit.Tests/Baselines/GeneratedAttributesTest.netfx.lang11.g.cs @@ -118,6 +118,26 @@ partial class OptionsUsingGeneratedAttributesValidator (builder ??= new()).AddResults(validationResults); } + context.MemberName = "P13"; + context.DisplayName = string.IsNullOrEmpty(name) ? "OptionsUsingGeneratedAttributes.P13" : $"{name}.P13"; + validationResults.Clear(); + validationAttributes.Clear(); + validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A5); + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P13, context, validationResults, validationAttributes)) + { + (builder ??= new()).AddResults(validationResults); + } + + context.MemberName = "P14"; + context.DisplayName = string.IsNullOrEmpty(name) ? "OptionsUsingGeneratedAttributes.P14" : $"{name}.P14"; + validationResults.Clear(); + validationAttributes.Clear(); + validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A6); + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P14, context, validationResults, validationAttributes)) + { + (builder ??= new()).AddResults(validationResults); + } + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); } } @@ -139,6 +159,16 @@ file static class __Attributes internal static readonly __OptionValidationGeneratedAttributes.__SourceGen__CompareAttribute A4 = new __OptionValidationGeneratedAttributes.__SourceGen__CompareAttribute( "P5"); + + internal static readonly __OptionValidationGeneratedAttributes.__SourceGen__RangeAttribute A5 = new __OptionValidationGeneratedAttributes.__SourceGen__RangeAttribute( + typeof(global::System.TimeSpan), + "00:00:00", + "23:59:59"); + + internal static readonly __OptionValidationGeneratedAttributes.__SourceGen__RangeAttribute A6 = new __OptionValidationGeneratedAttributes.__SourceGen__RangeAttribute( + typeof(global::System.TimeSpan), + "01:00:00", + "23:59:59"); } } namespace __OptionValidationStaticInstances @@ -310,19 +340,34 @@ public override string FormatErrorMessage(string name) => string.Format(global::System.Globalization.CultureInfo.CurrentCulture, GetValidationErrorMessage(), name, Minimum, Maximum); private bool NeedToConvertMinMax { get; } private bool Initialized { get; set; } + private const string c_minMaxError = "The minimum and maximum values must be set to valid values."; + public override bool IsValid(object? value) { if (!Initialized) { if (Minimum is null || Maximum is null) { - throw new global::System.InvalidOperationException("The minimum and maximum values must be set to valid values."); + throw new global::System.InvalidOperationException(c_minMaxError); } if (NeedToConvertMinMax) { System.Globalization.CultureInfo culture = ParseLimitsInInvariantCulture ? global::System.Globalization.CultureInfo.InvariantCulture : global::System.Globalization.CultureInfo.CurrentCulture; - Minimum = ConvertValue(Minimum, culture) ?? throw new global::System.InvalidOperationException("The minimum and maximum values must be set to valid values."); - Maximum = ConvertValue(Maximum, culture) ?? throw new global::System.InvalidOperationException("The minimum and maximum values must be set to valid values."); + if (OperandType == typeof(global::System.TimeSpan)) + { + if (!global::System.TimeSpan.TryParse((string)Minimum, culture, out global::System.TimeSpan timeSpanMinimum) || + !global::System.TimeSpan.TryParse((string)Maximum, culture, out global::System.TimeSpan timeSpanMaximum)) + { + throw new global::System.InvalidOperationException(c_minMaxError); + } + Minimum = timeSpanMinimum; + Maximum = timeSpanMaximum; + } + else + { + Minimum = ConvertValue(Minimum, culture) ?? throw new global::System.InvalidOperationException(c_minMaxError); + Maximum = ConvertValue(Maximum, culture) ?? throw new global::System.InvalidOperationException(c_minMaxError); + } } int cmp = ((global::System.IComparable)Minimum).CompareTo((global::System.IComparable)Maximum); if (cmp > 0) @@ -344,13 +389,35 @@ public override bool IsValid(object? value) System.Globalization.CultureInfo formatProvider = ConvertValueInInvariantCulture ? global::System.Globalization.CultureInfo.InvariantCulture : global::System.Globalization.CultureInfo.CurrentCulture; object? convertedValue; - try + if (OperandType == typeof(global::System.TimeSpan)) { - convertedValue = ConvertValue(value, formatProvider); + if (value is global::System.TimeSpan) + { + convertedValue = value; + } + else if (value is string) + { + if (!global::System.TimeSpan.TryParse((string)value, formatProvider, out global::System.TimeSpan timeSpanValue)) + { + return false; + } + convertedValue = timeSpanValue; + } + else + { + throw new global::System.InvalidOperationException($"A value type {value.GetType()} that is not a TimeSpan or a string has been given. This might indicate a problem with the source generator."); + } } - catch (global::System.Exception e) when (e is global::System.FormatException or global::System.InvalidCastException or global::System.NotSupportedException) + else { - return false; + try + { + convertedValue = ConvertValue(value, formatProvider); + } + catch (global::System.Exception e) when (e is global::System.FormatException or global::System.InvalidCastException or global::System.NotSupportedException) + { + return false; + } } var min = (global::System.IComparable)Minimum; diff --git a/src/libraries/Microsoft.Extensions.Options/tests/SourceGeneration.Unit.Tests/Main.cs b/src/libraries/Microsoft.Extensions.Options/tests/SourceGeneration.Unit.Tests/Main.cs index 623251707f87b..c72be0d72c2c0 100644 --- a/src/libraries/Microsoft.Extensions.Options/tests/SourceGeneration.Unit.Tests/Main.cs +++ b/src/libraries/Microsoft.Extensions.Options/tests/SourceGeneration.Unit.Tests/Main.cs @@ -1731,6 +1731,7 @@ public async Task GeneratedAttributesTest(LanguageVersion languageVersion) #endif //NETCOREAPP string source = $$""" + using System; using System.Collections.Generic; using Microsoft.Extensions.Options; using System.ComponentModel.DataAnnotations; @@ -1782,6 +1783,12 @@ public class OptionsUsingGeneratedAttributes [MaxLengthAttribute(5)] public List? P12 { get; set; } + + [RangeAttribute(typeof(TimeSpan), "00:00:00", "23:59:59")] + public string? P13 { get; set; } + + [RangeAttribute(typeof(TimeSpan), "01:00:00", "23:59:59")] + public TimeSpan P14 { get; set; } } [OptionsValidator] diff --git a/src/libraries/Microsoft.Extensions.Options/tests/SourceGenerationTests/Baselines/NetCoreApp/Validators.g.cs b/src/libraries/Microsoft.Extensions.Options/tests/SourceGenerationTests/Baselines/NetCoreApp/Validators.g.cs index 956cae26e90f6..93c101431004c 100644 --- a/src/libraries/Microsoft.Extensions.Options/tests/SourceGenerationTests/Baselines/NetCoreApp/Validators.g.cs +++ b/src/libraries/Microsoft.Extensions.Options/tests/SourceGenerationTests/Baselines/NetCoreApp/Validators.g.cs @@ -1721,6 +1721,68 @@ partial class MultipleAttributeModelValidator } } namespace TestClasses.OptionsValidation +{ + partial class OptionsUsingRangeWithTimeSpanValidator + { + /// + /// Validates a specific named options instance (or all when is ). + /// + /// The name of the options instance being validated. + /// The options instance. + /// Validation result. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] + [System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessage("Trimming", "IL2026:RequiresUnreferencedCode", + Justification = "The created ValidationContext object is used in a way that never call reflection")] + public global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::TestClasses.OptionsValidation.OptionsUsingRangeWithTimeSpan options) + { + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; + var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); + var validationResults = new global::System.Collections.Generic.List(); + var validationAttributes = new global::System.Collections.Generic.List(1); + + context.MemberName = "P1"; + context.DisplayName = string.IsNullOrEmpty(name) ? "OptionsUsingRangeWithTimeSpan.P1" : $"{name}.P1"; + validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A19); + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P1, context, validationResults, validationAttributes)) + { + (builder ??= new()).AddResults(validationResults); + } + + context.MemberName = "P2"; + context.DisplayName = string.IsNullOrEmpty(name) ? "OptionsUsingRangeWithTimeSpan.P2" : $"{name}.P2"; + validationResults.Clear(); + validationAttributes.Clear(); + validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A19); + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P2, context, validationResults, validationAttributes)) + { + (builder ??= new()).AddResults(validationResults); + } + + context.MemberName = "P3"; + context.DisplayName = string.IsNullOrEmpty(name) ? "OptionsUsingRangeWithTimeSpan.P3" : $"{name}.P3"; + validationResults.Clear(); + validationAttributes.Clear(); + validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A19); + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P3, context, validationResults, validationAttributes)) + { + (builder ??= new()).AddResults(validationResults); + } + + context.MemberName = "P4"; + context.DisplayName = string.IsNullOrEmpty(name) ? "OptionsUsingRangeWithTimeSpan.P4" : $"{name}.P4"; + validationResults.Clear(); + validationAttributes.Clear(); + validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A19); + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P4, context, validationResults, validationAttributes)) + { + (builder ??= new()).AddResults(validationResults); + } + + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); + } + } +} +namespace TestClasses.OptionsValidation { partial class RangeAttributeModelDateValidator { @@ -1742,7 +1804,7 @@ partial class RangeAttributeModelDateValidator context.MemberName = "Val"; context.DisplayName = string.IsNullOrEmpty(name) ? "RangeAttributeModelDate.Val" : $"{name}.Val"; - validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A19); + validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A20); if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Val, context, validationResults, validationAttributes)) { (builder ??= new()).AddResults(validationResults); @@ -1838,7 +1900,7 @@ partial class RegularExpressionAttributeModelValidator context.MemberName = "Val"; context.DisplayName = string.IsNullOrEmpty(name) ? "RegularExpressionAttributeModel.Val" : $"{name}.Val"; - validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A20); + validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A21); if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Val, context, validationResults, validationAttributes)) { (builder ??= new()).AddResults(validationResults); @@ -2039,6 +2101,11 @@ file static class __Attributes (int)9); internal static readonly __OptionValidationGeneratedAttributes.__SourceGen__RangeAttribute A19 = new __OptionValidationGeneratedAttributes.__SourceGen__RangeAttribute( + typeof(global::System.TimeSpan), + "00:00:00", + "00:00:10"); + + internal static readonly __OptionValidationGeneratedAttributes.__SourceGen__RangeAttribute A20 = new __OptionValidationGeneratedAttributes.__SourceGen__RangeAttribute( typeof(global::System.DateTime), "1/2/2004", "3/4/2004") @@ -2046,7 +2113,7 @@ file static class __Attributes ParseLimitsInInvariantCulture = true }; - internal static readonly global::System.ComponentModel.DataAnnotations.RegularExpressionAttribute A20 = new global::System.ComponentModel.DataAnnotations.RegularExpressionAttribute( + internal static readonly global::System.ComponentModel.DataAnnotations.RegularExpressionAttribute A21 = new global::System.ComponentModel.DataAnnotations.RegularExpressionAttribute( "\\s"); } } @@ -2143,19 +2210,34 @@ public override string FormatErrorMessage(string name) => string.Format(global::System.Globalization.CultureInfo.CurrentCulture, GetValidationErrorMessage(), name, Minimum, Maximum); private bool NeedToConvertMinMax { get; } private bool Initialized { get; set; } + private const string c_minMaxError = "The minimum and maximum values must be set to valid values."; + public override bool IsValid(object? value) { if (!Initialized) { if (Minimum is null || Maximum is null) { - throw new global::System.InvalidOperationException("The minimum and maximum values must be set to valid values."); + throw new global::System.InvalidOperationException(c_minMaxError); } if (NeedToConvertMinMax) { System.Globalization.CultureInfo culture = ParseLimitsInInvariantCulture ? global::System.Globalization.CultureInfo.InvariantCulture : global::System.Globalization.CultureInfo.CurrentCulture; - Minimum = ConvertValue(Minimum, culture) ?? throw new global::System.InvalidOperationException("The minimum and maximum values must be set to valid values."); - Maximum = ConvertValue(Maximum, culture) ?? throw new global::System.InvalidOperationException("The minimum and maximum values must be set to valid values."); + if (OperandType == typeof(global::System.TimeSpan)) + { + if (!global::System.TimeSpan.TryParse((string)Minimum, culture, out global::System.TimeSpan timeSpanMinimum) || + !global::System.TimeSpan.TryParse((string)Maximum, culture, out global::System.TimeSpan timeSpanMaximum)) + { + throw new global::System.InvalidOperationException(c_minMaxError); + } + Minimum = timeSpanMinimum; + Maximum = timeSpanMaximum; + } + else + { + Minimum = ConvertValue(Minimum, culture) ?? throw new global::System.InvalidOperationException(c_minMaxError); + Maximum = ConvertValue(Maximum, culture) ?? throw new global::System.InvalidOperationException(c_minMaxError); + } } int cmp = ((global::System.IComparable)Minimum).CompareTo((global::System.IComparable)Maximum); if (cmp > 0) @@ -2177,13 +2259,35 @@ public override bool IsValid(object? value) System.Globalization.CultureInfo formatProvider = ConvertValueInInvariantCulture ? global::System.Globalization.CultureInfo.InvariantCulture : global::System.Globalization.CultureInfo.CurrentCulture; object? convertedValue; - try + if (OperandType == typeof(global::System.TimeSpan)) { - convertedValue = ConvertValue(value, formatProvider); + if (value is global::System.TimeSpan) + { + convertedValue = value; + } + else if (value is string) + { + if (!global::System.TimeSpan.TryParse((string)value, formatProvider, out global::System.TimeSpan timeSpanValue)) + { + return false; + } + convertedValue = timeSpanValue; + } + else + { + throw new global::System.InvalidOperationException($"A value type {value.GetType()} that is not a TimeSpan or a string has been given. This might indicate a problem with the source generator."); + } } - catch (global::System.Exception e) when (e is global::System.FormatException or global::System.InvalidCastException or global::System.NotSupportedException) + else { - return false; + try + { + convertedValue = ConvertValue(value, formatProvider); + } + catch (global::System.Exception e) when (e is global::System.FormatException or global::System.InvalidCastException or global::System.NotSupportedException) + { + return false; + } } var min = (global::System.IComparable)Minimum; diff --git a/src/libraries/Microsoft.Extensions.Options/tests/SourceGenerationTests/Baselines/NetFX/Validators.g.cs b/src/libraries/Microsoft.Extensions.Options/tests/SourceGenerationTests/Baselines/NetFX/Validators.g.cs index faae7d62d9c41..3c9f86fd84f8a 100644 --- a/src/libraries/Microsoft.Extensions.Options/tests/SourceGenerationTests/Baselines/NetFX/Validators.g.cs +++ b/src/libraries/Microsoft.Extensions.Options/tests/SourceGenerationTests/Baselines/NetFX/Validators.g.cs @@ -1637,6 +1637,66 @@ partial class MultipleAttributeModelValidator } } namespace TestClasses.OptionsValidation +{ + partial class OptionsUsingRangeWithTimeSpanValidator + { + /// + /// Validates a specific named options instance (or all when is ). + /// + /// The name of the options instance being validated. + /// The options instance. + /// Validation result. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Extensions.Options.SourceGeneration", "42.42.42.42")] + public global::Microsoft.Extensions.Options.ValidateOptionsResult Validate(string? name, global::TestClasses.OptionsValidation.OptionsUsingRangeWithTimeSpan options) + { + global::Microsoft.Extensions.Options.ValidateOptionsResultBuilder? builder = null; + var context = new global::System.ComponentModel.DataAnnotations.ValidationContext(options); + var validationResults = new global::System.Collections.Generic.List(); + var validationAttributes = new global::System.Collections.Generic.List(1); + + context.MemberName = "P1"; + context.DisplayName = string.IsNullOrEmpty(name) ? "OptionsUsingRangeWithTimeSpan.P1" : $"{name}.P1"; + validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A19); + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P1, context, validationResults, validationAttributes)) + { + (builder ??= new()).AddResults(validationResults); + } + + context.MemberName = "P2"; + context.DisplayName = string.IsNullOrEmpty(name) ? "OptionsUsingRangeWithTimeSpan.P2" : $"{name}.P2"; + validationResults.Clear(); + validationAttributes.Clear(); + validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A19); + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P2, context, validationResults, validationAttributes)) + { + (builder ??= new()).AddResults(validationResults); + } + + context.MemberName = "P3"; + context.DisplayName = string.IsNullOrEmpty(name) ? "OptionsUsingRangeWithTimeSpan.P3" : $"{name}.P3"; + validationResults.Clear(); + validationAttributes.Clear(); + validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A19); + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P3, context, validationResults, validationAttributes)) + { + (builder ??= new()).AddResults(validationResults); + } + + context.MemberName = "P4"; + context.DisplayName = string.IsNullOrEmpty(name) ? "OptionsUsingRangeWithTimeSpan.P4" : $"{name}.P4"; + validationResults.Clear(); + validationAttributes.Clear(); + validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A19); + if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.P4, context, validationResults, validationAttributes)) + { + (builder ??= new()).AddResults(validationResults); + } + + return builder is null ? global::Microsoft.Extensions.Options.ValidateOptionsResult.Success : builder.Build(); + } + } +} +namespace TestClasses.OptionsValidation { partial class RangeAttributeModelDateValidator { @@ -1746,7 +1806,7 @@ partial class RegularExpressionAttributeModelValidator context.MemberName = "Val"; context.DisplayName = string.IsNullOrEmpty(name) ? "RegularExpressionAttributeModel.Val" : $"{name}.Val"; - validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A19); + validationAttributes.Add(global::__OptionValidationStaticInstances.__Attributes.A20); if (!global::System.ComponentModel.DataAnnotations.Validator.TryValidateValue(options.Val, context, validationResults, validationAttributes)) { (builder ??= new()).AddResults(validationResults); @@ -1940,7 +2000,12 @@ file static class __Attributes (int)5, (int)9); - internal static readonly global::System.ComponentModel.DataAnnotations.RegularExpressionAttribute A19 = new global::System.ComponentModel.DataAnnotations.RegularExpressionAttribute( + internal static readonly __OptionValidationGeneratedAttributes.__SourceGen__RangeAttribute A19 = new __OptionValidationGeneratedAttributes.__SourceGen__RangeAttribute( + typeof(global::System.TimeSpan), + "00:00:00", + "00:00:10"); + + internal static readonly global::System.ComponentModel.DataAnnotations.RegularExpressionAttribute A20 = new global::System.ComponentModel.DataAnnotations.RegularExpressionAttribute( "\\s"); } } @@ -2037,19 +2102,34 @@ public override string FormatErrorMessage(string name) => string.Format(global::System.Globalization.CultureInfo.CurrentCulture, GetValidationErrorMessage(), name, Minimum, Maximum); private bool NeedToConvertMinMax { get; } private bool Initialized { get; set; } + private const string c_minMaxError = "The minimum and maximum values must be set to valid values."; + public override bool IsValid(object? value) { if (!Initialized) { if (Minimum is null || Maximum is null) { - throw new global::System.InvalidOperationException("The minimum and maximum values must be set to valid values."); + throw new global::System.InvalidOperationException(c_minMaxError); } if (NeedToConvertMinMax) { System.Globalization.CultureInfo culture = ParseLimitsInInvariantCulture ? global::System.Globalization.CultureInfo.InvariantCulture : global::System.Globalization.CultureInfo.CurrentCulture; - Minimum = ConvertValue(Minimum, culture) ?? throw new global::System.InvalidOperationException("The minimum and maximum values must be set to valid values."); - Maximum = ConvertValue(Maximum, culture) ?? throw new global::System.InvalidOperationException("The minimum and maximum values must be set to valid values."); + if (OperandType == typeof(global::System.TimeSpan)) + { + if (!global::System.TimeSpan.TryParse((string)Minimum, culture, out global::System.TimeSpan timeSpanMinimum) || + !global::System.TimeSpan.TryParse((string)Maximum, culture, out global::System.TimeSpan timeSpanMaximum)) + { + throw new global::System.InvalidOperationException(c_minMaxError); + } + Minimum = timeSpanMinimum; + Maximum = timeSpanMaximum; + } + else + { + Minimum = ConvertValue(Minimum, culture) ?? throw new global::System.InvalidOperationException(c_minMaxError); + Maximum = ConvertValue(Maximum, culture) ?? throw new global::System.InvalidOperationException(c_minMaxError); + } } int cmp = ((global::System.IComparable)Minimum).CompareTo((global::System.IComparable)Maximum); if (cmp > 0) @@ -2071,13 +2151,35 @@ public override bool IsValid(object? value) System.Globalization.CultureInfo formatProvider = ConvertValueInInvariantCulture ? global::System.Globalization.CultureInfo.InvariantCulture : global::System.Globalization.CultureInfo.CurrentCulture; object? convertedValue; - try + if (OperandType == typeof(global::System.TimeSpan)) { - convertedValue = ConvertValue(value, formatProvider); + if (value is global::System.TimeSpan) + { + convertedValue = value; + } + else if (value is string) + { + if (!global::System.TimeSpan.TryParse((string)value, formatProvider, out global::System.TimeSpan timeSpanValue)) + { + return false; + } + convertedValue = timeSpanValue; + } + else + { + throw new global::System.InvalidOperationException($"A value type {value.GetType()} that is not a TimeSpan or a string has been given. This might indicate a problem with the source generator."); + } } - catch (global::System.Exception e) when (e is global::System.FormatException or global::System.InvalidCastException or global::System.NotSupportedException) + else { - return false; + try + { + convertedValue = ConvertValue(value, formatProvider); + } + catch (global::System.Exception e) when (e is global::System.FormatException or global::System.InvalidCastException or global::System.NotSupportedException) + { + return false; + } } var min = (global::System.IComparable)Minimum; diff --git a/src/libraries/Microsoft.Extensions.Options/tests/SourceGenerationTests/Generated/OptionsValidationTests.cs b/src/libraries/Microsoft.Extensions.Options/tests/SourceGenerationTests/Generated/OptionsValidationTests.cs index 49941010f1ace..4f9770ce7a17c 100644 --- a/src/libraries/Microsoft.Extensions.Options/tests/SourceGenerationTests/Generated/OptionsValidationTests.cs +++ b/src/libraries/Microsoft.Extensions.Options/tests/SourceGenerationTests/Generated/OptionsValidationTests.cs @@ -4,6 +4,7 @@ using System; using System.ComponentModel.DataAnnotations; using System.Globalization; +using System.Linq; using Microsoft.Extensions.Options; using TestClasses.OptionsValidation; using Xunit; @@ -439,4 +440,41 @@ public void AttributePropertyModelTestOnErrorMessageResource() var modelValidator = new AttributePropertyModelValidator(); Utils.VerifyValidateOptionsResult(modelValidator.Validate(nameof(validModel), validModel), 1); } + + [Fact] + public void OptionsUsingRangeWithTimeSpanValid() + { + var validModel = new OptionsUsingRangeWithTimeSpan + { + P1 = TimeSpan.FromSeconds(1), + P2 = TimeSpan.FromSeconds(2), + P3 = "00:00:03", + P4 = "00:00:04", + }; + + var modelValidator = new OptionsUsingRangeWithTimeSpanValidator(); + ValidateOptionsResult result = modelValidator.Validate(nameof(validModel), validModel); + Assert.Equal(ValidateOptionsResult.Success, result); + + var invalidModel = new OptionsUsingRangeWithTimeSpan + { + P1 = TimeSpan.FromSeconds(11), + P2 = TimeSpan.FromSeconds(-2), + P3 = "01:00:03", + P4 = "02:00:04", + }; + result = modelValidator.Validate(nameof(invalidModel), invalidModel); + Assert.Equal(4, result.Failures.Count()); + + // null values pass the validation! + invalidModel = new OptionsUsingRangeWithTimeSpan + { + P1 = TimeSpan.FromSeconds(100), + P2 = null, + P3 = "00:01:00", + P4 = null, + }; + result = modelValidator.Validate(nameof(invalidModel), invalidModel); + Assert.Equal(2, result.Failures.Count()); + } } diff --git a/src/libraries/Microsoft.Extensions.Options/tests/SourceGenerationTests/TestClasses/Models.cs b/src/libraries/Microsoft.Extensions.Options/tests/SourceGenerationTests/TestClasses/Models.cs index 240163023eb93..c245ebd783bdc 100644 --- a/src/libraries/Microsoft.Extensions.Options/tests/SourceGenerationTests/TestClasses/Models.cs +++ b/src/libraries/Microsoft.Extensions.Options/tests/SourceGenerationTests/TestClasses/Models.cs @@ -179,6 +179,21 @@ public class ComplexModel public TypeWithoutOptionsValidator? ValWithoutOptionsValidator { get; set; } } + public class OptionsUsingRangeWithTimeSpan + { + [Range(typeof(TimeSpan), "00:00:00", "00:00:10")] + public TimeSpan P1 { get; set; } + + [Range(typeof(TimeSpan), "00:00:00", "00:00:10")] + public TimeSpan? P2 { get; set; } + + [Range(typeof(TimeSpan), "00:00:00", "00:00:10")] + public string P3 { get; set; } + + [Range(typeof(TimeSpan), "00:00:00", "00:00:10")] + public string? P4 { get; set; } + } + [OptionsValidator] public partial class RequiredAttributeModelValidator : IValidateOptions { @@ -248,4 +263,9 @@ public partial class LeafModelValidator : IValidateOptions internal sealed partial class ComplexModelValidator : IValidateOptions { } + + [OptionsValidator] + internal sealed partial class OptionsUsingRangeWithTimeSpanValidator : IValidateOptions + { + } } diff --git a/src/libraries/Microsoft.Extensions.Options/tests/TrimmingTests/ConfigureTests.cs b/src/libraries/Microsoft.Extensions.Options/tests/TrimmingTests/ConfigureTests.cs index 7a39d8a8810fd..90179563300b9 100644 --- a/src/libraries/Microsoft.Extensions.Options/tests/TrimmingTests/ConfigureTests.cs +++ b/src/libraries/Microsoft.Extensions.Options/tests/TrimmingTests/ConfigureTests.cs @@ -46,7 +46,8 @@ optionsC is null || P2 = new List { "1234", "12345" }, P3 = "123456", P4 = "12345", - P5 = 7 + P5 = 7, + P6 = TimeSpan.FromSeconds(5), }; ValidateOptionsResult result = localOptionsValidator.Validate("", optionsUsingValidationAttributes); @@ -113,6 +114,10 @@ public class OptionsUsingValidationAttributes [Range(1, 10, MinimumIsExclusive = true, MaximumIsExclusive = true)] public int P5 { get; set; } + + [Range(typeof(TimeSpan), "00:00:00", "00:00:10")] + public TimeSpan P6 { get; set; } + } [OptionsValidator] diff --git a/src/libraries/Microsoft.Win32.Registry/src/Microsoft/Win32/RegistryKey.cs b/src/libraries/Microsoft.Win32.Registry/src/Microsoft/Win32/RegistryKey.cs index f1600c8ceae22..1fedc0ec5c6a1 100644 --- a/src/libraries/Microsoft.Win32.Registry/src/Microsoft/Win32/RegistryKey.cs +++ b/src/libraries/Microsoft.Win32.Registry/src/Microsoft/Win32/RegistryKey.cs @@ -1,7 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System; using System.Buffers; using System.Collections.Generic; @@ -12,6 +11,7 @@ using System.Security; using System.Security.AccessControl; using System.Text; +using Microsoft.Win32.SafeHandles; /* Note on ACL support: diff --git a/src/libraries/Microsoft.Win32.Registry/src/System/Security/AccessControl/RegistrySecurity.cs b/src/libraries/Microsoft.Win32.Registry/src/System/Security/AccessControl/RegistrySecurity.cs index 749410d8a3b1b..cffd355b212ac 100644 --- a/src/libraries/Microsoft.Win32.Registry/src/System/Security/AccessControl/RegistrySecurity.cs +++ b/src/libraries/Microsoft.Win32.Registry/src/System/Security/AccessControl/RegistrySecurity.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.IO; using System.Runtime.InteropServices; using System.Security.Principal; +using Microsoft.Win32.SafeHandles; namespace System.Security.AccessControl { diff --git a/src/libraries/Microsoft.Win32.SystemEvents/src/Microsoft/Win32/SessionSwitchReason.cs b/src/libraries/Microsoft.Win32.SystemEvents/src/Microsoft/Win32/SessionSwitchReason.cs index e23d5b1fd04f3..d70c761cb6579 100644 --- a/src/libraries/Microsoft.Win32.SystemEvents/src/Microsoft/Win32/SessionSwitchReason.cs +++ b/src/libraries/Microsoft.Win32.SystemEvents/src/Microsoft/Win32/SessionSwitchReason.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Diagnostics; using System; +using System.Diagnostics; namespace Microsoft.Win32 { diff --git a/src/libraries/System.CodeDom/src/System/CodeDom/Compiler/CodeDomProvider.cs b/src/libraries/System.CodeDom/src/System/CodeDom/Compiler/CodeDomProvider.cs index b7ef07bf1e3df..60ae6e69600dd 100644 --- a/src/libraries/System.CodeDom/src/System/CodeDom/Compiler/CodeDomProvider.cs +++ b/src/libraries/System.CodeDom/src/System/CodeDom/Compiler/CodeDomProvider.cs @@ -1,12 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.CSharp; -using Microsoft.VisualBasic; using System.Collections.Generic; using System.ComponentModel; using System.IO; using System.Runtime.Serialization; +using Microsoft.CSharp; +using Microsoft.VisualBasic; namespace System.CodeDom.Compiler { diff --git a/src/libraries/System.Collections/src/System/Collections/BitArray.cs b/src/libraries/System.Collections/src/System/Collections/BitArray.cs index d7434fd27df27..0ac3331b062f9 100644 --- a/src/libraries/System.Collections/src/System/Collections/BitArray.cs +++ b/src/libraries/System.Collections/src/System/Collections/BitArray.cs @@ -6,8 +6,8 @@ using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; using System.Runtime.Intrinsics.Arm; +using System.Runtime.Intrinsics.X86; namespace System.Collections { diff --git a/src/libraries/System.ComponentModel.Annotations/src/System/ComponentModel/DataAnnotations/UIHintAttribute.cs b/src/libraries/System.ComponentModel.Annotations/src/System/ComponentModel/DataAnnotations/UIHintAttribute.cs index dbb37c19009e2..6890a47ddb3d3 100644 --- a/src/libraries/System.ComponentModel.Annotations/src/System/ComponentModel/DataAnnotations/UIHintAttribute.cs +++ b/src/libraries/System.ComponentModel.Annotations/src/System/ComponentModel/DataAnnotations/UIHintAttribute.cs @@ -3,9 +3,9 @@ using System.Collections.Generic; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; -using System.Diagnostics.CodeAnalysis; namespace System.ComponentModel.DataAnnotations { diff --git a/src/libraries/System.ComponentModel.Composition/src/Microsoft/Internal/ReflectionServices.cs b/src/libraries/System.ComponentModel.Composition/src/Microsoft/Internal/ReflectionServices.cs index 86549e6713ae5..24fea180c41b9 100644 --- a/src/libraries/System.ComponentModel.Composition/src/Microsoft/Internal/ReflectionServices.cs +++ b/src/libraries/System.ComponentModel.Composition/src/Microsoft/Internal/ReflectionServices.cs @@ -4,10 +4,10 @@ using System; using System.Collections.Generic; using System.ComponentModel.Composition; +using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Linq; using System.Reflection; -using System.Diagnostics.CodeAnalysis; -using System.Diagnostics; namespace Microsoft.Internal { diff --git a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/AttributedModel/AttributedModelDiscovery.cs b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/AttributedModel/AttributedModelDiscovery.cs index 04f42bf3ad47a..dbed986602052 100644 --- a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/AttributedModel/AttributedModelDiscovery.cs +++ b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/AttributedModel/AttributedModelDiscovery.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Composition.Diagnostics; using System.ComponentModel.Composition.Hosting; using System.ComponentModel.Composition.Primitives; using System.ComponentModel.Composition.ReflectionModel; +using System.Composition.Diagnostics; using System.Globalization; using System.Reflection; using Microsoft.Internal; diff --git a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/AttributedModel/AttributedPartCreationInfo.cs b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/AttributedModel/AttributedPartCreationInfo.cs index 958e8c1a6dd3c..4ed33f551dc17 100644 --- a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/AttributedModel/AttributedPartCreationInfo.cs +++ b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/AttributedModel/AttributedPartCreationInfo.cs @@ -2,10 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Collections.Generic; -using System.Composition.Diagnostics; using System.ComponentModel.Composition.Hosting; using System.ComponentModel.Composition.Primitives; using System.ComponentModel.Composition.ReflectionModel; +using System.Composition.Diagnostics; using System.Linq; using System.Reflection; using System.Threading; diff --git a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/CompositionResultOfT.cs b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/CompositionResultOfT.cs index 315206030fd2e..728076aa6122d 100644 --- a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/CompositionResultOfT.cs +++ b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/CompositionResultOfT.cs @@ -2,9 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; using System.Linq; using Microsoft.Internal.Collections; -using System.Diagnostics.CodeAnalysis; namespace System.ComponentModel.Composition { diff --git a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Hosting/CatalogExportProvider.ScopeFactoryExport.cs b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Hosting/CatalogExportProvider.ScopeFactoryExport.cs index 20aed9c4e4acd..a15cc2914dd41 100644 --- a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Hosting/CatalogExportProvider.ScopeFactoryExport.cs +++ b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Hosting/CatalogExportProvider.ScopeFactoryExport.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.ComponentModel.Composition.Primitives; -using System.Threading; using System.Diagnostics; +using System.Threading; namespace System.ComponentModel.Composition.Hosting { diff --git a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Hosting/CatalogExportProvider.cs b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Hosting/CatalogExportProvider.cs index f9504368b9d09..879e5a1dd289c 100644 --- a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Hosting/CatalogExportProvider.cs +++ b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Hosting/CatalogExportProvider.cs @@ -2,9 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Collections.Generic; -using System.Composition.Diagnostics; using System.ComponentModel.Composition.Primitives; using System.ComponentModel.Composition.ReflectionModel; +using System.Composition.Diagnostics; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Globalization; diff --git a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Hosting/ComposablePartCatalogChangeEventArgs.cs b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Hosting/ComposablePartCatalogChangeEventArgs.cs index f8484b859a4a9..b1b948fcdd310 100644 --- a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Hosting/ComposablePartCatalogChangeEventArgs.cs +++ b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Hosting/ComposablePartCatalogChangeEventArgs.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Collections.Generic; -using System.Diagnostics; using System.ComponentModel.Composition.Primitives; +using System.Diagnostics; using Microsoft.Internal; using Microsoft.Internal.Collections; diff --git a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Hosting/CompositionBatch.cs b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Hosting/CompositionBatch.cs index 0c746ce7cf7c8..bff4fe4dc217d 100644 --- a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Hosting/CompositionBatch.cs +++ b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Hosting/CompositionBatch.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Diagnostics; using System.Collections.Generic; using System.Collections.ObjectModel; using System.ComponentModel.Composition.Primitives; +using System.Diagnostics; using Microsoft.Internal; namespace System.ComponentModel.Composition.Hosting diff --git a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Hosting/DirectoryCatalog.cs b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Hosting/DirectoryCatalog.cs index 201ccada3e5f5..95ea38065458f 100644 --- a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Hosting/DirectoryCatalog.cs +++ b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Hosting/DirectoryCatalog.cs @@ -3,8 +3,8 @@ using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Composition.Diagnostics; using System.ComponentModel.Composition.Primitives; +using System.Composition.Diagnostics; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Globalization; diff --git a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Hosting/FilteredCatalog.DependenciesTraversal.cs b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Hosting/FilteredCatalog.DependenciesTraversal.cs index 085cc7a334fd6..cb013383b4da2 100644 --- a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Hosting/FilteredCatalog.DependenciesTraversal.cs +++ b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Hosting/FilteredCatalog.DependenciesTraversal.cs @@ -3,9 +3,9 @@ using System.Collections.Generic; using System.ComponentModel.Composition.Primitives; -using System.Linq; -using System.Diagnostics.CodeAnalysis; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; +using System.Linq; namespace System.ComponentModel.Composition.Hosting { diff --git a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Hosting/FilteredCatalog.DependentsTraversal.cs b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Hosting/FilteredCatalog.DependentsTraversal.cs index 9c456ec9bf8a8..2d8bc135afb81 100644 --- a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Hosting/FilteredCatalog.DependentsTraversal.cs +++ b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Hosting/FilteredCatalog.DependentsTraversal.cs @@ -3,9 +3,9 @@ using System.Collections.Generic; using System.ComponentModel.Composition.Primitives; -using System.Linq; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; +using System.Linq; namespace System.ComponentModel.Composition.Hosting { diff --git a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/MetadataViewProvider.cs b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/MetadataViewProvider.cs index 423956e5cfb2c..f6970b7fcee0f 100644 --- a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/MetadataViewProvider.cs +++ b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/MetadataViewProvider.cs @@ -2,11 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Collections.Generic; +using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Reflection; using Microsoft.Internal; -using System.Diagnostics; namespace System.ComponentModel.Composition { diff --git a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Primitives/ComposablePartDefinition.cs b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Primitives/ComposablePartDefinition.cs index dcb37adb742c7..ef853d13e7f5d 100644 --- a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Primitives/ComposablePartDefinition.cs +++ b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Primitives/ComposablePartDefinition.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Collections.Generic; -using System.Linq; using System.Diagnostics.CodeAnalysis; +using System.Linq; namespace System.ComponentModel.Composition.Primitives { diff --git a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Primitives/ImportDefinition.cs b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Primitives/ImportDefinition.cs index 4b67121729ee7..a1ea9ec014e42 100644 --- a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Primitives/ImportDefinition.cs +++ b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Primitives/ImportDefinition.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq.Expressions; using Microsoft.Internal; diff --git a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Primitives/SerializableCompositionElement.cs b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Primitives/SerializableCompositionElement.cs index 7f7252d3ed5c2..2c82f189fd076 100644 --- a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Primitives/SerializableCompositionElement.cs +++ b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/Primitives/SerializableCompositionElement.cs @@ -3,9 +3,9 @@ using System; using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; using System.Text; -using System.Diagnostics.CodeAnalysis; namespace System.ComponentModel.Composition.Primitives { diff --git a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/ReflectionModel/GenericServices.cs b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/ReflectionModel/GenericServices.cs index 0a28f481221b2..31560a94bfe5d 100644 --- a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/ReflectionModel/GenericServices.cs +++ b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/ReflectionModel/GenericServices.cs @@ -2,10 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; using System.Reflection; -using System.Diagnostics.CodeAnalysis; namespace System.ComponentModel.Composition.ReflectionModel { diff --git a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/ReflectionModel/GenericSpecializationPartCreationInfo.cs b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/ReflectionModel/GenericSpecializationPartCreationInfo.cs index 9ff8593a44bf5..b3171eba85d35 100644 --- a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/ReflectionModel/GenericSpecializationPartCreationInfo.cs +++ b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/ReflectionModel/GenericSpecializationPartCreationInfo.cs @@ -4,12 +4,12 @@ using System.Collections.Generic; using System.ComponentModel.Composition.Hosting; using System.ComponentModel.Composition.Primitives; +using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Reflection; using System.Threading; using Microsoft.Internal; using Microsoft.Internal.Collections; -using System.Diagnostics.CodeAnalysis; namespace System.ComponentModel.Composition.ReflectionModel { diff --git a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/ReflectionModel/ImportType.cs b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/ReflectionModel/ImportType.cs index 6614acd0a6326..339aae535791d 100644 --- a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/ReflectionModel/ImportType.cs +++ b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/ReflectionModel/ImportType.cs @@ -3,8 +3,8 @@ using System.Collections.Generic; using System.ComponentModel.Composition.Primitives; -using Microsoft.Internal.Collections; using System.Diagnostics.CodeAnalysis; +using Microsoft.Internal.Collections; namespace System.ComponentModel.Composition.ReflectionModel { diff --git a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/ReflectionModel/ReflectionComposablePart.cs b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/ReflectionModel/ReflectionComposablePart.cs index 6d089fde7c863..c8a7054c5966c 100644 --- a/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/ReflectionModel/ReflectionComposablePart.cs +++ b/src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/ReflectionModel/ReflectionComposablePart.cs @@ -3,13 +3,13 @@ using System.Collections.Generic; using System.ComponentModel.Composition.Primitives; +using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; using System.Reflection; using Microsoft.Internal; using Microsoft.Internal.Collections; -using System.Diagnostics; namespace System.ComponentModel.Composition.ReflectionModel { diff --git a/src/libraries/System.ComponentModel.EventBasedAsync/src/System/ComponentModel/AsyncOperationManager.cs b/src/libraries/System.ComponentModel.EventBasedAsync/src/System/ComponentModel/AsyncOperationManager.cs index fe032b6fdfffd..9fec386472f17 100644 --- a/src/libraries/System.ComponentModel.EventBasedAsync/src/System/ComponentModel/AsyncOperationManager.cs +++ b/src/libraries/System.ComponentModel.EventBasedAsync/src/System/ComponentModel/AsyncOperationManager.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Collections; -using System.Threading; using System.Diagnostics; +using System.Threading; namespace System.ComponentModel { diff --git a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/AttributeCollection.cs b/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/AttributeCollection.cs index 07d7d9e48b249..9f1f08807af68 100644 --- a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/AttributeCollection.cs +++ b/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/AttributeCollection.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Reflection; using System.Collections; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; +using System.Reflection; namespace System.ComponentModel { diff --git a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/Design/DesigntimeLicenseContext.cs b/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/Design/DesigntimeLicenseContext.cs index 6db94b11f3946..b253e613b1398 100644 --- a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/Design/DesigntimeLicenseContext.cs +++ b/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/Design/DesigntimeLicenseContext.cs @@ -1,12 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Collections; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; +using System.Globalization; using System.IO; using System.Reflection; -using System.Collections; -using System.Globalization; namespace System.ComponentModel.Design { diff --git a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/Design/DesigntimeLicenseContextSerializer.cs b/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/Design/DesigntimeLicenseContextSerializer.cs index 8fad86404e535..9c23426554eaf 100644 --- a/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/Design/DesigntimeLicenseContextSerializer.cs +++ b/src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/Design/DesigntimeLicenseContextSerializer.cs @@ -1,12 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Runtime.Serialization.Formatters.Binary; -using System.Runtime.Serialization; using System.Collections; -using System.IO; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; +using System.IO; +using System.Runtime.Serialization; +using System.Runtime.Serialization.Formatters.Binary; namespace System.ComponentModel.Design { diff --git a/src/libraries/System.ComponentModel.TypeConverter/src/System/Timers/Timer.cs b/src/libraries/System.ComponentModel.TypeConverter/src/System/Timers/Timer.cs index a9e0cfbb8fdca..61def8471df64 100644 --- a/src/libraries/System.ComponentModel.TypeConverter/src/System/Timers/Timer.cs +++ b/src/libraries/System.ComponentModel.TypeConverter/src/System/Timers/Timer.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Threading; using System.ComponentModel; using System.ComponentModel.Design; using System.Diagnostics; +using System.Threading; namespace System.Timers { diff --git a/src/libraries/System.Composition.Convention/src/System/Composition/Convention/ExportConventionBuilder.cs b/src/libraries/System.Composition.Convention/src/System/Composition/Convention/ExportConventionBuilder.cs index 3ff26ac35452d..dea171c75a991 100644 --- a/src/libraries/System.Composition.Convention/src/System/Composition/Convention/ExportConventionBuilder.cs +++ b/src/libraries/System.Composition.Convention/src/System/Composition/Convention/ExportConventionBuilder.cs @@ -5,8 +5,8 @@ using System.Collections.Generic; using System.Composition; using System.Linq; -using System.Text; using System.Reflection; +using System.Text; namespace System.Composition.Convention { diff --git a/src/libraries/System.Composition.Hosting/src/System/Composition/Hosting/Providers/ExportFactory/ExportFactoryExportDescriptorProvider.cs b/src/libraries/System.Composition.Hosting/src/System/Composition/Hosting/Providers/ExportFactory/ExportFactoryExportDescriptorProvider.cs index 09b980168f1d3..b826989170b0d 100644 --- a/src/libraries/System.Composition.Hosting/src/System/Composition/Hosting/Providers/ExportFactory/ExportFactoryExportDescriptorProvider.cs +++ b/src/libraries/System.Composition.Hosting/src/System/Composition/Hosting/Providers/ExportFactory/ExportFactoryExportDescriptorProvider.cs @@ -1,11 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Linq; -using System.Reflection; -using System.Composition.Hosting.Core; using System.Collections.Generic; +using System.Composition.Hosting.Core; using System.Composition.Hosting.Util; +using System.Linq; +using System.Reflection; namespace System.Composition.Hosting.Providers.ExportFactory { diff --git a/src/libraries/System.Composition.Hosting/src/System/Composition/Hosting/Providers/ExportFactory/ExportFactoryWithMetadataExportDescriptorProvider.cs b/src/libraries/System.Composition.Hosting/src/System/Composition/Hosting/Providers/ExportFactory/ExportFactoryWithMetadataExportDescriptorProvider.cs index 0b6a07d8b410a..dbf1acb5f172b 100644 --- a/src/libraries/System.Composition.Hosting/src/System/Composition/Hosting/Providers/ExportFactory/ExportFactoryWithMetadataExportDescriptorProvider.cs +++ b/src/libraries/System.Composition.Hosting/src/System/Composition/Hosting/Providers/ExportFactory/ExportFactoryWithMetadataExportDescriptorProvider.cs @@ -1,12 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Reflection; -using System.Composition.Hosting.Util; -using System.Composition.Hosting.Core; -using System.Linq; using System.Collections.Generic; +using System.Composition.Hosting.Core; using System.Composition.Hosting.Providers.Metadata; +using System.Composition.Hosting.Util; +using System.Linq; +using System.Reflection; namespace System.Composition.Hosting.Providers.ExportFactory { diff --git a/src/libraries/System.Composition.Hosting/src/System/Composition/Hosting/Providers/ImportMany/ImportManyExportDescriptorProvider.cs b/src/libraries/System.Composition.Hosting/src/System/Composition/Hosting/Providers/ImportMany/ImportManyExportDescriptorProvider.cs index 254909aac7734..b546b51ab6035 100644 --- a/src/libraries/System.Composition.Hosting/src/System/Composition/Hosting/Providers/ImportMany/ImportManyExportDescriptorProvider.cs +++ b/src/libraries/System.Composition.Hosting/src/System/Composition/Hosting/Providers/ImportMany/ImportManyExportDescriptorProvider.cs @@ -1,11 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Reflection; +using System.Collections.Generic; using System.Composition.Hosting.Core; using System.Composition.Hosting.Util; -using System.Collections.Generic; using System.Linq; +using System.Reflection; namespace System.Composition.Hosting.Providers.ImportMany { diff --git a/src/libraries/System.Composition.Hosting/src/System/Composition/Hosting/Providers/Lazy/LazyExportDescriptorProvider.cs b/src/libraries/System.Composition.Hosting/src/System/Composition/Hosting/Providers/Lazy/LazyExportDescriptorProvider.cs index 6bb04a2a8be5c..56bdb8d00ac40 100644 --- a/src/libraries/System.Composition.Hosting/src/System/Composition/Hosting/Providers/Lazy/LazyExportDescriptorProvider.cs +++ b/src/libraries/System.Composition.Hosting/src/System/Composition/Hosting/Providers/Lazy/LazyExportDescriptorProvider.cs @@ -1,11 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Linq; -using System.Reflection; -using System.Composition.Hosting.Core; using System.Collections.Generic; +using System.Composition.Hosting.Core; using System.Composition.Hosting.Util; +using System.Linq; +using System.Reflection; namespace System.Composition.Hosting.Providers.Lazy { diff --git a/src/libraries/System.Composition.Hosting/src/System/Composition/Hosting/Providers/Lazy/LazyWithMetadataExportDescriptorProvider.cs b/src/libraries/System.Composition.Hosting/src/System/Composition/Hosting/Providers/Lazy/LazyWithMetadataExportDescriptorProvider.cs index e2460c1a84c98..00b188fab998f 100644 --- a/src/libraries/System.Composition.Hosting/src/System/Composition/Hosting/Providers/Lazy/LazyWithMetadataExportDescriptorProvider.cs +++ b/src/libraries/System.Composition.Hosting/src/System/Composition/Hosting/Providers/Lazy/LazyWithMetadataExportDescriptorProvider.cs @@ -1,12 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Reflection; -using System.Composition.Hosting.Core; -using System.Linq; -using System.Composition.Hosting.Util; using System.Collections.Generic; +using System.Composition.Hosting.Core; using System.Composition.Hosting.Providers.Metadata; +using System.Composition.Hosting.Util; +using System.Linq; +using System.Reflection; namespace System.Composition.Hosting.Providers.Lazy { diff --git a/src/libraries/System.Composition.Runtime/src/System/Composition/CompositionContext.cs b/src/libraries/System.Composition.Runtime/src/System/Composition/CompositionContext.cs index e2ff4e13295e2..bfa19f081c26b 100644 --- a/src/libraries/System.Composition.Runtime/src/System/Composition/CompositionContext.cs +++ b/src/libraries/System.Composition.Runtime/src/System/Composition/CompositionContext.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Collections.Generic; -using System.Composition.Hosting.Core; using System.Composition.Hosting; +using System.Composition.Hosting.Core; namespace System.Composition { diff --git a/src/libraries/System.Composition.TypedParts/src/System/Composition/TypedParts/ActivationFeatures/PropertyInjectionFeature.cs b/src/libraries/System.Composition.TypedParts/src/System/Composition/TypedParts/ActivationFeatures/PropertyInjectionFeature.cs index 82f73a87ba5f4..8ab55319ad7cd 100644 --- a/src/libraries/System.Composition.TypedParts/src/System/Composition/TypedParts/ActivationFeatures/PropertyInjectionFeature.cs +++ b/src/libraries/System.Composition.TypedParts/src/System/Composition/TypedParts/ActivationFeatures/PropertyInjectionFeature.cs @@ -2,11 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Collections.Generic; +using System.Composition.Convention; using System.Composition.Hosting.Core; using System.Linq; using System.Linq.Expressions; using System.Reflection; -using System.Composition.Convention; namespace System.Composition.TypedParts.ActivationFeatures { diff --git a/src/libraries/System.Composition.TypedParts/src/System/Composition/TypedParts/ContractHelpers.cs b/src/libraries/System.Composition.TypedParts/src/System/Composition/TypedParts/ContractHelpers.cs index 227a3dac0bd43..7a753fb4fd87c 100644 --- a/src/libraries/System.Composition.TypedParts/src/System/Composition/TypedParts/ContractHelpers.cs +++ b/src/libraries/System.Composition.TypedParts/src/System/Composition/TypedParts/ContractHelpers.cs @@ -2,11 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Collections.Generic; -using System.Linq; -using System.Reflection; +using System.Composition.Hosting; using System.Composition.Hosting.Core; using System.Composition.TypedParts.ActivationFeatures; -using System.Composition.Hosting; +using System.Linq; +using System.Reflection; namespace System.Composition.TypedParts { diff --git a/src/libraries/System.Composition.TypedParts/src/System/Composition/TypedParts/Discovery/DiscoveredPart.cs b/src/libraries/System.Composition.TypedParts/src/System/Composition/TypedParts/Discovery/DiscoveredPart.cs index 47cefcc0978fd..88f005d09ed1e 100644 --- a/src/libraries/System.Composition.TypedParts/src/System/Composition/TypedParts/Discovery/DiscoveredPart.cs +++ b/src/libraries/System.Composition.TypedParts/src/System/Composition/TypedParts/Discovery/DiscoveredPart.cs @@ -2,16 +2,16 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Collections.Generic; +using System.Composition.Convention; +using System.Composition.Debugging; +using System.Composition.Hosting; +using System.Composition.Hosting.Core; +using System.Composition.TypedParts.ActivationFeatures; +using System.Diagnostics; using System.Linq; +using System.Linq.Expressions; using System.Numerics.Hashing; using System.Reflection; -using System.Linq.Expressions; -using System.Diagnostics; -using System.Composition.Debugging; -using System.Composition.TypedParts.ActivationFeatures; -using System.Composition.Hosting.Core; -using System.Composition.Convention; -using System.Composition.Hosting; namespace System.Composition.TypedParts.Discovery { diff --git a/src/libraries/System.Composition.TypedParts/src/System/Composition/TypedParts/Util/DirectAttributeContext.cs b/src/libraries/System.Composition.TypedParts/src/System/Composition/TypedParts/Util/DirectAttributeContext.cs index 23702ecfb27fb..053d5d20d2857 100644 --- a/src/libraries/System.Composition.TypedParts/src/System/Composition/TypedParts/Util/DirectAttributeContext.cs +++ b/src/libraries/System.Composition.TypedParts/src/System/Composition/TypedParts/Util/DirectAttributeContext.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Collections.Generic; -using System.Reflection; using System.Composition.Convention; +using System.Reflection; namespace System.Composition.TypedParts.Util { diff --git a/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/CommaDelimitedStringAttributeCollectionConverter.cs b/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/CommaDelimitedStringAttributeCollectionConverter.cs index bb857712da14a..3d9840bca962b 100644 --- a/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/CommaDelimitedStringAttributeCollectionConverter.cs +++ b/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/CommaDelimitedStringAttributeCollectionConverter.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Globalization; using System.ComponentModel; +using System.Globalization; namespace System.Configuration { diff --git a/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/ConfigurationElement.cs b/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/ConfigurationElement.cs index 55c81fb976637..1dc0324e052f1 100644 --- a/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/ConfigurationElement.cs +++ b/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/ConfigurationElement.cs @@ -2,14 +2,14 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Collections; -using System.Collections.Specialized; using System.Collections.Generic; +using System.Collections.Specialized; using System.Diagnostics; +using System.Globalization; using System.IO; using System.Reflection; -using System.Xml; -using System.Globalization; using System.Text; +using System.Xml; namespace System.Configuration { diff --git a/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/DpapiProtectedConfigurationProvider.cs b/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/DpapiProtectedConfigurationProvider.cs index db546c8010316..d42ae2fa40f3f 100644 --- a/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/DpapiProtectedConfigurationProvider.cs +++ b/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/DpapiProtectedConfigurationProvider.cs @@ -2,10 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Collections.Specialized; +using System.Runtime.Versioning; using System.Security.Cryptography; using System.Text; using System.Xml; -using System.Runtime.Versioning; namespace System.Configuration { diff --git a/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/GenericEnumConverter.cs b/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/GenericEnumConverter.cs index 74835e282cbd6..36a2014dc94ff 100644 --- a/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/GenericEnumConverter.cs +++ b/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/GenericEnumConverter.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Globalization; using System.ComponentModel; +using System.Globalization; using System.Text; namespace System.Configuration diff --git a/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/InfiniteIntConverter.cs b/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/InfiniteIntConverter.cs index dbb00c3653258..dfe433731aa85 100644 --- a/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/InfiniteIntConverter.cs +++ b/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/InfiniteIntConverter.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Globalization; using System.ComponentModel; using System.Diagnostics; +using System.Globalization; namespace System.Configuration { diff --git a/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/InfiniteTimeSpanConverter.cs b/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/InfiniteTimeSpanConverter.cs index 36cd86a82e0f1..0039d8d7a4c03 100644 --- a/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/InfiniteTimeSpanConverter.cs +++ b/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/InfiniteTimeSpanConverter.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Globalization; using System.ComponentModel; +using System.Globalization; namespace System.Configuration { diff --git a/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/PropertyInformationCollection.cs b/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/PropertyInformationCollection.cs index 9547bc96fb5f9..b6bfc4bc0829a 100644 --- a/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/PropertyInformationCollection.cs +++ b/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/PropertyInformationCollection.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Collections.Specialized; using System.Collections; +using System.Collections.Specialized; using System.Runtime.Serialization; namespace System.Configuration diff --git a/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/TimeSpanMinutesConverter.cs b/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/TimeSpanMinutesConverter.cs index 6a38abfdc40b6..d95879c72b9b3 100644 --- a/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/TimeSpanMinutesConverter.cs +++ b/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/TimeSpanMinutesConverter.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Globalization; using System.ComponentModel; +using System.Globalization; namespace System.Configuration { diff --git a/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/TimeSpanMinutesOrInfiniteConverter.cs b/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/TimeSpanMinutesOrInfiniteConverter.cs index 971aa5d0f75a7..7568ec426f37a 100644 --- a/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/TimeSpanMinutesOrInfiniteConverter.cs +++ b/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/TimeSpanMinutesOrInfiniteConverter.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Globalization; using System.ComponentModel; +using System.Globalization; namespace System.Configuration { diff --git a/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/TimeSpanSecondsConverter.cs b/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/TimeSpanSecondsConverter.cs index bfa224de61b17..87718fce1f83e 100644 --- a/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/TimeSpanSecondsConverter.cs +++ b/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/TimeSpanSecondsConverter.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Globalization; using System.ComponentModel; +using System.Globalization; namespace System.Configuration { diff --git a/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/TimeSpanSecondsOrInfiniteConverter.cs b/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/TimeSpanSecondsOrInfiniteConverter.cs index 3002d72c0290f..109559be4538f 100644 --- a/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/TimeSpanSecondsOrInfiniteConverter.cs +++ b/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/TimeSpanSecondsOrInfiniteConverter.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Globalization; using System.ComponentModel; +using System.Globalization; namespace System.Configuration { diff --git a/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/TypeNameConverter.cs b/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/TypeNameConverter.cs index d9576ba0ef357..6fc28afe5b6fa 100644 --- a/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/TypeNameConverter.cs +++ b/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/TypeNameConverter.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Globalization; using System.ComponentModel; +using System.Globalization; namespace System.Configuration { diff --git a/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/WhiteSpaceTrimStringConverter.cs b/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/WhiteSpaceTrimStringConverter.cs index d48b3116473d2..f7e3c5e69f919 100644 --- a/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/WhiteSpaceTrimStringConverter.cs +++ b/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/WhiteSpaceTrimStringConverter.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Globalization; using System.ComponentModel; +using System.Globalization; namespace System.Configuration { diff --git a/src/libraries/System.Configuration.ConfigurationManager/src/System/Diagnostics/SourceElementsCollection.cs b/src/libraries/System.Configuration.ConfigurationManager/src/System/Diagnostics/SourceElementsCollection.cs index b4d0434445f9a..96733f03dc6d9 100644 --- a/src/libraries/System.Configuration.ConfigurationManager/src/System/Diagnostics/SourceElementsCollection.cs +++ b/src/libraries/System.Configuration.ConfigurationManager/src/System/Diagnostics/SourceElementsCollection.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Configuration; using System.Collections; using System.Collections.Specialized; +using System.Configuration; using System.Xml; namespace System.Diagnostics diff --git a/src/libraries/System.Configuration.ConfigurationManager/src/System/Diagnostics/SwitchElementsCollection.cs b/src/libraries/System.Configuration.ConfigurationManager/src/System/Diagnostics/SwitchElementsCollection.cs index 7cd92443d111c..ad16164df1942 100644 --- a/src/libraries/System.Configuration.ConfigurationManager/src/System/Diagnostics/SwitchElementsCollection.cs +++ b/src/libraries/System.Configuration.ConfigurationManager/src/System/Diagnostics/SwitchElementsCollection.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Configuration; using System.Collections; using System.Collections.Specialized; +using System.Configuration; using System.Xml; namespace System.Diagnostics diff --git a/src/libraries/System.Configuration.ConfigurationManager/src/System/Diagnostics/TraceUtils.cs b/src/libraries/System.Configuration.ConfigurationManager/src/System/Diagnostics/TraceUtils.cs index 99029ca290ef7..17b17ddb509d1 100644 --- a/src/libraries/System.Configuration.ConfigurationManager/src/System/Diagnostics/TraceUtils.cs +++ b/src/libraries/System.Configuration.ConfigurationManager/src/System/Diagnostics/TraceUtils.cs @@ -1,13 +1,13 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Collections; +using System.Collections.Specialized; using System.Configuration; +using System.Globalization; using System.IO; using System.Reflection; -using System.Globalization; -using System.Collections; using System.Runtime.Versioning; -using System.Collections.Specialized; namespace System.Diagnostics { diff --git a/src/libraries/System.Console/src/System/ConsolePal.Android.cs b/src/libraries/System.Console/src/System/ConsolePal.Android.cs index 7894b5e2022c2..d24433be40124 100644 --- a/src/libraries/System.Console/src/System/ConsolePal.Android.cs +++ b/src/libraries/System.Console/src/System/ConsolePal.Android.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.IO; -using System.Text; using System.Runtime.InteropServices; +using System.Text; #pragma warning disable IDE0060 diff --git a/src/libraries/System.Console/src/System/ConsolePal.Unix.ConsoleStream.cs b/src/libraries/System.Console/src/System/ConsolePal.Unix.ConsoleStream.cs index 96eae08d1b5ea..cd0adce8675ae 100644 --- a/src/libraries/System.Console/src/System/ConsolePal.Unix.ConsoleStream.cs +++ b/src/libraries/System.Console/src/System/ConsolePal.Unix.ConsoleStream.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Diagnostics; using System.IO; +using Microsoft.Win32.SafeHandles; namespace System { @@ -47,7 +47,7 @@ public override int Read(Span buffer) => ConsolePal.Read(_handle, buffer); public override void Write(ReadOnlySpan buffer) => - ConsolePal.Write(_handle, buffer); + ConsolePal.WriteFromConsoleStream(_handle, buffer); public override void Flush() { diff --git a/src/libraries/System.Console/src/System/ConsolePal.Unix.cs b/src/libraries/System.Console/src/System/ConsolePal.Unix.cs index c705bbcfe654b..7d9a74d6a8552 100644 --- a/src/libraries/System.Console/src/System/ConsolePal.Unix.cs +++ b/src/libraries/System.Console/src/System/ConsolePal.Unix.cs @@ -1,13 +1,13 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.ComponentModel; using System.Diagnostics; using System.IO; using System.Runtime.InteropServices; using System.Text; using System.Threading; +using Microsoft.Win32.SafeHandles; namespace System { @@ -37,6 +37,7 @@ internal static partial class ConsolePal private static int s_windowWidth; // Cached WindowWidth, -1 when invalid. private static int s_windowHeight; // Cached WindowHeight, invalid when s_windowWidth == -1. private static int s_invalidateCachedSettings = 1; // Tracks whether we should invalidate the cached settings. + private static SafeFileHandle? s_terminalHandle; // Tracks the handle used for writing to the terminal. /// Gets the lazily-initialized terminal information for the terminal. public static TerminalFormatStrings TerminalFormatStringsInstance { get { return s_terminalFormatStringsInstance.Value; } } @@ -127,13 +128,7 @@ public static ConsoleKeyInfo ReadKey(bool intercept) throw new InvalidOperationException(SR.InvalidOperation_ConsoleReadKeyOnFile); } - bool previouslyProcessed; - ConsoleKeyInfo keyInfo = StdInReader.ReadKey(out previouslyProcessed); - - if (!intercept && !previouslyProcessed && keyInfo.KeyChar != '\0') - { - Console.Write(keyInfo.KeyChar); - } + ConsoleKeyInfo keyInfo = StdInReader.ReadKey(intercept); return keyInfo; } @@ -205,7 +200,7 @@ public static string Title if (!string.IsNullOrEmpty(titleFormat)) { string ansiStr = TermInfo.ParameterizedStrings.Evaluate(titleFormat, value); - WriteStdoutAnsiString(ansiStr, mayChangeCursorPosition: false); + WriteTerminalAnsiString(ansiStr, mayChangeCursorPosition: false); } } } @@ -214,7 +209,7 @@ public static void Beep() { if (!Console.IsOutputRedirected) { - WriteStdoutAnsiString(TerminalFormatStringsInstance.Bell, mayChangeCursorPosition: false); + WriteTerminalAnsiString(TerminalFormatStringsInstance.Bell, mayChangeCursorPosition: false); } } @@ -222,7 +217,7 @@ public static void Clear() { if (!Console.IsOutputRedirected) { - WriteStdoutAnsiString(TerminalFormatStringsInstance.Clear); + WriteTerminalAnsiString(TerminalFormatStringsInstance.Clear); } } @@ -231,6 +226,11 @@ public static void SetCursorPosition(int left, int top) if (Console.IsOutputRedirected) return; + SetTerminalCursorPosition(left, top); + } + + public static void SetTerminalCursorPosition(int left, int top) + { lock (Console.Out) { if (TryGetCachedCursorPosition(out int leftCurrent, out int topCurrent) && @@ -244,7 +244,7 @@ public static void SetCursorPosition(int left, int top) if (!string.IsNullOrEmpty(cursorAddressFormat)) { string ansiStr = TermInfo.ParameterizedStrings.Evaluate(cursorAddressFormat, top, left); - WriteStdoutAnsiString(ansiStr); + WriteTerminalAnsiString(ansiStr); } SetCachedCursorPosition(left, top); @@ -355,19 +355,18 @@ private static void GetWindowSize(out int width, out int height) // Invalidate before reading cached values. CheckTerminalSettingsInvalidated(); - if (s_windowWidth == -1) + Interop.Sys.WinSize winsize; + if (s_windowWidth == -1 && + s_terminalHandle != null && + Interop.Sys.GetWindowSize(s_terminalHandle, out winsize) == 0) { - Interop.Sys.WinSize winsize; - if (Interop.Sys.GetWindowSize(out winsize) == 0) - { - s_windowWidth = winsize.Col; - s_windowHeight = winsize.Row; - } - else - { - s_windowWidth = TerminalFormatStringsInstance.Columns; - s_windowHeight = TerminalFormatStringsInstance.Lines; - } + s_windowWidth = winsize.Col; + s_windowHeight = winsize.Row; + } + else + { + s_windowWidth = TerminalFormatStringsInstance.Columns; + s_windowHeight = TerminalFormatStringsInstance.Lines; } width = s_windowWidth; height = s_windowHeight; @@ -403,7 +402,7 @@ public static bool CursorVisible { if (!Console.IsOutputRedirected) { - WriteStdoutAnsiString(value ? + WriteTerminalAnsiString(value ? TerminalFormatStringsInstance.CursorVisible : TerminalFormatStringsInstance.CursorInvisible); } @@ -412,6 +411,11 @@ public static bool CursorVisible public static (int Left, int Top) GetCursorPosition() { + if (Console.IsInputRedirected || Console.IsOutputRedirected) + { + return (0, 0); + } + TryGetCursorPosition(out int left, out int top); return (left, top); } @@ -436,14 +440,9 @@ public static (int Left, int Top) GetCursorPosition() /// Indicates whether this method is called as part of a on-going Read operation. internal static bool TryGetCursorPosition(out int left, out int top, bool reinitializeForRead = false) { - left = top = 0; + Debug.Assert(!Console.IsInputRedirected); - // Getting the cursor position involves both writing out a request string and - // parsing a response string from the terminal. So if anything is redirected, bail. - if (Console.IsInputRedirected || Console.IsOutputRedirected) - { - return false; - } + left = top = 0; int cursorVersion; lock (Console.Out) @@ -485,7 +484,7 @@ internal static bool TryGetCursorPosition(out int left, out int top, bool reinit { // Write out the cursor position report request. Debug.Assert(!string.IsNullOrEmpty(TerminalFormatStrings.CursorPositionReport)); - WriteStdoutAnsiString(TerminalFormatStrings.CursorPositionReport, mayChangeCursorPosition: false); + WriteTerminalAnsiString(TerminalFormatStrings.CursorPositionReport, mayChangeCursorPosition: false); // Read the cursor position report (CPR), of the form \ESC[row;colR. This is not // as easy as it sounds. Prior to the CPR having been supplied to stdin, other @@ -802,7 +801,7 @@ private static void WriteSetColorString(bool foreground, ConsoleColor color) string evaluatedString = s_fgbgAndColorStrings[fgbgIndex, ccValue]; // benign race if (evaluatedString != null) { - WriteStdoutAnsiString(evaluatedString); + WriteTerminalAnsiString(evaluatedString); return; } @@ -842,7 +841,7 @@ private static void WriteSetColorString(bool foreground, ConsoleColor color) int ansiCode = consoleColorToAnsiCode[ccValue] % maxColors; evaluatedString = TermInfo.ParameterizedStrings.Evaluate(formatString, ansiCode); - WriteStdoutAnsiString(evaluatedString); + WriteTerminalAnsiString(evaluatedString); s_fgbgAndColorStrings[fgbgIndex, ccValue] = evaluatedString; // benign race } @@ -854,7 +853,7 @@ private static void WriteResetColorString() { if (ConsoleUtils.EmitAnsiColorCodes) { - WriteStdoutAnsiString(TerminalFormatStringsInstance.Reset); + WriteTerminalAnsiString(TerminalFormatStringsInstance.Reset); } } @@ -897,16 +896,17 @@ private static unsafe void EnsureInitializedCore() throw new Win32Exception(); } + s_terminalHandle = !Console.IsOutputRedirected ? Interop.Sys.FileDescriptors.STDOUT_FILENO : + !Console.IsInputRedirected ? Interop.Sys.FileDescriptors.STDIN_FILENO : + null; + // Provide the native lib with the correct code from the terminfo to transition us into // "application mode". This will both transition it immediately, as well as allow // the native lib later to handle signals that require re-entering the mode. - if (!Console.IsOutputRedirected) + if (s_terminalHandle != null && + TerminalFormatStringsInstance.KeypadXmit is string keypadXmit) { - string? keypadXmit = TerminalFormatStringsInstance.KeypadXmit; - if (keypadXmit != null) - { - Interop.Sys.SetKeypadXmit(keypadXmit); - } + Interop.Sys.SetKeypadXmit(s_terminalHandle, keypadXmit); } if (!Console.IsInputRedirected) @@ -952,17 +952,32 @@ private static unsafe int Read(SafeFileHandle fd, Span buffer) } } + internal static void WriteToTerminal(ReadOnlySpan buffer, bool mayChangeCursorPosition = true) + { + Debug.Assert(s_terminalHandle is not null); + + lock (Console.Out) // synchronize with other writers + { + Write(s_terminalHandle, buffer, mayChangeCursorPosition); + } + } + + internal static unsafe void WriteFromConsoleStream(SafeFileHandle fd, ReadOnlySpan buffer) + { + EnsureConsoleInitialized(); + + lock (Console.Out) // synchronize with other writers + { + Write(fd, buffer); + } + } + /// Writes data from the buffer into the file descriptor. /// The file descriptor. /// The buffer from which to write data. /// Writing this buffer may change the cursor position. - internal static unsafe void Write(SafeFileHandle fd, ReadOnlySpan buffer, bool mayChangeCursorPosition = true) + private static unsafe void Write(SafeFileHandle fd, ReadOnlySpan buffer, bool mayChangeCursorPosition = true) { - // Console initialization might emit data to stdout. - // In order to avoid splitting user data we need to - // complete it before any writes are performed. - EnsureConsoleInitialized(); - fixed (byte* p = buffer) { byte* bufPtr = p; @@ -1098,7 +1113,7 @@ private static void InvalidateTerminalSettings() /// Writes a terminfo-based ANSI escape string to stdout. /// The string to write. /// Writing this value may change the cursor position. - internal static void WriteStdoutAnsiString(string? value, bool mayChangeCursorPosition = true) + internal static void WriteTerminalAnsiString(string? value, bool mayChangeCursorPosition = true) { if (string.IsNullOrEmpty(value)) return; @@ -1115,10 +1130,8 @@ internal static void WriteStdoutAnsiString(string? value, bool mayChangeCursorPo data = Encoding.UTF8.GetBytes(value); } - lock (Console.Out) // synchronize with other writers - { - Write(Interop.Sys.FileDescriptors.STDOUT_FILENO, data, mayChangeCursorPosition); - } + EnsureConsoleInitialized(); + WriteToTerminal(data, mayChangeCursorPosition); } } } diff --git a/src/libraries/System.Console/src/System/ConsolePal.Wasi.cs b/src/libraries/System.Console/src/System/ConsolePal.Wasi.cs index 6bde3aa39c57d..4022de1a439fe 100644 --- a/src/libraries/System.Console/src/System/ConsolePal.Wasi.cs +++ b/src/libraries/System.Console/src/System/ConsolePal.Wasi.cs @@ -1,11 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Diagnostics; using System.IO; using System.Text; using System.Threading; +using Microsoft.Win32.SafeHandles; #pragma warning disable IDE0060 namespace System @@ -18,24 +18,20 @@ namespace System // to also change the test class. internal static partial class ConsolePal { - // StdInReader is only used when input isn't redirected and we're working - // with an interactive terminal. In that case, performance isn't critical - // and we can use a smaller buffer to minimize working set. - // there is no dup on WASI public static Stream OpenStandardInput() { - return new UnixConsoleStream(Interop.CheckIo(Interop.Sys.FileDescriptors.STDIN_FILENO), FileAccess.Read, + return new UnixConsoleStream(Interop.Sys.FileDescriptors.STDIN_FILENO, FileAccess.Read, useReadLine: !Console.IsInputRedirected); } public static Stream OpenStandardOutput() { - return new UnixConsoleStream(Interop.CheckIo(Interop.Sys.FileDescriptors.STDOUT_FILENO), FileAccess.Write); + return new UnixConsoleStream(Interop.Sys.FileDescriptors.STDOUT_FILENO, FileAccess.Write); } public static Stream OpenStandardError() { - return new UnixConsoleStream(Interop.CheckIo(Interop.Sys.FileDescriptors.STDERR_FILENO), FileAccess.Write); + return new UnixConsoleStream(Interop.Sys.FileDescriptors.STDERR_FILENO, FileAccess.Write); } public static Encoding InputEncoding @@ -254,17 +250,21 @@ private static unsafe int Read(SafeFileHandle fd, Span buffer) } } + internal static unsafe void WriteFromConsoleStream(SafeFileHandle fd, ReadOnlySpan buffer) + { + EnsureConsoleInitialized(); + + lock (Console.Out) // synchronize with other writers + { + Write(fd, buffer); + } + } + /// Writes data from the buffer into the file descriptor. /// The file descriptor. /// The buffer from which to write data. - /// Writing this buffer may change the cursor position. - internal static unsafe void Write(SafeFileHandle fd, ReadOnlySpan buffer, bool mayChangeCursorPosition = true) + private static unsafe void Write(SafeFileHandle fd, ReadOnlySpan buffer) { - // Console initialization might emit data to stdout. - // In order to avoid splitting user data we need to - // complete it before any writes are performed. - EnsureConsoleInitialized(); - fixed (byte* p = buffer) { byte* bufPtr = p; @@ -298,36 +298,11 @@ internal static unsafe void Write(SafeFileHandle fd, ReadOnlySpan buffer, throw Interop.GetExceptionForIoErrno(errorInfo); } } + count -= bytesWritten; bufPtr += bytesWritten; } } } - - /// Writes a terminfo-based ANSI escape string to stdout. - /// The string to write. - /// Writing this value may change the cursor position. - internal static void WriteStdoutAnsiString(string? value, bool mayChangeCursorPosition = true) - { - if (string.IsNullOrEmpty(value)) - return; - - scoped Span data; - if (value.Length <= 256) // except for extremely rare cases, ANSI escape strings are very short - { - data = stackalloc byte[Encoding.UTF8.GetMaxByteCount(value.Length)]; - int bytesToWrite = Encoding.UTF8.GetBytes(value, data); - data = data.Slice(0, bytesToWrite); - } - else - { - data = Encoding.UTF8.GetBytes(value); - } - - lock (Console.Out) // synchronize with other writers - { - Write(Interop.Sys.FileDescriptors.STDOUT_FILENO, data, mayChangeCursorPosition); - } - } } } diff --git a/src/libraries/System.Console/src/System/ConsolePal.WebAssembly.cs b/src/libraries/System.Console/src/System/ConsolePal.WebAssembly.cs index 0498e973bd0f6..39346e2906327 100644 --- a/src/libraries/System.Console/src/System/ConsolePal.WebAssembly.cs +++ b/src/libraries/System.Console/src/System/ConsolePal.WebAssembly.cs @@ -2,9 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.IO; +using System.Runtime.InteropServices.JavaScript; using System.Text; using Microsoft.Win32.SafeHandles; -using System.Runtime.InteropServices.JavaScript; namespace System { diff --git a/src/libraries/System.Console/src/System/IO/StdInReader.cs b/src/libraries/System.Console/src/System/IO/StdInReader.cs index 801c0c78e53dd..1c6e23e4830a5 100644 --- a/src/libraries/System.Console/src/System/IO/StdInReader.cs +++ b/src/libraries/System.Console/src/System/IO/StdInReader.cs @@ -5,10 +5,11 @@ using System.Diagnostics; using System.Runtime.InteropServices; using System.Text; +using Microsoft.Win32.SafeHandles; namespace System.IO { - /* This class is used by for reading from the stdin. + /* This class is used by for reading from the stdin when it is a terminal. * It is designed to read stdin in raw mode for interpreting * key press events and maintain its own buffer for the same. * which is then used for all the Read operations @@ -22,6 +23,7 @@ internal sealed class StdInReader : TextReader private readonly Stack _tmpKeys = new Stack(); // temporary working stack; should be empty outside of ReadLine private readonly Stack _availableKeys = new Stack(); // a queue of already processed key infos available for reading private readonly Encoding _encoding; + private readonly Encoder _echoEncoder; private Encoder? _bufferReadEncoder; private char[] _unprocessedBufferToBeRead; // Buffer that might have already been read from stdin but not yet processed. @@ -31,11 +33,14 @@ internal sealed class StdInReader : TextReader internal StdInReader(Encoding encoding) { + Debug.Assert(!Console.IsInputRedirected); // stdin is a terminal. + _encoding = encoding; _unprocessedBufferToBeRead = new char[encoding.GetMaxCharCount(BytesToBeRead)]; _startIndex = 0; _endIndex = 0; _readLineSB = new StringBuilder(); + _echoEncoder = _encoding.GetEncoder(); } /// Checks whether the unprocessed buffer is empty. @@ -173,7 +178,7 @@ private bool ReadLineCore(bool consumeKeys) { if (freshKeys) { - Console.WriteLine(); + EchoToTerminal('\n'); } return true; } @@ -208,9 +213,9 @@ private bool ReadLineCore(bool consumeKeys) s_clearToEol ??= ConsolePal.TerminalFormatStringsInstance.ClrEol ?? string.Empty; // Move to end of previous line - ConsolePal.SetCursorPosition(ConsolePal.WindowWidth - 1, top - 1); + ConsolePal.SetTerminalCursorPosition(ConsolePal.WindowWidth - 1, top - 1); // Clear from cursor to end of the line - ConsolePal.WriteStdoutAnsiString(s_clearToEol, mayChangeCursorPosition: false); + ConsolePal.WriteTerminalAnsiString(s_clearToEol, mayChangeCursorPosition: false); } else { @@ -220,7 +225,7 @@ private bool ReadLineCore(bool consumeKeys) s_moveLeftString = !string.IsNullOrEmpty(moveLeft) ? moveLeft + " " + moveLeft : string.Empty; } - Console.Write(s_moveLeftString); + ConsolePal.WriteTerminalAnsiString(s_moveLeftString); } } } @@ -232,7 +237,7 @@ private bool ReadLineCore(bool consumeKeys) } if (freshKeys) { - Console.Write(' '); + EchoToTerminal(' '); } } else if (keyInfo.Key == ConsoleKey.Clear) @@ -240,7 +245,7 @@ private bool ReadLineCore(bool consumeKeys) _readLineSB.Clear(); if (freshKeys) { - Console.Clear(); + ConsolePal.WriteTerminalAnsiString(ConsolePal.TerminalFormatStringsInstance.Clear); } } else if (keyInfo.KeyChar != '\0') @@ -251,7 +256,7 @@ private bool ReadLineCore(bool consumeKeys) } if (freshKeys) { - Console.Write(keyInfo.KeyChar); + EchoToTerminal(keyInfo.KeyChar); } } } @@ -311,16 +316,21 @@ private static bool IsEol(char c) /// not work, we simply return the char associated with that /// key with ConsoleKey set to default value. /// - public ConsoleKeyInfo ReadKey(out bool previouslyProcessed) + public ConsoleKeyInfo ReadKey(bool intercept) { if (_availableKeys.Count > 0) { - previouslyProcessed = true; return _availableKeys.Pop(); } - previouslyProcessed = false; - return ReadKey(); + ConsoleKeyInfo keyInfo = ReadKey(); + + if (!intercept && keyInfo.KeyChar != '\0') + { + EchoToTerminal(keyInfo.KeyChar); + } + + return keyInfo; } private unsafe ConsoleKeyInfo ReadKey() @@ -363,5 +373,26 @@ private unsafe ConsoleKeyInfo ReadKey() /// Gets whether there's input waiting on stdin. internal static bool StdinReady => Interop.Sys.StdinReady(); + + private void EchoToTerminal(char c) + { + Span bytes = stackalloc byte[32]; // 32 bytes seems ample + int bytesWritten = 1; + if (Ascii.IsValid(c)) + { + bytes[0] = (byte)c; + } + else + { + var chars = new ReadOnlySpan(in c); + bytesWritten = _echoEncoder.GetBytes(chars, bytes, flush: false); + if (bytesWritten == 0) + { + return; + } + } + + ConsolePal.WriteToTerminal(bytes.Slice(0, bytesWritten)); + } } } diff --git a/src/libraries/System.Console/src/System/IO/SyncTextReader.Unix.cs b/src/libraries/System.Console/src/System/IO/SyncTextReader.Unix.cs index ce6e55461e144..6cea7d6bafd62 100644 --- a/src/libraries/System.Console/src/System/IO/SyncTextReader.Unix.cs +++ b/src/libraries/System.Console/src/System/IO/SyncTextReader.Unix.cs @@ -20,11 +20,11 @@ internal StdInReader Inner } } - public ConsoleKeyInfo ReadKey(out bool previouslyProcessed) + public ConsoleKeyInfo ReadKey(bool intercept) { lock (this) { - return Inner.ReadKey(out previouslyProcessed); + return Inner.ReadKey(intercept); } } diff --git a/src/libraries/System.Data.Common/src/System/Data/ColumnTypeConverter.cs b/src/libraries/System.Data.Common/src/System/Data/ColumnTypeConverter.cs index c696f7d92bdaf..dfa119031a164 100644 --- a/src/libraries/System.Data.Common/src/System/Data/ColumnTypeConverter.cs +++ b/src/libraries/System.Data.Common/src/System/Data/ColumnTypeConverter.cs @@ -3,9 +3,9 @@ using System.ComponentModel; using System.ComponentModel.Design.Serialization; +using System.Data.SqlTypes; using System.Diagnostics.CodeAnalysis; using System.Globalization; -using System.Data.SqlTypes; using System.Reflection; namespace System.Data diff --git a/src/libraries/System.Data.Common/src/System/Data/Common/DbCommand.cs b/src/libraries/System.Data.Common/src/System/Data/Common/DbCommand.cs index 1f00276ae470b..5538ea867a81b 100644 --- a/src/libraries/System.Data.Common/src/System/Data/Common/DbCommand.cs +++ b/src/libraries/System.Data.Common/src/System/Data/Common/DbCommand.cs @@ -3,8 +3,8 @@ using System.ComponentModel; using System.Diagnostics.CodeAnalysis; -using System.Threading.Tasks; using System.Threading; +using System.Threading.Tasks; namespace System.Data.Common { diff --git a/src/libraries/System.Data.Common/src/System/Data/Common/DbConnectionStringBuilder.cs b/src/libraries/System.Data.Common/src/System/Data/Common/DbConnectionStringBuilder.cs index d252c3326f890..46b45be82c843 100644 --- a/src/libraries/System.Data.Common/src/System/Data/Common/DbConnectionStringBuilder.cs +++ b/src/libraries/System.Data.Common/src/System/Data/Common/DbConnectionStringBuilder.cs @@ -6,9 +6,9 @@ using System.Collections.ObjectModel; using System.ComponentModel; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Text; -using System.Diagnostics.CodeAnalysis; namespace System.Data.Common { diff --git a/src/libraries/System.Data.Common/src/System/Data/Common/DbDataAdapter.cs b/src/libraries/System.Data.Common/src/System/Data/Common/DbDataAdapter.cs index a399e812a406b..74ddb68a640d1 100644 --- a/src/libraries/System.Data.Common/src/System/Data/Common/DbDataAdapter.cs +++ b/src/libraries/System.Data.Common/src/System/Data/Common/DbDataAdapter.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.ComponentModel; using System.Collections.Generic; +using System.ComponentModel; using System.Data.ProviderBase; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; diff --git a/src/libraries/System.Data.Common/src/System/Data/Common/DbDataReader.cs b/src/libraries/System.Data.Common/src/System/Data/Common/DbDataReader.cs index b58b7d367f8a4..77f2184ea1b03 100644 --- a/src/libraries/System.Data.Common/src/System/Data/Common/DbDataReader.cs +++ b/src/libraries/System.Data.Common/src/System/Data/Common/DbDataReader.cs @@ -4,10 +4,10 @@ using System.Collections; using System.Collections.ObjectModel; using System.ComponentModel; +using System.Diagnostics.CodeAnalysis; using System.IO; -using System.Threading.Tasks; using System.Threading; -using System.Diagnostics.CodeAnalysis; +using System.Threading.Tasks; namespace System.Data.Common { diff --git a/src/libraries/System.Data.Common/src/System/Data/Common/DbDataSource.cs b/src/libraries/System.Data.Common/src/System/Data/Common/DbDataSource.cs index c51c7f5950713..1f9528ca7e6d4 100644 --- a/src/libraries/System.Data.Common/src/System/Data/Common/DbDataSource.cs +++ b/src/libraries/System.Data.Common/src/System/Data/Common/DbDataSource.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Threading; -using System.Threading.Tasks; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; +using System.Threading; +using System.Threading.Tasks; namespace System.Data.Common { diff --git a/src/libraries/System.Data.Common/src/System/Data/Common/DbEnumerator.cs b/src/libraries/System.Data.Common/src/System/Data/Common/DbEnumerator.cs index 4c7fbd2c90759..9dea48bde17fe 100644 --- a/src/libraries/System.Data.Common/src/System/Data/Common/DbEnumerator.cs +++ b/src/libraries/System.Data.Common/src/System/Data/Common/DbEnumerator.cs @@ -2,9 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Collections; +using System.ComponentModel; using System.Data.ProviderBase; using System.Diagnostics; -using System.ComponentModel; namespace System.Data.Common { diff --git a/src/libraries/System.Data.Common/src/System/Data/Common/DbParameterCollection.cs b/src/libraries/System.Data.Common/src/System/Data/Common/DbParameterCollection.cs index e826480f8717d..553d362c060b3 100644 --- a/src/libraries/System.Data.Common/src/System/Data/Common/DbParameterCollection.cs +++ b/src/libraries/System.Data.Common/src/System/Data/Common/DbParameterCollection.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.ComponentModel; using System.Collections; +using System.ComponentModel; using System.Diagnostics.CodeAnalysis; namespace System.Data.Common diff --git a/src/libraries/System.Data.Common/src/System/Data/Common/ObjectStorage.cs b/src/libraries/System.Data.Common/src/System/Data/Common/ObjectStorage.cs index 58cae79e3d6ea..21f097819393f 100644 --- a/src/libraries/System.Data.Common/src/System/Data/Common/ObjectStorage.cs +++ b/src/libraries/System.Data.Common/src/System/Data/Common/ObjectStorage.cs @@ -1,15 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Xml; -using System.IO; -using System.Xml.Serialization; using System.Collections; using System.Collections.Generic; using System.Diagnostics; -using System.Runtime.CompilerServices; -using System.Dynamic; using System.Diagnostics.CodeAnalysis; +using System.Dynamic; +using System.IO; +using System.Runtime.CompilerServices; +using System.Xml; +using System.Xml.Serialization; namespace System.Data.Common { diff --git a/src/libraries/System.Data.Common/src/System/Data/Common/SQLConvert.cs b/src/libraries/System.Data.Common/src/System/Data/Common/SQLConvert.cs index b01eeb5f9bcb6..bba7cf4dc3414 100644 --- a/src/libraries/System.Data.Common/src/System/Data/Common/SQLConvert.cs +++ b/src/libraries/System.Data.Common/src/System/Data/Common/SQLConvert.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Data.SqlTypes; -using System.Xml; using System.Diagnostics; +using System.Xml; namespace System.Data.Common { diff --git a/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLBinaryStorage.cs b/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLBinaryStorage.cs index 5c69227729c0e..c30a93b200d72 100644 --- a/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLBinaryStorage.cs +++ b/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLBinaryStorage.cs @@ -1,13 +1,13 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Xml; +using System.Collections; using System.Data.SqlTypes; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.IO; +using System.Xml; using System.Xml.Serialization; -using System.Collections; -using System.Diagnostics.CodeAnalysis; namespace System.Data.Common { diff --git a/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLByteStorage.cs b/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLByteStorage.cs index eaaa6f1255b50..9f2fa3e741117 100644 --- a/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLByteStorage.cs +++ b/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLByteStorage.cs @@ -1,13 +1,13 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Xml; +using System.Collections; using System.Data.SqlTypes; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.IO; +using System.Xml; using System.Xml.Serialization; -using System.Collections; -using System.Diagnostics.CodeAnalysis; namespace System.Data.Common { diff --git a/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLCharsStorage.cs b/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLCharsStorage.cs index 32352bab64b4b..2171c09a552d9 100644 --- a/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLCharsStorage.cs +++ b/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLCharsStorage.cs @@ -1,13 +1,13 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Xml; -using System.IO; -using System.Xml.Serialization; +using System.Collections; using System.Data.SqlTypes; using System.Diagnostics; -using System.Collections; using System.Diagnostics.CodeAnalysis; +using System.IO; +using System.Xml; +using System.Xml.Serialization; namespace System.Data.Common { diff --git a/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLDateTimeStorage.cs b/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLDateTimeStorage.cs index a68f5a8214c84..5942a382c5d4d 100644 --- a/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLDateTimeStorage.cs +++ b/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLDateTimeStorage.cs @@ -1,13 +1,13 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Xml; +using System.Collections; using System.Data.SqlTypes; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.IO; +using System.Xml; using System.Xml.Serialization; -using System.Collections; -using System.Diagnostics.CodeAnalysis; namespace System.Data.Common { diff --git a/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLDecimalStorage.cs b/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLDecimalStorage.cs index 9187efd5d3564..139880c43bc42 100644 --- a/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLDecimalStorage.cs +++ b/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLDecimalStorage.cs @@ -1,13 +1,13 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Xml; +using System.Collections; using System.Data.SqlTypes; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.IO; +using System.Xml; using System.Xml.Serialization; -using System.Collections; -using System.Diagnostics.CodeAnalysis; namespace System.Data.Common { diff --git a/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLDoubleStorage.cs b/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLDoubleStorage.cs index 0f567b0bc40a1..b8f05f68022a1 100644 --- a/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLDoubleStorage.cs +++ b/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLDoubleStorage.cs @@ -1,13 +1,13 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Xml; +using System.Collections; using System.Data.SqlTypes; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.IO; +using System.Xml; using System.Xml.Serialization; -using System.Collections; -using System.Diagnostics.CodeAnalysis; namespace System.Data.Common { diff --git a/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLGuidStorage.cs b/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLGuidStorage.cs index daa553b836339..27d8ddc6dd192 100644 --- a/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLGuidStorage.cs +++ b/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLGuidStorage.cs @@ -1,13 +1,13 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Xml; +using System.Collections; using System.Data.SqlTypes; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.IO; +using System.Xml; using System.Xml.Serialization; -using System.Collections; -using System.Diagnostics.CodeAnalysis; namespace System.Data.Common { diff --git a/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLInt16Storage.cs b/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLInt16Storage.cs index 409ed1e3d780f..6b7c587f262c0 100644 --- a/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLInt16Storage.cs +++ b/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLInt16Storage.cs @@ -1,13 +1,13 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Xml; +using System.Collections; using System.Data.SqlTypes; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.IO; +using System.Xml; using System.Xml.Serialization; -using System.Collections; -using System.Diagnostics.CodeAnalysis; namespace System.Data.Common { diff --git a/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLInt32Storage.cs b/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLInt32Storage.cs index fab103c633922..c59d843250e63 100644 --- a/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLInt32Storage.cs +++ b/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLInt32Storage.cs @@ -1,13 +1,13 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Xml; +using System.Collections; using System.Data.SqlTypes; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.IO; +using System.Xml; using System.Xml.Serialization; -using System.Collections; -using System.Diagnostics.CodeAnalysis; namespace System.Data.Common { diff --git a/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLInt64Storage.cs b/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLInt64Storage.cs index 840b924f3dc3e..1fb635158cbd3 100644 --- a/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLInt64Storage.cs +++ b/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLInt64Storage.cs @@ -1,13 +1,13 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Xml; +using System.Collections; using System.Data.SqlTypes; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.IO; +using System.Xml; using System.Xml.Serialization; -using System.Collections; -using System.Diagnostics.CodeAnalysis; namespace System.Data.Common { diff --git a/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLMoneyStorage.cs b/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLMoneyStorage.cs index 75b06dc1607b9..bae15b5c1b9d5 100644 --- a/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLMoneyStorage.cs +++ b/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLMoneyStorage.cs @@ -1,13 +1,13 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Xml; +using System.Collections; using System.Data.SqlTypes; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.IO; +using System.Xml; using System.Xml.Serialization; -using System.Collections; -using System.Diagnostics.CodeAnalysis; namespace System.Data.Common { diff --git a/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLSingleStorage.cs b/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLSingleStorage.cs index 2c38519859c29..ce7dfe3187083 100644 --- a/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLSingleStorage.cs +++ b/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLSingleStorage.cs @@ -1,13 +1,13 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Xml; +using System.Collections; using System.Data.SqlTypes; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.IO; +using System.Xml; using System.Xml.Serialization; -using System.Collections; -using System.Diagnostics.CodeAnalysis; namespace System.Data.Common { diff --git a/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLStringStorage.cs b/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLStringStorage.cs index c47165a9f451c..86efe6f061273 100644 --- a/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLStringStorage.cs +++ b/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQLStringStorage.cs @@ -1,13 +1,13 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Xml; +using System.Collections; using System.Data.SqlTypes; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.IO; +using System.Xml; using System.Xml.Serialization; -using System.Collections; -using System.Diagnostics.CodeAnalysis; namespace System.Data.Common { diff --git a/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQlBooleanStorage.cs b/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQlBooleanStorage.cs index 08362e91d8e1c..3e918c3a47b65 100644 --- a/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQlBooleanStorage.cs +++ b/src/libraries/System.Data.Common/src/System/Data/Common/SQLTypes/SQlBooleanStorage.cs @@ -1,13 +1,13 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Xml; +using System.Collections; using System.Data.SqlTypes; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.IO; +using System.Xml; using System.Xml.Serialization; -using System.Collections; -using System.Diagnostics.CodeAnalysis; namespace System.Data.Common { diff --git a/src/libraries/System.Data.Common/src/System/Data/Common/StringStorage.cs b/src/libraries/System.Data.Common/src/System/Data/Common/StringStorage.cs index f3e457b8569c3..cd3e20f11bde9 100644 --- a/src/libraries/System.Data.Common/src/System/Data/Common/StringStorage.cs +++ b/src/libraries/System.Data.Common/src/System/Data/Common/StringStorage.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Diagnostics; using System.Collections; +using System.Diagnostics; using System.Diagnostics.CodeAnalysis; namespace System.Data.Common diff --git a/src/libraries/System.Data.Common/src/System/Data/ConstraintCollection.cs b/src/libraries/System.Data.Common/src/System/Data/ConstraintCollection.cs index b410f4b96068d..7c3fb20e2e8af 100644 --- a/src/libraries/System.Data.Common/src/System/Data/ConstraintCollection.cs +++ b/src/libraries/System.Data.Common/src/System/Data/ConstraintCollection.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Diagnostics; using System.Collections; using System.ComponentModel; +using System.Diagnostics; using System.Resources; namespace System.Data diff --git a/src/libraries/System.Data.Common/src/System/Data/DataColumn.cs b/src/libraries/System.Data.Common/src/System/Data/DataColumn.cs index fafaf342995e1..3c048496bc806 100644 --- a/src/libraries/System.Data.Common/src/System/Data/DataColumn.cs +++ b/src/libraries/System.Data.Common/src/System/Data/DataColumn.cs @@ -1,20 +1,20 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Xml; -using System.Data.Common; +using System.Collections; +using System.Collections.Generic; using System.ComponentModel; +using System.Data.Common; +using System.Data.SqlTypes; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Globalization; -using System.Data.SqlTypes; -using System.Xml.Serialization; -using System.Runtime.CompilerServices; -using System.Collections.Generic; -using System.Threading; using System.Numerics; using System.Reflection; -using System.Collections; -using System.Diagnostics.CodeAnalysis; +using System.Runtime.CompilerServices; +using System.Threading; +using System.Xml; +using System.Xml.Serialization; namespace System.Data { diff --git a/src/libraries/System.Data.Common/src/System/Data/DataRelation.cs b/src/libraries/System.Data.Common/src/System/Data/DataRelation.cs index 1a44717e6e5dc..1e899c9cab83c 100644 --- a/src/libraries/System.Data.Common/src/System/Data/DataRelation.cs +++ b/src/libraries/System.Data.Common/src/System/Data/DataRelation.cs @@ -19,12 +19,12 @@ We decided to enforce the rule 1 just if Xml being persisted ******************************************************************************************************/ +using System.Collections.Generic; using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; using System.Data.Common; -using System.Collections.Generic; +using System.Diagnostics; using System.Diagnostics.CodeAnalysis; +using System.Globalization; using System.Threading; namespace System.Data diff --git a/src/libraries/System.Data.Common/src/System/Data/DataTable.cs b/src/libraries/System.Data.Common/src/System/Data/DataTable.cs index 71813c5d78fd2..428393d70ea17 100644 --- a/src/libraries/System.Data.Common/src/System/Data/DataTable.cs +++ b/src/libraries/System.Data.Common/src/System/Data/DataTable.cs @@ -4,18 +4,18 @@ using System.Collections; using System.Collections.Generic; using System.ComponentModel; +using System.Data.Common; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.IO; +using System.Runtime.CompilerServices; using System.Runtime.Serialization; using System.Text; using System.Threading; using System.Xml; using System.Xml.Schema; using System.Xml.Serialization; -using System.Data.Common; -using System.Diagnostics.CodeAnalysis; -using System.Runtime.CompilerServices; namespace System.Data { diff --git a/src/libraries/System.Data.Common/src/System/Data/DataTableCollection.cs b/src/libraries/System.Data.Common/src/System/Data/DataTableCollection.cs index 282456d6d7304..817a561b15124 100644 --- a/src/libraries/System.Data.Common/src/System/Data/DataTableCollection.cs +++ b/src/libraries/System.Data.Common/src/System/Data/DataTableCollection.cs @@ -1,12 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Diagnostics; using System.Collections; -using System.ComponentModel; -using System.Globalization; using System.Collections.Generic; +using System.ComponentModel; +using System.Diagnostics; using System.Diagnostics.CodeAnalysis; +using System.Globalization; namespace System.Data { diff --git a/src/libraries/System.Data.Common/src/System/Data/DataTableReader.cs b/src/libraries/System.Data.Common/src/System/Data/DataTableReader.cs index 1ca55a9f40972..a5694d186d737 100644 --- a/src/libraries/System.Data.Common/src/System/Data/DataTableReader.cs +++ b/src/libraries/System.Data.Common/src/System/Data/DataTableReader.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Data.Common; using System.Collections; +using System.Data.Common; using System.Diagnostics.CodeAnalysis; namespace System.Data diff --git a/src/libraries/System.Data.Common/src/System/Data/DataViewListener.cs b/src/libraries/System.Data.Common/src/System/Data/DataViewListener.cs index 940b866b9ba8c..91c6008f176fa 100644 --- a/src/libraries/System.Data.Common/src/System/Data/DataViewListener.cs +++ b/src/libraries/System.Data.Common/src/System/Data/DataViewListener.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.ComponentModel; using System.Collections.Generic; +using System.ComponentModel; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; diff --git a/src/libraries/System.Data.Common/src/System/Data/DataViewManager.cs b/src/libraries/System.Data.Common/src/System/Data/DataViewManager.cs index 58b72f3b3a7e8..8611817f284e5 100644 --- a/src/libraries/System.Data.Common/src/System/Data/DataViewManager.cs +++ b/src/libraries/System.Data.Common/src/System/Data/DataViewManager.cs @@ -1,11 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.ComponentModel; using System.Collections; +using System.ComponentModel; using System.Diagnostics.CodeAnalysis; -using System.IO; using System.Globalization; +using System.IO; using System.Text; using System.Xml; diff --git a/src/libraries/System.Data.Common/src/System/Data/DataViewSettingCollection.cs b/src/libraries/System.Data.Common/src/System/Data/DataViewSettingCollection.cs index 8145dadcdd589..f9dd6cdd6c3b7 100644 --- a/src/libraries/System.Data.Common/src/System/Data/DataViewSettingCollection.cs +++ b/src/libraries/System.Data.Common/src/System/Data/DataViewSettingCollection.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.ComponentModel; using System.Collections; +using System.ComponentModel; using System.Diagnostics.CodeAnalysis; namespace System.Data diff --git a/src/libraries/System.Data.Common/src/System/Data/Filter/AggregateNode.cs b/src/libraries/System.Data.Common/src/System/Data/Filter/AggregateNode.cs index edefa695a40c7..4b09e9834b06d 100644 --- a/src/libraries/System.Data.Common/src/System/Data/Filter/AggregateNode.cs +++ b/src/libraries/System.Data.Common/src/System/Data/Filter/AggregateNode.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Diagnostics; using System.Collections.Generic; +using System.Diagnostics; using System.Diagnostics.CodeAnalysis; namespace System.Data diff --git a/src/libraries/System.Data.Common/src/System/Data/Filter/BinaryNode.cs b/src/libraries/System.Data.Common/src/System/Data/Filter/BinaryNode.cs index 11aa6c3dc27d3..010ccc1f1fe1a 100644 --- a/src/libraries/System.Data.Common/src/System/Data/Filter/BinaryNode.cs +++ b/src/libraries/System.Data.Common/src/System/Data/Filter/BinaryNode.cs @@ -1,12 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Diagnostics; using System.Collections.Generic; -using System.Globalization; -using System.Data.SqlTypes; using System.Data.Common; +using System.Data.SqlTypes; +using System.Diagnostics; using System.Diagnostics.CodeAnalysis; +using System.Globalization; namespace System.Data { diff --git a/src/libraries/System.Data.Common/src/System/Data/Filter/ConstNode.cs b/src/libraries/System.Data.Common/src/System/Data/Filter/ConstNode.cs index 5a8f16bf62030..46361e3b5bd00 100644 --- a/src/libraries/System.Data.Common/src/System/Data/Filter/ConstNode.cs +++ b/src/libraries/System.Data.Common/src/System/Data/Filter/ConstNode.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Diagnostics; using System.Collections.Generic; -using System.Globalization; +using System.Diagnostics; using System.Diagnostics.CodeAnalysis; +using System.Globalization; namespace System.Data { diff --git a/src/libraries/System.Data.Common/src/System/Data/Filter/DataExpression.cs b/src/libraries/System.Data.Common/src/System/Data/Filter/DataExpression.cs index 0d36491d7ed85..3c97fb6022893 100644 --- a/src/libraries/System.Data.Common/src/System/Data/Filter/DataExpression.cs +++ b/src/libraries/System.Data.Common/src/System/Data/Filter/DataExpression.cs @@ -1,11 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Diagnostics; -using System.Diagnostics.CodeAnalysis; using System.Collections.Generic; -using System.Data.SqlTypes; using System.Data.Common; +using System.Data.SqlTypes; +using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; namespace System.Data { diff --git a/src/libraries/System.Data.Common/src/System/Data/Filter/UnaryNode.cs b/src/libraries/System.Data.Common/src/System/Data/Filter/UnaryNode.cs index 771444f98dade..7ac2e41a04bb3 100644 --- a/src/libraries/System.Data.Common/src/System/Data/Filter/UnaryNode.cs +++ b/src/libraries/System.Data.Common/src/System/Data/Filter/UnaryNode.cs @@ -2,9 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Collections.Generic; -using System.Diagnostics; using System.Data.Common; using System.Data.SqlTypes; +using System.Diagnostics; using System.Diagnostics.CodeAnalysis; namespace System.Data diff --git a/src/libraries/System.Data.Common/src/System/Data/ForeignKeyConstraint.cs b/src/libraries/System.Data.Common/src/System/Data/ForeignKeyConstraint.cs index b0e1edf97762e..b8844d62c1f55 100644 --- a/src/libraries/System.Data.Common/src/System/Data/ForeignKeyConstraint.cs +++ b/src/libraries/System.Data.Common/src/System/Data/ForeignKeyConstraint.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.ComponentModel; -using System.Diagnostics; using System.Data.Common; +using System.Diagnostics; using System.Diagnostics.CodeAnalysis; namespace System.Data diff --git a/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLBinary.cs b/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLBinary.cs index 4ecff90a667fe..ef6fc2d2f0412 100644 --- a/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLBinary.cs +++ b/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLBinary.cs @@ -3,11 +3,11 @@ using System.Data.Common; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Xml; using System.Xml.Schema; using System.Xml.Serialization; -using System.Diagnostics.CodeAnalysis; namespace System.Data.SqlTypes { diff --git a/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLBoolean.cs b/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLBoolean.cs index 746e0ce021e06..fea40b72db607 100644 --- a/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLBoolean.cs +++ b/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLBoolean.cs @@ -3,11 +3,11 @@ using System.Data.Common; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Runtime.InteropServices; using System.Xml; using System.Xml.Schema; using System.Xml.Serialization; -using System.Diagnostics.CodeAnalysis; namespace System.Data.SqlTypes { diff --git a/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLByte.cs b/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLByte.cs index 536b7aaeffb9e..55dbcd9a347fd 100644 --- a/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLByte.cs +++ b/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLByte.cs @@ -2,11 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Data.Common; +using System.Diagnostics.CodeAnalysis; using System.Runtime.InteropServices; using System.Xml; using System.Xml.Schema; using System.Xml.Serialization; -using System.Diagnostics.CodeAnalysis; namespace System.Data.SqlTypes { diff --git a/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLBytes.cs b/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLBytes.cs index 581601333c395..a7c3bc35d9491 100644 --- a/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLBytes.cs +++ b/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLBytes.cs @@ -1,14 +1,14 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Diagnostics; using System.Data.Common; +using System.Diagnostics; using System.IO; +using System.Runtime.CompilerServices; using System.Runtime.Serialization; using System.Xml; using System.Xml.Schema; using System.Xml.Serialization; -using System.Runtime.CompilerServices; namespace System.Data.SqlTypes { diff --git a/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLChars.cs b/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLChars.cs index dbd83791026fb..4c6554cea7aab 100644 --- a/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLChars.cs +++ b/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLChars.cs @@ -1,14 +1,14 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.IO; -using System.Diagnostics; using System.Data.Common; +using System.Diagnostics; +using System.IO; +using System.Runtime.CompilerServices; +using System.Runtime.Serialization; using System.Xml; using System.Xml.Schema; using System.Xml.Serialization; -using System.Runtime.Serialization; -using System.Runtime.CompilerServices; namespace System.Data.SqlTypes { diff --git a/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLDateTime.cs b/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLDateTime.cs index 860d67c1f5b8b..a865a948b4772 100644 --- a/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLDateTime.cs +++ b/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLDateTime.cs @@ -3,12 +3,12 @@ using System.Data.Common; using System.Diagnostics; -using System.Runtime.InteropServices; +using System.Diagnostics.CodeAnalysis; using System.Globalization; +using System.Runtime.InteropServices; using System.Xml; using System.Xml.Schema; using System.Xml.Serialization; -using System.Diagnostics.CodeAnalysis; namespace System.Data.SqlTypes { diff --git a/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLDecimal.cs b/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLDecimal.cs index f0ce60d56a854..7bf9859a57186 100644 --- a/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLDecimal.cs +++ b/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLDecimal.cs @@ -3,12 +3,12 @@ using System.Data.Common; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Runtime.InteropServices; using System.Xml; using System.Xml.Schema; using System.Xml.Serialization; -using System.Diagnostics.CodeAnalysis; namespace System.Data.SqlTypes { diff --git a/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLDouble.cs b/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLDouble.cs index e5d8ab6780d4b..9141acc6a5b72 100644 --- a/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLDouble.cs +++ b/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLDouble.cs @@ -2,12 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Data.Common; -using System.Runtime.InteropServices; +using System.Diagnostics.CodeAnalysis; using System.Globalization; +using System.Runtime.InteropServices; using System.Xml; using System.Xml.Schema; using System.Xml.Serialization; -using System.Diagnostics.CodeAnalysis; namespace System.Data.SqlTypes { diff --git a/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLGuid.cs b/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLGuid.cs index 5a8da5eb68079..712300038479c 100644 --- a/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLGuid.cs +++ b/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLGuid.cs @@ -3,13 +3,13 @@ using System.Data.Common; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Serialization; using System.Xml; using System.Xml.Schema; using System.Xml.Serialization; -using System.Diagnostics.CodeAnalysis; namespace System.Data.SqlTypes { diff --git a/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLInt16.cs b/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLInt16.cs index d3a4368c02e3e..0056f6cf49dba 100644 --- a/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLInt16.cs +++ b/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLInt16.cs @@ -2,11 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Data.Common; +using System.Diagnostics.CodeAnalysis; using System.Runtime.InteropServices; using System.Xml; using System.Xml.Schema; using System.Xml.Serialization; -using System.Diagnostics.CodeAnalysis; namespace System.Data.SqlTypes { diff --git a/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLInt32.cs b/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLInt32.cs index 49627f3243cff..793bf8bd7b9b1 100644 --- a/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLInt32.cs +++ b/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLInt32.cs @@ -2,11 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Data.Common; +using System.Diagnostics.CodeAnalysis; using System.Runtime.InteropServices; using System.Xml; using System.Xml.Schema; using System.Xml.Serialization; -using System.Diagnostics.CodeAnalysis; namespace System.Data.SqlTypes { diff --git a/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLInt64.cs b/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLInt64.cs index 65f66039fd80a..75ed52cbb9598 100644 --- a/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLInt64.cs +++ b/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLInt64.cs @@ -3,11 +3,11 @@ using System.Data.Common; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Runtime.InteropServices; using System.Xml; using System.Xml.Schema; using System.Xml.Serialization; -using System.Diagnostics.CodeAnalysis; namespace System.Data.SqlTypes { diff --git a/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLMoney.cs b/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLMoney.cs index 838c872acc399..8d028c5906d48 100644 --- a/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLMoney.cs +++ b/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLMoney.cs @@ -3,12 +3,12 @@ using System.Data.Common; using System.Diagnostics; -using System.Runtime.InteropServices; +using System.Diagnostics.CodeAnalysis; using System.Globalization; +using System.Runtime.InteropServices; using System.Xml; using System.Xml.Schema; using System.Xml.Serialization; -using System.Diagnostics.CodeAnalysis; namespace System.Data.SqlTypes { diff --git a/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLSingle.cs b/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLSingle.cs index 04648e2edf6f2..2ef1b1bd71f33 100644 --- a/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLSingle.cs +++ b/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLSingle.cs @@ -2,12 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Data.Common; -using System.Runtime.InteropServices; +using System.Diagnostics.CodeAnalysis; using System.Globalization; +using System.Runtime.InteropServices; using System.Xml; using System.Xml.Schema; using System.Xml.Serialization; -using System.Diagnostics.CodeAnalysis; namespace System.Data.SqlTypes { diff --git a/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLString.cs b/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLString.cs index 26f5e25527bd8..582fbc8197467 100644 --- a/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLString.cs +++ b/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLString.cs @@ -3,13 +3,13 @@ using System.Data.Common; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Runtime.InteropServices; using System.Text; using System.Xml; using System.Xml.Schema; using System.Xml.Serialization; -using System.Diagnostics.CodeAnalysis; namespace System.Data.SqlTypes { diff --git a/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SqlXml.cs b/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SqlXml.cs index 4f76cd5bd979f..e3aa34eb0883a 100644 --- a/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SqlXml.cs +++ b/src/libraries/System.Data.Common/src/System/Data/SQLTypes/SqlXml.cs @@ -1,15 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.IO; -using System.Xml; -using System.Xml.Serialization; -using System.Xml.Schema; using System.Data.Common; using System.Diagnostics; -using System.Text; -using System.Reflection; using System.Diagnostics.CodeAnalysis; +using System.IO; +using System.Reflection; +using System.Text; +using System.Xml; +using System.Xml.Schema; +using System.Xml.Serialization; namespace System.Data.SqlTypes { diff --git a/src/libraries/System.Data.Common/src/System/Data/Selection.cs b/src/libraries/System.Data.Common/src/System/Data/Selection.cs index ab06ca5ce4a72..a78a2a4097f91 100644 --- a/src/libraries/System.Data.Common/src/System/Data/Selection.cs +++ b/src/libraries/System.Data.Common/src/System/Data/Selection.cs @@ -1,11 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Diagnostics; -using System.ComponentModel; using System.Collections.Generic; -using System.Threading; +using System.ComponentModel; +using System.Diagnostics; using System.Diagnostics.CodeAnalysis; +using System.Threading; namespace System.Data { diff --git a/src/libraries/System.Data.Common/src/System/Data/SimpleType.cs b/src/libraries/System.Data.Common/src/System/Data/SimpleType.cs index dafe0af9a9876..a00008621b863 100644 --- a/src/libraries/System.Data.Common/src/System/Data/SimpleType.cs +++ b/src/libraries/System.Data.Common/src/System/Data/SimpleType.cs @@ -1,12 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Xml; -using System.Xml.Schema; -using System.Runtime.Serialization; -using System.Globalization; using System.Collections; using System.Data.Common; +using System.Globalization; +using System.Runtime.Serialization; +using System.Xml; +using System.Xml.Schema; namespace System.Data { diff --git a/src/libraries/System.Data.Common/src/System/Data/UniqueConstraint.cs b/src/libraries/System.Data.Common/src/System/Data/UniqueConstraint.cs index 698e0f4cae8bd..705a0f5a5509d 100644 --- a/src/libraries/System.Data.Common/src/System/Data/UniqueConstraint.cs +++ b/src/libraries/System.Data.Common/src/System/Data/UniqueConstraint.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Diagnostics; using System.ComponentModel; +using System.Diagnostics; using System.Diagnostics.CodeAnalysis; namespace System.Data diff --git a/src/libraries/System.Data.Common/src/System/Data/XDRSchema.cs b/src/libraries/System.Data.Common/src/System/Data/XDRSchema.cs index 4bfb8d89f6394..3b8dc4033611c 100644 --- a/src/libraries/System.Data.Common/src/System/Data/XDRSchema.cs +++ b/src/libraries/System.Data.Common/src/System/Data/XDRSchema.cs @@ -1,12 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Xml; using System.Collections; -using System.Globalization; -using System.Diagnostics; using System.Data.Common; +using System.Diagnostics; using System.Diagnostics.CodeAnalysis; +using System.Globalization; +using System.Xml; namespace System.Data { diff --git a/src/libraries/System.Data.Common/src/System/Data/XMLDiffLoader.cs b/src/libraries/System.Data.Common/src/System/Data/XMLDiffLoader.cs index f3fbd40388ac3..f2a2c83345232 100644 --- a/src/libraries/System.Data.Common/src/System/Data/XMLDiffLoader.cs +++ b/src/libraries/System.Data.Common/src/System/Data/XMLDiffLoader.cs @@ -1,11 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Diagnostics; using System.Collections; +using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Xml; using System.Xml.Serialization; -using System.Diagnostics.CodeAnalysis; namespace System.Data { diff --git a/src/libraries/System.Data.Common/src/System/Data/XMLSchema.cs b/src/libraries/System.Data.Common/src/System/Data/XMLSchema.cs index 9a46051049768..506f3e69f2871 100644 --- a/src/libraries/System.Data.Common/src/System/Data/XMLSchema.cs +++ b/src/libraries/System.Data.Common/src/System/Data/XMLSchema.cs @@ -1,15 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Data.Common; -using System.Xml; -using System.Xml.Schema; -using System.Diagnostics; using System.Collections; using System.Collections.Generic; -using System.Globalization; using System.ComponentModel; +using System.Data.Common; +using System.Diagnostics; using System.Diagnostics.CodeAnalysis; +using System.Globalization; +using System.Xml; +using System.Xml.Schema; namespace System.Data { diff --git a/src/libraries/System.Data.Common/src/System/Data/XmlToDatasetMap.cs b/src/libraries/System.Data.Common/src/System/Data/XmlToDatasetMap.cs index 19ba28df872ba..82fb9cb1fdbb9 100644 --- a/src/libraries/System.Data.Common/src/System/Data/XmlToDatasetMap.cs +++ b/src/libraries/System.Data.Common/src/System/Data/XmlToDatasetMap.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Xml; using System.Collections; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; +using System.Xml; namespace System.Data { diff --git a/src/libraries/System.Data.Common/src/System/Data/xmlsaver.cs b/src/libraries/System.Data.Common/src/System/Data/xmlsaver.cs index e7cf97ac6c2c2..1e3c38ce0b532 100644 --- a/src/libraries/System.Data.Common/src/System/Data/xmlsaver.cs +++ b/src/libraries/System.Data.Common/src/System/Data/xmlsaver.cs @@ -3,8 +3,8 @@ using System.Collections; using System.ComponentModel; -using System.Data.SqlTypes; using System.Data.Common; +using System.Data.SqlTypes; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Globalization; diff --git a/src/libraries/System.Data.Odbc/src/Common/System/Data/ProviderBase/DbConnectionFactory.cs b/src/libraries/System.Data.Odbc/src/Common/System/Data/ProviderBase/DbConnectionFactory.cs index 5e37564f0710f..dda51c88799cb 100644 --- a/src/libraries/System.Data.Odbc/src/Common/System/Data/ProviderBase/DbConnectionFactory.cs +++ b/src/libraries/System.Data.Odbc/src/Common/System/Data/ProviderBase/DbConnectionFactory.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Diagnostics; using System.Data.Common; +using System.Diagnostics; using System.Threading; using System.Threading.Tasks; diff --git a/src/libraries/System.Data.Odbc/src/Common/System/Data/ProviderBase/DbConnectionPool.cs b/src/libraries/System.Data.Odbc/src/Common/System/Data/ProviderBase/DbConnectionPool.cs index b4b5e8ca98723..bceb5f5c4a632 100644 --- a/src/libraries/System.Data.Odbc/src/Common/System/Data/ProviderBase/DbConnectionPool.cs +++ b/src/libraries/System.Data.Odbc/src/Common/System/Data/ProviderBase/DbConnectionPool.cs @@ -1,12 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Collections.Concurrent; using System.Collections.Generic; using System.Data.Common; using System.Diagnostics; using System.Threading; using System.Threading.Tasks; -using System.Collections.Concurrent; namespace System.Data.ProviderBase { diff --git a/src/libraries/System.Data.Odbc/src/System/Data/Odbc/OdbcConnectionStringbuilder.cs b/src/libraries/System.Data.Odbc/src/System/Data/Odbc/OdbcConnectionStringbuilder.cs index a2d3adfebd7ef..18e0ff0aa2316 100644 --- a/src/libraries/System.Data.Odbc/src/System/Data/Odbc/OdbcConnectionStringbuilder.cs +++ b/src/libraries/System.Data.Odbc/src/System/Data/Odbc/OdbcConnectionStringbuilder.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Collections; -using System.Collections.ObjectModel; using System.Collections.Generic; +using System.Collections.ObjectModel; using System.ComponentModel; using System.Data.Common; using System.Diagnostics; diff --git a/src/libraries/System.Data.Odbc/src/System/Data/Odbc/OdbcMetaDataFactory.cs b/src/libraries/System.Data.Odbc/src/System/Data/Odbc/OdbcMetaDataFactory.cs index bb2dc0e9b7299..50ebb7b59694c 100644 --- a/src/libraries/System.Data.Odbc/src/System/Data/Odbc/OdbcMetaDataFactory.cs +++ b/src/libraries/System.Data.Odbc/src/System/Data/Odbc/OdbcMetaDataFactory.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.IO; using System.Data.Common; using System.Data.ProviderBase; using System.Diagnostics; +using System.IO; using System.Text; namespace System.Data.Odbc diff --git a/src/libraries/System.Data.OleDb/src/OleDbComWrappers.cs b/src/libraries/System.Data.OleDb/src/OleDbComWrappers.cs index 0bb57ff7f67ae..1303f1f52b33a 100644 --- a/src/libraries/System.Data.OleDb/src/OleDbComWrappers.cs +++ b/src/libraries/System.Data.OleDb/src/OleDbComWrappers.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Collections; -using System.Diagnostics; using System.Data.Common; +using System.Diagnostics; using System.IO; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; diff --git a/src/libraries/System.Data.OleDb/src/OleDbConnectionFactory.cs b/src/libraries/System.Data.OleDb/src/OleDbConnectionFactory.cs index 6c857b13d6a90..f74fda12f94f3 100644 --- a/src/libraries/System.Data.OleDb/src/OleDbConnectionFactory.cs +++ b/src/libraries/System.Data.OleDb/src/OleDbConnectionFactory.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Collections.Specialized; -using System.Data.Common; using System.Configuration; +using System.Data.Common; using System.Data.ProviderBase; using System.Diagnostics; using System.IO; diff --git a/src/libraries/System.Data.OleDb/src/OleDbConnectionString.cs b/src/libraries/System.Data.OleDb/src/OleDbConnectionString.cs index 0c02b66ae32b0..e86ae13f940e6 100644 --- a/src/libraries/System.Data.OleDb/src/OleDbConnectionString.cs +++ b/src/libraries/System.Data.OleDb/src/OleDbConnectionString.cs @@ -6,8 +6,8 @@ using System.Diagnostics; using System.Globalization; using System.IO; -using System.Text; using System.Runtime.Versioning; +using System.Text; namespace System.Data.OleDb { diff --git a/src/libraries/System.Data.OleDb/src/System/Data/ProviderBase/DbConnectionPoolIdentity.cs b/src/libraries/System.Data.OleDb/src/System/Data/ProviderBase/DbConnectionPoolIdentity.cs index bd21ab5c1bb97..fad659f7ae3e6 100644 --- a/src/libraries/System.Data.OleDb/src/System/Data/ProviderBase/DbConnectionPoolIdentity.cs +++ b/src/libraries/System.Data.OleDb/src/System/Data/ProviderBase/DbConnectionPoolIdentity.cs @@ -8,10 +8,10 @@ using System.Globalization; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; +using System.Runtime.Versioning; using System.Security; using System.Security.Principal; using System.Threading; -using System.Runtime.Versioning; namespace System.Data.ProviderBase { diff --git a/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/Activity.cs b/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/Activity.cs index db4d5e2308108..1a5365594438e 100644 --- a/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/Activity.cs +++ b/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/Activity.cs @@ -4,8 +4,8 @@ using System.Buffers.Binary; using System.Buffers.Text; using System.Collections; -using System.Collections.Generic; using System.Collections.Concurrent; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; diff --git a/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/ActivitySource.cs b/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/ActivitySource.cs index 9d8c19a6cf239..1420ee6301ca4 100644 --- a/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/ActivitySource.cs +++ b/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/ActivitySource.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Threading; using System.Collections.Generic; using System.Runtime.CompilerServices; +using System.Threading; namespace System.Diagnostics { diff --git a/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/ActivityTagsCollection.cs b/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/ActivityTagsCollection.cs index 5d0b28a27ef7b..a634a91880e44 100644 --- a/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/ActivityTagsCollection.cs +++ b/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/ActivityTagsCollection.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Collections.Generic; using System.Collections; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; namespace System.Diagnostics diff --git a/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/DiagnosticListener.cs b/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/DiagnosticListener.cs index cc84a102ac962..3d39054f5694f 100644 --- a/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/DiagnosticListener.cs +++ b/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/DiagnosticListener.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Threading; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; +using System.Threading; namespace System.Diagnostics { diff --git a/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/DistributedContextPropagator.cs b/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/DistributedContextPropagator.cs index edcfabca1e023..9c3de4529dfff 100644 --- a/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/DistributedContextPropagator.cs +++ b/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/DistributedContextPropagator.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Collections.Generic; +using System.Diagnostics; using System.Net; using System.Text; -using System.Diagnostics; -using System.Collections.Generic; namespace System.Diagnostics { diff --git a/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/LegacyPropagator.cs b/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/LegacyPropagator.cs index 389cab9ee1d18..04a478fde94c4 100644 --- a/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/LegacyPropagator.cs +++ b/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/LegacyPropagator.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Net; using System.Collections.Generic; using System.Collections.ObjectModel; +using System.Net; namespace System.Diagnostics { diff --git a/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/Metrics/Instrument.netcore.cs b/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/Metrics/Instrument.netcore.cs index facf6e4cce7e4..f339e6761174b 100644 --- a/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/Metrics/Instrument.netcore.cs +++ b/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/Metrics/Instrument.netcore.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Collections.Generic; -using System.Runtime.InteropServices; using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; namespace System.Diagnostics.Metrics { diff --git a/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/Metrics/TagList.cs b/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/Metrics/TagList.cs index 159f74338fc4d..46890078fc2f6 100644 --- a/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/Metrics/TagList.cs +++ b/src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/Metrics/TagList.cs @@ -3,9 +3,9 @@ using System.Collections; using System.Collections.Generic; -using System.Threading; using System.Diagnostics; using System.Runtime.InteropServices; +using System.Threading; namespace System.Diagnostics { diff --git a/src/libraries/System.Diagnostics.EventLog/src/System/Diagnostics/Reader/EventLogReader.cs b/src/libraries/System.Diagnostics.EventLog/src/System/Diagnostics/Reader/EventLogReader.cs index 4645d3024b182..9325a298db197 100644 --- a/src/libraries/System.Diagnostics.EventLog/src/System/Diagnostics/Reader/EventLogReader.cs +++ b/src/libraries/System.Diagnostics.EventLog/src/System/Diagnostics/Reader/EventLogReader.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.IO; using System.Collections.Generic; +using System.IO; using Microsoft.Win32; namespace System.Diagnostics.Eventing.Reader diff --git a/src/libraries/System.Diagnostics.EventLog/src/System/Diagnostics/Reader/EventLogSession.cs b/src/libraries/System.Diagnostics.EventLog/src/System/Diagnostics/Reader/EventLogSession.cs index 8d97e213f2ac1..0bead9be4ef69 100644 --- a/src/libraries/System.Diagnostics.EventLog/src/System/Diagnostics/Reader/EventLogSession.cs +++ b/src/libraries/System.Diagnostics.EventLog/src/System/Diagnostics/Reader/EventLogSession.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Security; using System.Collections.Generic; using System.Globalization; +using System.Security; using Microsoft.Win32; namespace System.Diagnostics.Eventing.Reader diff --git a/src/libraries/System.Diagnostics.EventLog/src/System/Diagnostics/Reader/EventRecord.cs b/src/libraries/System.Diagnostics.EventLog/src/System/Diagnostics/Reader/EventRecord.cs index 542c3e5be8f6c..fef001669eda7 100644 --- a/src/libraries/System.Diagnostics.EventLog/src/System/Diagnostics/Reader/EventRecord.cs +++ b/src/libraries/System.Diagnostics.EventLog/src/System/Diagnostics/Reader/EventRecord.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Collections.Generic; -using System.Security.Principal; using System.Diagnostics.CodeAnalysis; +using System.Security.Principal; namespace System.Diagnostics.Eventing.Reader { diff --git a/src/libraries/System.Diagnostics.EventLog/src/System/Diagnostics/Reader/NativeWrapper.cs b/src/libraries/System.Diagnostics.EventLog/src/System/Diagnostics/Reader/NativeWrapper.cs index e4cebc7c2e1da..79e8eac8e4e06 100644 --- a/src/libraries/System.Diagnostics.EventLog/src/System/Diagnostics/Reader/NativeWrapper.cs +++ b/src/libraries/System.Diagnostics.EventLog/src/System/Diagnostics/Reader/NativeWrapper.cs @@ -4,8 +4,8 @@ using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Runtime.InteropServices; -using System.Text; using System.Security.Principal; +using System.Text; using Microsoft.Win32; namespace System.Diagnostics.Eventing.Reader diff --git a/src/libraries/System.Diagnostics.EventLog/src/System/Diagnostics/Reader/ProviderMetadata.cs b/src/libraries/System.Diagnostics.EventLog/src/System/Diagnostics/Reader/ProviderMetadata.cs index bebfaa094e5e7..746195435488b 100644 --- a/src/libraries/System.Diagnostics.EventLog/src/System/Diagnostics/Reader/ProviderMetadata.cs +++ b/src/libraries/System.Diagnostics.EventLog/src/System/Diagnostics/Reader/ProviderMetadata.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Globalization; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; +using System.Globalization; using Microsoft.Win32; namespace System.Diagnostics.Eventing.Reader diff --git a/src/libraries/System.Diagnostics.EventLog/src/System/Diagnostics/Reader/ProviderMetadataCachedInformation.cs b/src/libraries/System.Diagnostics.EventLog/src/System/Diagnostics/Reader/ProviderMetadataCachedInformation.cs index aa62843117ae0..4d0d292f8b90b 100644 --- a/src/libraries/System.Diagnostics.EventLog/src/System/Diagnostics/Reader/ProviderMetadataCachedInformation.cs +++ b/src/libraries/System.Diagnostics.EventLog/src/System/Diagnostics/Reader/ProviderMetadataCachedInformation.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Globalization; using System.Collections.Generic; +using System.Globalization; using Microsoft.Win32; namespace System.Diagnostics.Eventing.Reader diff --git a/src/libraries/System.Diagnostics.PerformanceCounter/src/System/Diagnostics/CounterSampleCalculator.cs b/src/libraries/System.Diagnostics.PerformanceCounter/src/System/Diagnostics/CounterSampleCalculator.cs index 7a80dfd331ca4..76edc81f936c3 100644 --- a/src/libraries/System.Diagnostics.PerformanceCounter/src/System/Diagnostics/CounterSampleCalculator.cs +++ b/src/libraries/System.Diagnostics.PerformanceCounter/src/System/Diagnostics/CounterSampleCalculator.cs @@ -2,9 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.ComponentModel; +using System.Globalization; using System.IO; using System.Runtime.InteropServices; -using System.Globalization; namespace System.Diagnostics { diff --git a/src/libraries/System.Diagnostics.PerformanceCounter/src/System/Diagnostics/PerformanceCounterCategory.cs b/src/libraries/System.Diagnostics.PerformanceCounter/src/System/Diagnostics/PerformanceCounterCategory.cs index a31e60d0d9e71..c5f56ddc6ea94 100644 --- a/src/libraries/System.Diagnostics.PerformanceCounter/src/System/Diagnostics/PerformanceCounterCategory.cs +++ b/src/libraries/System.Diagnostics.PerformanceCounter/src/System/Diagnostics/PerformanceCounterCategory.cs @@ -1,12 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.ComponentModel; using System; -using System.Threading; using System.Collections; +using System.ComponentModel; using System.Globalization; using System.Runtime.CompilerServices; +using System.Threading; namespace System.Diagnostics { diff --git a/src/libraries/System.Diagnostics.PerformanceCounter/src/System/Diagnostics/PerformanceCounterLib.cs b/src/libraries/System.Diagnostics.PerformanceCounter/src/System/Diagnostics/PerformanceCounterLib.cs index 9d89af3d6dfd7..f6b7737ef81ab 100644 --- a/src/libraries/System.Diagnostics.PerformanceCounter/src/System/Diagnostics/PerformanceCounterLib.cs +++ b/src/libraries/System.Diagnostics.PerformanceCounter/src/System/Diagnostics/PerformanceCounterLib.cs @@ -2,16 +2,15 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Buffers; -using System.Runtime.InteropServices; +using System.Collections; +using System.ComponentModel; using System.Globalization; +using System.IO; +using System.Runtime.InteropServices; using System.Security; using System.Text; using System.Threading; -using System.Collections; -using System.ComponentModel; using Microsoft.Win32; -using System.IO; - using static Interop.Advapi32; #if !NETCOREAPP diff --git a/src/libraries/System.Diagnostics.PerformanceCounter/src/System/Diagnostics/PerformanceDataRegistryKey.cs b/src/libraries/System.Diagnostics.PerformanceCounter/src/System/Diagnostics/PerformanceDataRegistryKey.cs index 5fe085caf4631..7ab834f66c6d0 100644 --- a/src/libraries/System.Diagnostics.PerformanceCounter/src/System/Diagnostics/PerformanceDataRegistryKey.cs +++ b/src/libraries/System.Diagnostics.PerformanceCounter/src/System/Diagnostics/PerformanceDataRegistryKey.cs @@ -5,8 +5,8 @@ using System.Buffers; using System.IO; using System.Runtime.InteropServices; -using Microsoft.Win32; using Internal.Win32.SafeHandles; +using Microsoft.Win32; namespace System.Diagnostics { diff --git a/src/libraries/System.Diagnostics.PerformanceCounter/src/System/Diagnostics/SharedPerformanceCounter.cs b/src/libraries/System.Diagnostics.PerformanceCounter/src/System/Diagnostics/SharedPerformanceCounter.cs index 69729ef5d6101..bd948232b8c46 100644 --- a/src/libraries/System.Diagnostics.PerformanceCounter/src/System/Diagnostics/SharedPerformanceCounter.cs +++ b/src/libraries/System.Diagnostics.PerformanceCounter/src/System/Diagnostics/SharedPerformanceCounter.cs @@ -2,11 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Text; -using System.Threading; using System.Collections; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; +using System.Text; +using System.Threading; using Microsoft.Win32; using Microsoft.Win32.SafeHandles; diff --git a/src/libraries/System.Diagnostics.Process/src/System/Diagnostics/Process.ConfigureTerminalForChildProcesses.Unix.cs b/src/libraries/System.Diagnostics.Process/src/System/Diagnostics/Process.ConfigureTerminalForChildProcesses.Unix.cs index b51957fb881bf..f6746fad4efd4 100644 --- a/src/libraries/System.Diagnostics.Process/src/System/Diagnostics/Process.ConfigureTerminalForChildProcesses.Unix.cs +++ b/src/libraries/System.Diagnostics.Process/src/System/Diagnostics/Process.ConfigureTerminalForChildProcesses.Unix.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Threading; using System.Runtime.InteropServices; +using System.Threading; namespace System.Diagnostics { diff --git a/src/libraries/System.Diagnostics.Process/src/System/Diagnostics/Process.Unix.cs b/src/libraries/System.Diagnostics.Process/src/System/Diagnostics/Process.Unix.cs index 86a4fb369fd79..16d5ea52e01c9 100644 --- a/src/libraries/System.Diagnostics.Process/src/System/Diagnostics/Process.Unix.cs +++ b/src/libraries/System.Diagnostics.Process/src/System/Diagnostics/Process.Unix.cs @@ -1,16 +1,16 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Collections.Generic; using System.ComponentModel; using System.IO; using System.IO.Pipes; +using System.Runtime.InteropServices; +using System.Runtime.Versioning; using System.Security; using System.Text; using System.Threading; -using System.Runtime.InteropServices; -using System.Runtime.Versioning; +using Microsoft.Win32.SafeHandles; namespace System.Diagnostics { diff --git a/src/libraries/System.Diagnostics.Process/src/System/Diagnostics/Process.Windows.cs b/src/libraries/System.Diagnostics.Process/src/System/Diagnostics/Process.Windows.cs index d66c0ed0a1f2b..6bdba053407fd 100644 --- a/src/libraries/System.Diagnostics.Process/src/System/Diagnostics/Process.Windows.cs +++ b/src/libraries/System.Diagnostics.Process/src/System/Diagnostics/Process.Windows.cs @@ -1,7 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Collections.Generic; using System.ComponentModel; using System.IO; @@ -10,6 +9,7 @@ using System.Security; using System.Text; using System.Threading; +using Microsoft.Win32.SafeHandles; namespace System.Diagnostics { diff --git a/src/libraries/System.Diagnostics.Process/src/System/Diagnostics/Process.cs b/src/libraries/System.Diagnostics.Process/src/System/Diagnostics/Process.cs index fce3f3e541e88..cc8a0ae13811d 100644 --- a/src/libraries/System.Diagnostics.Process/src/System/Diagnostics/Process.cs +++ b/src/libraries/System.Diagnostics.Process/src/System/Diagnostics/Process.cs @@ -1,7 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Collections.Generic; using System.Collections.ObjectModel; using System.ComponentModel; @@ -12,6 +11,7 @@ using System.Text; using System.Threading; using System.Threading.Tasks; +using Microsoft.Win32.SafeHandles; namespace System.Diagnostics { diff --git a/src/libraries/System.Diagnostics.Process/src/System/Diagnostics/ProcessManager.Unix.cs b/src/libraries/System.Diagnostics.Process/src/System/Diagnostics/ProcessManager.Unix.cs index 1ef579803c622..4c17ad5ed1c03 100644 --- a/src/libraries/System.Diagnostics.Process/src/System/Diagnostics/ProcessManager.Unix.cs +++ b/src/libraries/System.Diagnostics.Process/src/System/Diagnostics/ProcessManager.Unix.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Collections.Generic; using System.Runtime.Versioning; using System.Text; +using Microsoft.Win32.SafeHandles; namespace System.Diagnostics { diff --git a/src/libraries/System.Diagnostics.Process/src/System/Diagnostics/ProcessStartInfo.Win32.cs b/src/libraries/System.Diagnostics.Process/src/System/Diagnostics/ProcessStartInfo.Win32.cs index 35e5bdeece97f..eaf3bd617c463 100644 --- a/src/libraries/System.Diagnostics.Process/src/System/Diagnostics/ProcessStartInfo.Win32.cs +++ b/src/libraries/System.Diagnostics.Process/src/System/Diagnostics/ProcessStartInfo.Win32.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32; using System.Collections.Generic; using System.IO; +using Microsoft.Win32; namespace System.Diagnostics { diff --git a/src/libraries/System.Diagnostics.Process/src/System/Diagnostics/ProcessThread.Windows.cs b/src/libraries/System.Diagnostics.Process/src/System/Diagnostics/ProcessThread.Windows.cs index 7f67d4c861d21..48148f9ca3565 100644 --- a/src/libraries/System.Diagnostics.Process/src/System/Diagnostics/ProcessThread.Windows.cs +++ b/src/libraries/System.Diagnostics.Process/src/System/Diagnostics/ProcessThread.Windows.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.ComponentModel; using System.Runtime.Versioning; +using Microsoft.Win32.SafeHandles; namespace System.Diagnostics { diff --git a/src/libraries/System.Diagnostics.Process/src/System/Diagnostics/ProcessWaitHandle.Unix.cs b/src/libraries/System.Diagnostics.Process/src/System/Diagnostics/ProcessWaitHandle.Unix.cs index 3754b32bb12f0..af9bd3ed99c4e 100644 --- a/src/libraries/System.Diagnostics.Process/src/System/Diagnostics/ProcessWaitHandle.Unix.cs +++ b/src/libraries/System.Diagnostics.Process/src/System/Diagnostics/ProcessWaitHandle.Unix.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Threading; +using Microsoft.Win32.SafeHandles; namespace System.Diagnostics { diff --git a/src/libraries/System.Diagnostics.TextWriterTraceListener/src/System/Diagnostics/DelimitedListTraceListener.cs b/src/libraries/System.Diagnostics.TextWriterTraceListener/src/System/Diagnostics/DelimitedListTraceListener.cs index d3cfc98958141..497ffcd3496b8 100644 --- a/src/libraries/System.Diagnostics.TextWriterTraceListener/src/System/Diagnostics/DelimitedListTraceListener.cs +++ b/src/libraries/System.Diagnostics.TextWriterTraceListener/src/System/Diagnostics/DelimitedListTraceListener.cs @@ -3,8 +3,8 @@ using System.Collections; using System.Diagnostics.CodeAnalysis; -using System.IO; using System.Globalization; +using System.IO; using System.Text; namespace System.Diagnostics diff --git a/src/libraries/System.Diagnostics.TraceSource/src/System/Diagnostics/BooleanSwitch.cs b/src/libraries/System.Diagnostics.TraceSource/src/System/Diagnostics/BooleanSwitch.cs index e698a519cd18c..09d5c7cdcf844 100644 --- a/src/libraries/System.Diagnostics.TraceSource/src/System/Diagnostics/BooleanSwitch.cs +++ b/src/libraries/System.Diagnostics.TraceSource/src/System/Diagnostics/BooleanSwitch.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Diagnostics; using System; +using System.Diagnostics; namespace System.Diagnostics { diff --git a/src/libraries/System.Diagnostics.TraceSource/src/System/Diagnostics/DefaultTraceListener.cs b/src/libraries/System.Diagnostics.TraceSource/src/System/Diagnostics/DefaultTraceListener.cs index e808e3f8c56f2..7a94e6a2d2d8f 100644 --- a/src/libraries/System.Diagnostics.TraceSource/src/System/Diagnostics/DefaultTraceListener.cs +++ b/src/libraries/System.Diagnostics.TraceSource/src/System/Diagnostics/DefaultTraceListener.cs @@ -2,11 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.IO; -using System.Text; using System.Collections; -using System.Runtime.InteropServices; using System.Globalization; +using System.IO; +using System.Runtime.InteropServices; +using System.Text; namespace System.Diagnostics { diff --git a/src/libraries/System.Diagnostics.TraceSource/src/System/Diagnostics/Switch.cs b/src/libraries/System.Diagnostics.TraceSource/src/System/Diagnostics/Switch.cs index 5388f39c2fa5b..a6b4f3c41ec04 100644 --- a/src/libraries/System.Diagnostics.TraceSource/src/System/Diagnostics/Switch.cs +++ b/src/libraries/System.Diagnostics.TraceSource/src/System/Diagnostics/Switch.cs @@ -2,13 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Threading; -using System.Runtime.InteropServices; using System.Collections; using System.Collections.Generic; using System.Collections.Specialized; -using System.Globalization; using System.Diagnostics.CodeAnalysis; +using System.Globalization; +using System.Runtime.InteropServices; +using System.Threading; namespace System.Diagnostics { diff --git a/src/libraries/System.Diagnostics.TraceSource/src/System/Diagnostics/TraceEventCache.cs b/src/libraries/System.Diagnostics.TraceSource/src/System/Diagnostics/TraceEventCache.cs index 43dd9949f1307..6d314bda14124 100644 --- a/src/libraries/System.Diagnostics.TraceSource/src/System/Diagnostics/TraceEventCache.cs +++ b/src/libraries/System.Diagnostics.TraceSource/src/System/Diagnostics/TraceEventCache.cs @@ -2,10 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Threading; -using System.Text; using System.Collections; using System.Globalization; +using System.Text; +using System.Threading; namespace System.Diagnostics { diff --git a/src/libraries/System.Diagnostics.TraceSource/src/System/Diagnostics/TraceInternal.cs b/src/libraries/System.Diagnostics.TraceSource/src/System/Diagnostics/TraceInternal.cs index cb4f182d37eae..0b9975b608d72 100644 --- a/src/libraries/System.Diagnostics.TraceSource/src/System/Diagnostics/TraceInternal.cs +++ b/src/libraries/System.Diagnostics.TraceSource/src/System/Diagnostics/TraceInternal.cs @@ -1,11 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Threading; -using System.IO; using System.Collections; -using System.Reflection; using System.Diagnostics.CodeAnalysis; +using System.IO; +using System.Reflection; +using System.Threading; namespace System.Diagnostics { diff --git a/src/libraries/System.Diagnostics.TraceSource/src/System/Diagnostics/TraceLevel.cs b/src/libraries/System.Diagnostics.TraceSource/src/System/Diagnostics/TraceLevel.cs index a0656d57d3bf8..5474c163ca097 100644 --- a/src/libraries/System.Diagnostics.TraceSource/src/System/Diagnostics/TraceLevel.cs +++ b/src/libraries/System.Diagnostics.TraceSource/src/System/Diagnostics/TraceLevel.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Diagnostics; using System; +using System.Diagnostics; namespace System.Diagnostics { diff --git a/src/libraries/System.Diagnostics.TraceSource/src/System/Diagnostics/TraceListener.cs b/src/libraries/System.Diagnostics.TraceSource/src/System/Diagnostics/TraceListener.cs index e7208255dcb47..d739be5250b34 100644 --- a/src/libraries/System.Diagnostics.TraceSource/src/System/Diagnostics/TraceListener.cs +++ b/src/libraries/System.Diagnostics.TraceSource/src/System/Diagnostics/TraceListener.cs @@ -2,12 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; +using System.Collections; +using System.Collections.Specialized; using System.Diagnostics.CodeAnalysis; -using System.Text; using System.Globalization; using System.Runtime.InteropServices; -using System.Collections; -using System.Collections.Specialized; +using System.Text; namespace System.Diagnostics { diff --git a/src/libraries/System.Diagnostics.TraceSource/src/System/Diagnostics/TraceUtils.cs b/src/libraries/System.Diagnostics.TraceSource/src/System/Diagnostics/TraceUtils.cs index 7715e9035fc3c..709075d9c77d6 100644 --- a/src/libraries/System.Diagnostics.TraceSource/src/System/Diagnostics/TraceUtils.cs +++ b/src/libraries/System.Diagnostics.TraceSource/src/System/Diagnostics/TraceUtils.cs @@ -1,12 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Collections; +using System.Collections.Specialized; using System.Configuration; +using System.Globalization; using System.IO; using System.Reflection; -using System.Globalization; -using System.Collections; -using System.Collections.Specialized; using System.Runtime.Versioning; namespace System.Diagnostics diff --git a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AD/ADAMStoreCtx.cs b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AD/ADAMStoreCtx.cs index ebeed9d290849..ec2d728cb620d 100644 --- a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AD/ADAMStoreCtx.cs +++ b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AD/ADAMStoreCtx.cs @@ -2,15 +2,14 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Diagnostics; using System.Collections; using System.Collections.Generic; +using System.Diagnostics; +using System.DirectoryServices; using System.Globalization; -using System.Runtime.InteropServices; using System.Net; +using System.Runtime.InteropServices; using System.Security.Principal; - -using System.DirectoryServices; using System.Text; namespace System.DirectoryServices.AccountManagement diff --git a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AD/ADDNConstraintLinkedAttrSet.cs b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AD/ADDNConstraintLinkedAttrSet.cs index a0cbd527c958d..159d59771d991 100644 --- a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AD/ADDNConstraintLinkedAttrSet.cs +++ b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AD/ADDNConstraintLinkedAttrSet.cs @@ -2,10 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.DirectoryServices; -using System.Collections.Generic; using System.Collections; +using System.Collections.Generic; using System.Diagnostics; +using System.DirectoryServices; namespace System.DirectoryServices.AccountManagement { diff --git a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AD/ADDNLinkedAttrSet.cs b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AD/ADDNLinkedAttrSet.cs index a89db78183856..01b09669eb547 100644 --- a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AD/ADDNLinkedAttrSet.cs +++ b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AD/ADDNLinkedAttrSet.cs @@ -2,10 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.DirectoryServices; -using System.Collections.Generic; using System.Collections; +using System.Collections.Generic; using System.Diagnostics; +using System.DirectoryServices; using System.Security.Principal; namespace System.DirectoryServices.AccountManagement diff --git a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AD/ADEntriesSet.cs b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AD/ADEntriesSet.cs index b6318fd3dea87..06837298f4c02 100644 --- a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AD/ADEntriesSet.cs +++ b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AD/ADEntriesSet.cs @@ -2,10 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Diagnostics; using System.Collections; -using System.Globalization; +using System.Diagnostics; using System.DirectoryServices; +using System.Globalization; namespace System.DirectoryServices.AccountManagement { diff --git a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AD/ADStoreCtx.cs b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AD/ADStoreCtx.cs index f2c864621be43..e1a28506696cc 100644 --- a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AD/ADStoreCtx.cs +++ b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AD/ADStoreCtx.cs @@ -2,19 +2,19 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Diagnostics; using System.Collections; using System.Collections.Generic; +using System.Collections.Specialized; +using System.Diagnostics; +using System.DirectoryServices; +using System.DirectoryServices.ActiveDirectory; using System.Globalization; -using System.Runtime.InteropServices; using System.Net; +using System.Runtime.InteropServices; +using System.Security.AccessControl; using System.Security.Principal; -using System.Collections.Specialized; -using System.DirectoryServices; using System.Text; using MACLPrinc = System.Security.Principal; -using System.Security.AccessControl; -using System.DirectoryServices.ActiveDirectory; namespace System.DirectoryServices.AccountManagement { diff --git a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AD/ADStoreCtx_LoadStore.cs b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AD/ADStoreCtx_LoadStore.cs index d507dd9ca28a4..605ace5c6eca9 100644 --- a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AD/ADStoreCtx_LoadStore.cs +++ b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AD/ADStoreCtx_LoadStore.cs @@ -2,21 +2,19 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Diagnostics; -using System.Collections.Generic; using System.Collections; +using System.Collections.Generic; using System.Collections.Specialized; -using System.Text; +using System.Diagnostics; +using System.DirectoryServices; using System.Globalization; -using System.Security.Cryptography.X509Certificates; -using System.Runtime.InteropServices; using System.Net; +using System.Runtime.InteropServices; +using System.Security.AccessControl; +using System.Security.Cryptography.X509Certificates; using System.Security.Principal; - -using System.DirectoryServices; - +using System.Text; using MACLPrinc = System.Security.Principal; -using System.Security.AccessControl; namespace System.DirectoryServices.AccountManagement { diff --git a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AD/ADStoreCtx_Query.cs b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AD/ADStoreCtx_Query.cs index b009b3ed54091..a6f44f8f185dd 100644 --- a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AD/ADStoreCtx_Query.cs +++ b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AD/ADStoreCtx_Query.cs @@ -2,14 +2,14 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Diagnostics; -using System.Collections.Generic; using System.Collections; -using System.Text; +using System.Collections.Generic; +using System.Collections.Specialized; +using System.Diagnostics; +using System.DirectoryServices; using System.Globalization; using System.Security.Principal; -using System.DirectoryServices; -using System.Collections.Specialized; +using System.Text; namespace System.DirectoryServices.AccountManagement { diff --git a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AD/ADUtils.cs b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AD/ADUtils.cs index 672b9c6ea4629..549cbed70e44f 100644 --- a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AD/ADUtils.cs +++ b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AD/ADUtils.cs @@ -3,12 +3,12 @@ using System; using System.Diagnostics; -using System.Globalization; -using System.Runtime.InteropServices; using System.DirectoryServices; using System.DirectoryServices.ActiveDirectory; -using System.Text; +using System.Globalization; +using System.Runtime.InteropServices; using System.Security.Principal; +using System.Text; namespace System.DirectoryServices.AccountManagement { diff --git a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AD/DSPropertyCollection.cs b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AD/DSPropertyCollection.cs index 62483eb22b56a..ddc8f25c238a4 100644 --- a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AD/DSPropertyCollection.cs +++ b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AD/DSPropertyCollection.cs @@ -2,14 +2,14 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Diagnostics; +using System.Collections; using System.Collections.Generic; +using System.Diagnostics; +using System.DirectoryServices; using System.Globalization; +using System.Net; using System.Runtime.InteropServices; -using System.DirectoryServices; using System.Text; -using System.Net; -using System.Collections; namespace System.DirectoryServices.AccountManagement { diff --git a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AD/SDSCache.cs b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AD/SDSCache.cs index e973250a55eba..b3d35d5151fbb 100644 --- a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AD/SDSCache.cs +++ b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AD/SDSCache.cs @@ -2,10 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Diagnostics; using System.Collections; -using System.Globalization; +using System.Diagnostics; using System.DirectoryServices; +using System.Globalization; using System.Net; using System.Threading; diff --git a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AD/SDSUtils.cs b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AD/SDSUtils.cs index 59d4ac4b5623f..1b6d9a64d7c65 100644 --- a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AD/SDSUtils.cs +++ b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AD/SDSUtils.cs @@ -2,13 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Diagnostics; using System.Collections.Generic; +using System.Diagnostics; +using System.DirectoryServices; using System.Globalization; +using System.Net; using System.Runtime.InteropServices; -using System.DirectoryServices; using System.Text; -using System.Net; namespace System.DirectoryServices.AccountManagement { diff --git a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AD/SidList.cs b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AD/SidList.cs index f9c1e0ab2258e..2d6d63fee7297 100644 --- a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AD/SidList.cs +++ b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AD/SidList.cs @@ -1,10 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Diagnostics; using System.Collections.Generic; +using System.Diagnostics; using System.Runtime.InteropServices; - using Microsoft.Win32.SafeHandles; namespace System.DirectoryServices.AccountManagement diff --git a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AD/TokenGroupsSet.cs b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AD/TokenGroupsSet.cs index 818b7234c69fa..da6b821d4b074 100644 --- a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AD/TokenGroupsSet.cs +++ b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AD/TokenGroupsSet.cs @@ -2,12 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.DirectoryServices; -using System.Collections.Generic; using System.Collections; +using System.Collections.Generic; using System.Diagnostics; -using System.Text; +using System.DirectoryServices; using System.Security.Principal; +using System.Text; namespace System.DirectoryServices.AccountManagement { diff --git a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AdvancedFilters.cs b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AdvancedFilters.cs index 22cfb58677bee..b27a2f9e64819 100644 --- a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AdvancedFilters.cs +++ b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AdvancedFilters.cs @@ -2,12 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; +using System.Collections; +using System.Collections.Generic; +using System.ComponentModel; using System.Diagnostics; using System.Globalization; using System.Security.Principal; -using System.Collections.Generic; -using System.ComponentModel; -using System.Collections; namespace System.DirectoryServices.AccountManagement { diff --git a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AuthZSet.cs b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AuthZSet.cs index cf2968bee477d..b9423466e825d 100644 --- a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AuthZSet.cs +++ b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AuthZSet.cs @@ -2,14 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Collections.Generic; using System.Collections; +using System.Collections.Generic; using System.Diagnostics; using System.Globalization; -using System.Security.Principal; - -using System.Runtime.InteropServices; using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Security.Principal; namespace System.DirectoryServices.AccountManagement { diff --git a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AuthenticablePrincipal.cs b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AuthenticablePrincipal.cs index 4b1d090ee70f7..10cb51c4828d0 100644 --- a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AuthenticablePrincipal.cs +++ b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AuthenticablePrincipal.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Diagnostics; using System.Collections.Generic; +using System.Diagnostics; using System.Security.Cryptography.X509Certificates; namespace System.DirectoryServices.AccountManagement diff --git a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/Computer.cs b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/Computer.cs index 4c96f7e08ac6e..4104862d3b9a6 100644 --- a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/Computer.cs +++ b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/Computer.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Diagnostics; using System.Collections.Generic; +using System.Diagnostics; namespace System.DirectoryServices.AccountManagement { diff --git a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/ConfigurationHandler.cs b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/ConfigurationHandler.cs index 1486d9010d574..7ccdba269c69c 100644 --- a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/ConfigurationHandler.cs +++ b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/ConfigurationHandler.cs @@ -3,10 +3,10 @@ using System; using System.Collections; -using System.Diagnostics; -using System.Xml; using System.Configuration; +using System.Diagnostics; using System.Globalization; +using System.Xml; namespace System.DirectoryServices.AccountManagement { diff --git a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/Context.cs b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/Context.cs index d41a972c335bc..c5262bc1b1c18 100644 --- a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/Context.cs +++ b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/Context.cs @@ -2,18 +2,18 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; +using System.Collections; using System.Collections.Generic; -using System.Diagnostics; -using System.Globalization; -using System.Runtime.InteropServices; using System.ComponentModel; using System.Configuration; -using System.DirectoryServices.Protocols; +using System.Diagnostics; using System.DirectoryServices; +using System.DirectoryServices.Protocols; +using System.Globalization; using System.Net; +using System.Runtime.InteropServices; using System.Text; using System.Threading; -using System.Collections; namespace System.DirectoryServices.AccountManagement { diff --git a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/ExtensionCache.cs b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/ExtensionCache.cs index 9486b426b4b5d..23a285881f2b0 100644 --- a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/ExtensionCache.cs +++ b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/ExtensionCache.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Collections.Generic; using System.Collections; +using System.Collections.Generic; using System.DirectoryServices; namespace System.DirectoryServices.AccountManagement diff --git a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/NetCred.cs b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/NetCred.cs index fa94ac132601e..765d734ba2d41 100644 --- a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/NetCred.cs +++ b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/NetCred.cs @@ -4,9 +4,9 @@ using System; using System.Diagnostics; using System.Globalization; +using System.Net; using System.Runtime.InteropServices; using System.Text; -using System.Net; namespace System.DirectoryServices.AccountManagement { diff --git a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/Principal.cs b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/Principal.cs index c7b5144653f52..3b5fb29cf5c85 100644 --- a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/Principal.cs +++ b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/Principal.cs @@ -2,12 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; +using System.Collections; +using System.Collections.Generic; +using System.ComponentModel; using System.Diagnostics; using System.Globalization; using System.Security.Principal; -using System.Collections.Generic; -using System.ComponentModel; -using System.Collections; namespace System.DirectoryServices.AccountManagement { diff --git a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/PrincipalCollection.cs b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/PrincipalCollection.cs index 5d4ac557afb42..335c8db086ccb 100644 --- a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/PrincipalCollection.cs +++ b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/PrincipalCollection.cs @@ -2,9 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Diagnostics; using System.Collections; using System.Collections.Generic; +using System.Diagnostics; namespace System.DirectoryServices.AccountManagement { diff --git a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/PrincipalCollectionEnumerator.cs b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/PrincipalCollectionEnumerator.cs index 3d87015732a55..a5d7fd821e98a 100644 --- a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/PrincipalCollectionEnumerator.cs +++ b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/PrincipalCollectionEnumerator.cs @@ -2,9 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Diagnostics; using System.Collections; using System.Collections.Generic; +using System.Diagnostics; using System.Globalization; namespace System.DirectoryServices.AccountManagement diff --git a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/PrincipalSearcher.cs b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/PrincipalSearcher.cs index ab260fb7b33b2..e3c4424ef211b 100644 --- a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/PrincipalSearcher.cs +++ b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/PrincipalSearcher.cs @@ -2,9 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Diagnostics; using System.Collections; using System.Collections.Generic; +using System.Diagnostics; using System.Globalization; namespace System.DirectoryServices.AccountManagement diff --git a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/SAM/SAMGroupsSet.cs b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/SAM/SAMGroupsSet.cs index 22a545a591ebf..8f69709aaea90 100644 --- a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/SAM/SAMGroupsSet.cs +++ b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/SAM/SAMGroupsSet.cs @@ -2,12 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Diagnostics; using System.Collections; using System.Collections.Generic; -using System.Globalization; +using System.Diagnostics; using System.DirectoryServices; - +using System.Globalization; using System.Runtime.InteropServices; namespace System.DirectoryServices.AccountManagement diff --git a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/SAM/SAMMembersSet.cs b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/SAM/SAMMembersSet.cs index e5c354c5efdc5..7c22e86110b5d 100644 --- a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/SAM/SAMMembersSet.cs +++ b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/SAM/SAMMembersSet.cs @@ -2,14 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Diagnostics; using System.Collections; using System.Collections.Generic; -using System.Globalization; +using System.Diagnostics; using System.DirectoryServices; -using System.Text; - +using System.Globalization; using System.Runtime.InteropServices; +using System.Text; namespace System.DirectoryServices.AccountManagement { diff --git a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/SAM/SAMQuerySet.cs b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/SAM/SAMQuerySet.cs index 6d55ffc43268a..d212c87591d77 100644 --- a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/SAM/SAMQuerySet.cs +++ b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/SAM/SAMQuerySet.cs @@ -2,11 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Diagnostics; using System.Collections; using System.Collections.Generic; -using System.Globalization; +using System.Diagnostics; using System.DirectoryServices; +using System.Globalization; using System.Text.RegularExpressions; namespace System.DirectoryServices.AccountManagement diff --git a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/SAM/SAMStoreCtx.cs b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/SAM/SAMStoreCtx.cs index 0b82943649e7a..1f91a0e5daccd 100644 --- a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/SAM/SAMStoreCtx.cs +++ b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/SAM/SAMStoreCtx.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Diagnostics; using System.Collections; using System.Collections.Generic; +using System.Diagnostics; using System.Runtime.InteropServices; using System.Security.Principal; diff --git a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/SAM/SAMStoreCtx_LoadStore.cs b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/SAM/SAMStoreCtx_LoadStore.cs index 4432d8c297bbf..8d7fecec796f7 100644 --- a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/SAM/SAMStoreCtx_LoadStore.cs +++ b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/SAM/SAMStoreCtx_LoadStore.cs @@ -2,18 +2,17 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Diagnostics; -using System.Collections.Generic; using System.Collections; -using System.Text; +using System.Collections.Generic; +using System.Diagnostics; +using System.DirectoryServices; using System.Globalization; -using System.Security.Cryptography.X509Certificates; +using System.Net; using System.Runtime.InteropServices; using System.Runtime.InteropServices.ComTypes; -using System.Net; +using System.Security.Cryptography.X509Certificates; using System.Security.Principal; - -using System.DirectoryServices; +using System.Text; namespace System.DirectoryServices.AccountManagement { diff --git a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/SAM/SAMStoreCtx_Query.cs b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/SAM/SAMStoreCtx_Query.cs index afd90fa3ea2a3..2a3780b77cb2f 100644 --- a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/SAM/SAMStoreCtx_Query.cs +++ b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/SAM/SAMStoreCtx_Query.cs @@ -2,14 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Diagnostics; using System.Collections; using System.Collections.Generic; +using System.Diagnostics; +using System.DirectoryServices; using System.Globalization; using System.Runtime.InteropServices; -using System.DirectoryServices; - namespace System.DirectoryServices.AccountManagement { internal sealed partial class SAMStoreCtx : StoreCtx diff --git a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/SAM/SAMUtils.cs b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/SAM/SAMUtils.cs index cfbb088fe283b..ce898d4d77f1d 100644 --- a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/SAM/SAMUtils.cs +++ b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/SAM/SAMUtils.cs @@ -3,11 +3,11 @@ using System; using System.Diagnostics; +using System.DirectoryServices; using System.Globalization; using System.Runtime.InteropServices; -using System.DirectoryServices; -using System.Text; using System.Security.Principal; +using System.Text; namespace System.DirectoryServices.AccountManagement { diff --git a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/StoreCtx.cs b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/StoreCtx.cs index 74a269344ff1b..e43626d68cd33 100644 --- a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/StoreCtx.cs +++ b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/StoreCtx.cs @@ -3,9 +3,9 @@ using System; using System.Collections.Generic; -using System.Security.Cryptography.X509Certificates; using System.Diagnostics; using System.Globalization; +using System.Security.Cryptography.X509Certificates; namespace System.DirectoryServices.AccountManagement { diff --git a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/TrackedCollection.cs b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/TrackedCollection.cs index 83cc70f73ba62..3ce1b59266dee 100644 --- a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/TrackedCollection.cs +++ b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/TrackedCollection.cs @@ -2,9 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Diagnostics; using System.Collections; using System.Collections.Generic; +using System.Diagnostics; namespace System.DirectoryServices.AccountManagement { diff --git a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/TrackedCollectionEnumerator.cs b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/TrackedCollectionEnumerator.cs index e9c4171e4ef52..0d355c143cd6f 100644 --- a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/TrackedCollectionEnumerator.cs +++ b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/TrackedCollectionEnumerator.cs @@ -2,9 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Diagnostics; using System.Collections; using System.Collections.Generic; +using System.Diagnostics; namespace System.DirectoryServices.AccountManagement { diff --git a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/User.cs b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/User.cs index 3468706e3d8cf..395d18928dfbf 100644 --- a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/User.cs +++ b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/User.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Diagnostics; using System.Collections.Generic; +using System.Diagnostics; using System.Security.Principal; namespace System.DirectoryServices.AccountManagement diff --git a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/Utils.cs b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/Utils.cs index 5b95bfeaff2b9..619c48191e264 100644 --- a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/Utils.cs +++ b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/Utils.cs @@ -4,9 +4,8 @@ using System.Diagnostics; using System.Globalization; using System.Runtime.InteropServices; -using System.Text; using System.Security.Principal; - +using System.Text; using Microsoft.Win32.SafeHandles; namespace System.DirectoryServices.AccountManagement diff --git a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/ValueCollection.cs b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/ValueCollection.cs index cac56ee9535a5..6feaa8ec11beb 100644 --- a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/ValueCollection.cs +++ b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/ValueCollection.cs @@ -2,9 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Diagnostics; using System.Collections; using System.Collections.Generic; +using System.Diagnostics; namespace System.DirectoryServices.AccountManagement { diff --git a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/ValueCollectionEnumerator.cs b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/ValueCollectionEnumerator.cs index dc9f7326b5c53..a7e5aed735052 100644 --- a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/ValueCollectionEnumerator.cs +++ b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/ValueCollectionEnumerator.cs @@ -2,9 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Diagnostics; using System.Collections; using System.Collections.Generic; +using System.Diagnostics; namespace System.DirectoryServices.AccountManagement { diff --git a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/exceptions.cs b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/exceptions.cs index c0286f26442bb..93fe9c7dd24b5 100644 --- a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/exceptions.cs +++ b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/exceptions.cs @@ -4,10 +4,10 @@ using System; using System.ComponentModel; using System.Diagnostics; -using System.Runtime.Serialization; using System.Runtime.InteropServices; -using System.Text; +using System.Runtime.Serialization; using System.Security.Authentication; +using System.Text; namespace System.DirectoryServices.AccountManagement { diff --git a/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/Interop/SortKeyInterop.Linux.cs b/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/Interop/SortKeyInterop.Linux.cs index 6119ae0956500..5fdffa0ff82ee 100644 --- a/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/Interop/SortKeyInterop.Linux.cs +++ b/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/Interop/SortKeyInterop.Linux.cs @@ -4,10 +4,10 @@ using System.Collections; using System.ComponentModel; using System.Diagnostics; -using System.Text; using System.Runtime.InteropServices; -using System.Security.Principal; using System.Runtime.Versioning; +using System.Security.Principal; +using System.Text; namespace System.DirectoryServices.Protocols { diff --git a/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/Interop/SortKeyInterop.Windows.cs b/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/Interop/SortKeyInterop.Windows.cs index 42ada55602cc6..8d5ae5420309e 100644 --- a/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/Interop/SortKeyInterop.Windows.cs +++ b/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/Interop/SortKeyInterop.Windows.cs @@ -4,10 +4,10 @@ using System.Collections; using System.ComponentModel; using System.Diagnostics; -using System.Text; using System.Runtime.InteropServices; -using System.Security.Principal; using System.Runtime.Versioning; +using System.Security.Principal; +using System.Text; namespace System.DirectoryServices.Protocols { diff --git a/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/Interop/SortKeyInterop.cs b/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/Interop/SortKeyInterop.cs index 29ceb3a005522..61852e8a7c6d6 100644 --- a/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/Interop/SortKeyInterop.cs +++ b/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/Interop/SortKeyInterop.cs @@ -4,10 +4,10 @@ using System.Collections; using System.ComponentModel; using System.Diagnostics; -using System.Text; using System.Runtime.InteropServices; -using System.Security.Principal; using System.Runtime.Versioning; +using System.Security.Principal; +using System.Text; namespace System.DirectoryServices.Protocols { diff --git a/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/common/DirectoryControl.cs b/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/common/DirectoryControl.cs index 73e919fc49d1f..31548f6b2fd63 100644 --- a/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/common/DirectoryControl.cs +++ b/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/common/DirectoryControl.cs @@ -4,10 +4,10 @@ using System.Collections; using System.ComponentModel; using System.Diagnostics; -using System.Text; using System.Runtime.InteropServices; -using System.Security.Principal; using System.Runtime.Versioning; +using System.Security.Principal; +using System.Text; namespace System.DirectoryServices.Protocols { diff --git a/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/common/DirectoryException.cs b/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/common/DirectoryException.cs index 8e9e85fcccc7c..b4134d58e9b3e 100644 --- a/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/common/DirectoryException.cs +++ b/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/common/DirectoryException.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.ComponentModel; -using System.Text; using System.Runtime.Serialization; +using System.Text; namespace System.DirectoryServices.Protocols { diff --git a/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/common/DirectoryRequest.cs b/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/common/DirectoryRequest.cs index e6d2ffac0d323..1ec893b44958b 100644 --- a/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/common/DirectoryRequest.cs +++ b/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/common/DirectoryRequest.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.ComponentModel; using System.Collections.Specialized; +using System.ComponentModel; namespace System.DirectoryServices.Protocols { diff --git a/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/ldap/LdapConnection.Linux.cs b/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/ldap/LdapConnection.Linux.cs index 3993da251428a..0acbbae876ac7 100644 --- a/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/ldap/LdapConnection.Linux.cs +++ b/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/ldap/LdapConnection.Linux.cs @@ -3,8 +3,8 @@ using System.Diagnostics; using System.Net; -using System.Text; using System.Runtime.InteropServices; +using System.Text; namespace System.DirectoryServices.Protocols { diff --git a/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/ldap/LdapException.cs b/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/ldap/LdapException.cs index 81b5cd168aa78..6c972a875df33 100644 --- a/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/ldap/LdapException.cs +++ b/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/ldap/LdapException.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.ComponentModel; using System.Collections.Generic; +using System.ComponentModel; using System.Runtime.Serialization; namespace System.DirectoryServices.Protocols diff --git a/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/ldap/LdapPartialResultsProcessor.cs b/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/ldap/LdapPartialResultsProcessor.cs index 9c57a04d07655..805bed389b3b2 100644 --- a/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/ldap/LdapPartialResultsProcessor.cs +++ b/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/ldap/LdapPartialResultsProcessor.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Globalization; -using System.Threading; using System.Collections; using System.Diagnostics; +using System.Globalization; +using System.Threading; using System.Threading.Tasks; namespace System.DirectoryServices.Protocols diff --git a/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/ldap/LdapSessionOptions.cs b/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/ldap/LdapSessionOptions.cs index f7fa06b9ab88b..06809037a8ba4 100644 --- a/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/ldap/LdapSessionOptions.cs +++ b/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/ldap/LdapSessionOptions.cs @@ -1,16 +1,16 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Collections; +using System.ComponentModel; +using System.Diagnostics; using System.Globalization; using System.Net; -using System.Security.Cryptography.X509Certificates; -using System.ComponentModel; +using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -using System.Collections; -using System.Text; -using System.Diagnostics; using System.Security.Authentication; -using System.Runtime.CompilerServices; +using System.Security.Cryptography.X509Certificates; +using System.Text; namespace System.DirectoryServices.Protocols { diff --git a/src/libraries/System.DirectoryServices/src/Interop/AdsValueHelper2.cs b/src/libraries/System.DirectoryServices/src/Interop/AdsValueHelper2.cs index 3a19d778c2464..5dc142b9347ee 100644 --- a/src/libraries/System.DirectoryServices/src/Interop/AdsValueHelper2.cs +++ b/src/libraries/System.DirectoryServices/src/Interop/AdsValueHelper2.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Text; -using System.Runtime.InteropServices; using System.Globalization; +using System.Runtime.InteropServices; +using System.Text; namespace System.DirectoryServices { diff --git a/src/libraries/System.DirectoryServices/src/Interop/SafeNativeMethods.cs b/src/libraries/System.DirectoryServices/src/Interop/SafeNativeMethods.cs index 9ae1fdfd26811..27f30ceb9a26e 100644 --- a/src/libraries/System.DirectoryServices/src/Interop/SafeNativeMethods.cs +++ b/src/libraries/System.DirectoryServices/src/Interop/SafeNativeMethods.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Text; -using System.Security; using System.Runtime.InteropServices; +using System.Security; +using System.Text; namespace System.DirectoryServices { diff --git a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ADAMInstance.cs b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ADAMInstance.cs index 298a1276425b8..f7932b6517dc7 100644 --- a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ADAMInstance.cs +++ b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ADAMInstance.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Net; using System.Collections; using System.ComponentModel; +using System.Net; using System.Runtime.InteropServices; namespace System.DirectoryServices.ActiveDirectory diff --git a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ActiveDirectoryInterSiteTransport.cs b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ActiveDirectoryInterSiteTransport.cs index adb8b753c900e..beb23da994b73 100644 --- a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ActiveDirectoryInterSiteTransport.cs +++ b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ActiveDirectoryInterSiteTransport.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Runtime.InteropServices; using System.ComponentModel; +using System.Runtime.InteropServices; namespace System.DirectoryServices.ActiveDirectory { diff --git a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ActiveDirectoryReplicationMetaData.cs b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ActiveDirectoryReplicationMetaData.cs index 07316bd14c160..baad123def517 100644 --- a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ActiveDirectoryReplicationMetaData.cs +++ b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ActiveDirectoryReplicationMetaData.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Collections; -using System.Runtime.InteropServices; using System.Globalization; +using System.Runtime.InteropServices; namespace System.DirectoryServices.ActiveDirectory { diff --git a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ActiveDirectorySchema.cs b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ActiveDirectorySchema.cs index c69602a7d2e4a..91e64708f305e 100644 --- a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ActiveDirectorySchema.cs +++ b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ActiveDirectorySchema.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Text; using System.Collections; using System.ComponentModel; using System.Runtime.InteropServices; +using System.Text; namespace System.DirectoryServices.ActiveDirectory { diff --git a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ActiveDirectorySchemaClass.cs b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ActiveDirectorySchemaClass.cs index 5cc3b6127fbb9..af7627cb068f7 100644 --- a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ActiveDirectorySchemaClass.cs +++ b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ActiveDirectorySchemaClass.cs @@ -1,13 +1,13 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Text; -using System.ComponentModel; using System.Collections; +using System.ComponentModel; using System.Diagnostics; using System.Globalization; using System.Runtime.InteropServices; using System.Security.AccessControl; +using System.Text; namespace System.DirectoryServices.ActiveDirectory { diff --git a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ActiveDirectorySchemaProperty.cs b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ActiveDirectorySchemaProperty.cs index acec139ed8fda..5f13df1d473cf 100644 --- a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ActiveDirectorySchemaProperty.cs +++ b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ActiveDirectorySchemaProperty.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Text; -using System.Diagnostics; using System.ComponentModel; +using System.Diagnostics; using System.Runtime.InteropServices; +using System.Text; namespace System.DirectoryServices.ActiveDirectory { diff --git a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ActiveDirectorySite.cs b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ActiveDirectorySite.cs index 93e8c03a2508b..6ebe07e85a70d 100644 --- a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ActiveDirectorySite.cs +++ b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ActiveDirectorySite.cs @@ -1,11 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Runtime.InteropServices; using System.Collections; using System.Diagnostics; -using System.Text; using System.Diagnostics.CodeAnalysis; +using System.Runtime.InteropServices; +using System.Text; namespace System.DirectoryServices.ActiveDirectory { diff --git a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ActiveDirectorySiteCollection.cs b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ActiveDirectorySiteCollection.cs index a51b3c88d8fc1..879a0ba5c9862 100644 --- a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ActiveDirectorySiteCollection.cs +++ b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ActiveDirectorySiteCollection.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Runtime.InteropServices; using System.Collections; +using System.Runtime.InteropServices; namespace System.DirectoryServices.ActiveDirectory { diff --git a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ActiveDirectorySiteLink.cs b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ActiveDirectorySiteLink.cs index 0f35f73178969..127d3b592b062 100644 --- a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ActiveDirectorySiteLink.cs +++ b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ActiveDirectorySiteLink.cs @@ -1,11 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Runtime.InteropServices; using System.Collections; -using System.Globalization; using System.ComponentModel; using System.Diagnostics; +using System.Globalization; +using System.Runtime.InteropServices; namespace System.DirectoryServices.ActiveDirectory { diff --git a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ActiveDirectorySiteLinkBridge.cs b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ActiveDirectorySiteLinkBridge.cs index 0eee1608c44ad..b92d1423cfa76 100644 --- a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ActiveDirectorySiteLinkBridge.cs +++ b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ActiveDirectorySiteLinkBridge.cs @@ -1,11 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Runtime.InteropServices; using System.Collections; -using System.Globalization; using System.ComponentModel; using System.Diagnostics; +using System.Globalization; +using System.Runtime.InteropServices; namespace System.DirectoryServices.ActiveDirectory { diff --git a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ActiveDirectorySiteLinkCollection.cs b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ActiveDirectorySiteLinkCollection.cs index 161e89f47fc0a..4556ef69e05a7 100644 --- a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ActiveDirectorySiteLinkCollection.cs +++ b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ActiveDirectorySiteLinkCollection.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Runtime.InteropServices; using System.Collections; +using System.Runtime.InteropServices; namespace System.DirectoryServices.ActiveDirectory { diff --git a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ActiveDirectorySubnet.cs b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ActiveDirectorySubnet.cs index 781fc5d723579..cbaa51267fb26 100644 --- a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ActiveDirectorySubnet.cs +++ b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ActiveDirectorySubnet.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Runtime.InteropServices; using System.Diagnostics; +using System.Runtime.InteropServices; namespace System.DirectoryServices.ActiveDirectory { diff --git a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ActiveDirectorySubnetCollection.cs b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ActiveDirectorySubnetCollection.cs index 8a23dcf7d5002..39522945c39c3 100644 --- a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ActiveDirectorySubnetCollection.cs +++ b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ActiveDirectorySubnetCollection.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Runtime.InteropServices; using System.Collections; +using System.Runtime.InteropServices; using System.Text; namespace System.DirectoryServices.ActiveDirectory diff --git a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ApplicationPartition.cs b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ApplicationPartition.cs index 27cf3d5c74d26..0f7b1f5d252ad 100644 --- a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ApplicationPartition.cs +++ b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ApplicationPartition.cs @@ -1,11 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Text; using System.Collections; using System.Diagnostics; -using System.Runtime.InteropServices; using System.Diagnostics.CodeAnalysis; +using System.Runtime.InteropServices; +using System.Text; namespace System.DirectoryServices.ActiveDirectory { diff --git a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/AttributeMetaData.cs b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/AttributeMetaData.cs index 12a76be092e91..380e62474eb77 100644 --- a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/AttributeMetaData.cs +++ b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/AttributeMetaData.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Collections; -using System.Runtime.InteropServices; using System.Diagnostics; +using System.Runtime.InteropServices; namespace System.DirectoryServices.ActiveDirectory { diff --git a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ConfigSet.cs b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ConfigSet.cs index 8a64bddee5802..9bdde3e93afcc 100644 --- a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ConfigSet.cs +++ b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ConfigSet.cs @@ -1,11 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Text; using System.Collections; using System.ComponentModel; using System.Diagnostics; using System.Runtime.InteropServices; +using System.Text; namespace System.DirectoryServices.ActiveDirectory { diff --git a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/DirectoryContext.cs b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/DirectoryContext.cs index e750099700039..83e317b1c0d0e 100644 --- a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/DirectoryContext.cs +++ b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/DirectoryContext.cs @@ -1,14 +1,13 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Net; -using System.Security.Principal; -using System.Diagnostics; -using System.Runtime.InteropServices; using System.ComponentModel; -using System.IO; +using System.Diagnostics; using System.Diagnostics.CodeAnalysis; - +using System.IO; +using System.Net; +using System.Runtime.InteropServices; +using System.Security.Principal; using Microsoft.Win32.SafeHandles; namespace System.DirectoryServices.ActiveDirectory diff --git a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/DirectoryServer.cs b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/DirectoryServer.cs index 4e6f43ddbd037..ce30f29a70213 100644 --- a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/DirectoryServer.cs +++ b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/DirectoryServer.cs @@ -2,9 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Collections; -using System.Runtime.InteropServices; using System.Diagnostics; - +using System.Runtime.InteropServices; using Microsoft.Win32.SafeHandles; namespace System.DirectoryServices.ActiveDirectory diff --git a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/DirectoryServerCollection.cs b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/DirectoryServerCollection.cs index ffad06836dcac..81f6c5609ef2f 100644 --- a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/DirectoryServerCollection.cs +++ b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/DirectoryServerCollection.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Runtime.InteropServices; using System.Collections; using System.Collections.Generic; using System.Diagnostics; +using System.Runtime.InteropServices; namespace System.DirectoryServices.ActiveDirectory { diff --git a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/Domain.cs b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/Domain.cs index 43870acf6c9e4..5cc0d723ea9f7 100644 --- a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/Domain.cs +++ b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/Domain.cs @@ -1,13 +1,13 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Text; using System.Collections; -using System.Globalization; using System.ComponentModel; -using System.Runtime.InteropServices; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; +using System.Globalization; +using System.Runtime.InteropServices; +using System.Text; namespace System.DirectoryServices.ActiveDirectory { diff --git a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/DomainController.cs b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/DomainController.cs index 59ed8f626e79c..fc446850d5cfd 100644 --- a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/DomainController.cs +++ b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/DomainController.cs @@ -1,12 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Net; -using System.ComponentModel; using System.Collections; +using System.ComponentModel; +using System.Diagnostics; using System.Globalization; +using System.Net; using System.Runtime.InteropServices; -using System.Diagnostics; namespace System.DirectoryServices.ActiveDirectory { diff --git a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/Forest.cs b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/Forest.cs index 05ee5c7c0fd36..1cdc42fbdc9db 100644 --- a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/Forest.cs +++ b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/Forest.cs @@ -1,12 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Text; using System.Collections; -using System.Globalization; using System.ComponentModel; -using System.Runtime.InteropServices; using System.Diagnostics; +using System.Globalization; +using System.Runtime.InteropServices; +using System.Text; namespace System.DirectoryServices.ActiveDirectory { diff --git a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ForestTrustDomainInformation.cs b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ForestTrustDomainInformation.cs index ddc58584f3e3e..9a530d82ec098 100644 --- a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ForestTrustDomainInformation.cs +++ b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ForestTrustDomainInformation.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Runtime.InteropServices; using System.ComponentModel; +using System.Runtime.InteropServices; namespace System.DirectoryServices.ActiveDirectory { diff --git a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ForestTrustRelationshipInformation.cs b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ForestTrustRelationshipInformation.cs index 1d26908776841..7e5ba84a2155f 100644 --- a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ForestTrustRelationshipInformation.cs +++ b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ForestTrustRelationshipInformation.cs @@ -1,10 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Runtime.InteropServices; using System.Collections; using System.Collections.Specialized; - +using System.Runtime.InteropServices; using Microsoft.Win32.SafeHandles; namespace System.DirectoryServices.ActiveDirectory diff --git a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/NativeMethods.cs b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/NativeMethods.cs index db8ecd0de5149..32a7eb9113e8c 100644 --- a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/NativeMethods.cs +++ b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/NativeMethods.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Security; using System.Runtime.InteropServices; +using System.Security; namespace System.DirectoryServices.ActiveDirectory { diff --git a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ReplicationConnection.cs b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ReplicationConnection.cs index f646278e0f2e5..ab40d158fbb2e 100644 --- a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ReplicationConnection.cs +++ b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ReplicationConnection.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Runtime.InteropServices; -using System.Diagnostics; using System.ComponentModel; +using System.Diagnostics; +using System.Runtime.InteropServices; namespace System.DirectoryServices.ActiveDirectory { diff --git a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ReplicationFailure.cs b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ReplicationFailure.cs index 3f70d9d8598e4..5756231782409 100644 --- a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ReplicationFailure.cs +++ b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ReplicationFailure.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Runtime.InteropServices; using System.Collections; +using System.Runtime.InteropServices; namespace System.DirectoryServices.ActiveDirectory { diff --git a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ReplicationNeighbor.cs b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ReplicationNeighbor.cs index ce644bbb90895..157edcd61f842 100644 --- a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ReplicationNeighbor.cs +++ b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ReplicationNeighbor.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Runtime.InteropServices; using System.Collections; +using System.Runtime.InteropServices; namespace System.DirectoryServices.ActiveDirectory { diff --git a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ReplicationOperation.cs b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ReplicationOperation.cs index 09b8f2e23417e..0e2c32f0e186b 100644 --- a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ReplicationOperation.cs +++ b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/ReplicationOperation.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Runtime.InteropServices; using System.Collections; +using System.Runtime.InteropServices; namespace System.DirectoryServices.ActiveDirectory { diff --git a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/TopLevelName.cs b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/TopLevelName.cs index f55e081f0879b..f653a9a9fb97a 100644 --- a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/TopLevelName.cs +++ b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/TopLevelName.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Runtime.InteropServices; using System.ComponentModel; +using System.Runtime.InteropServices; namespace System.DirectoryServices.ActiveDirectory { diff --git a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/TrustHelper.cs b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/TrustHelper.cs index c44664aae8160..6895583e529aa 100644 --- a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/TrustHelper.cs +++ b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/TrustHelper.cs @@ -1,10 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Runtime.InteropServices; using System.Diagnostics; +using System.Runtime.InteropServices; using System.Security.Cryptography; - using Microsoft.Win32.SafeHandles; namespace System.DirectoryServices.ActiveDirectory diff --git a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/Utils.cs b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/Utils.cs index b8fdc052dc00a..edad50ffead07 100644 --- a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/Utils.cs +++ b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/Utils.cs @@ -1,13 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Text; -using System.Net; using System.Collections; -using System.Security.Principal; -using System.Runtime.InteropServices; using System.Diagnostics; - +using System.Net; +using System.Runtime.InteropServices; +using System.Security.Principal; +using System.Text; using Microsoft.Win32.SafeHandles; namespace System.DirectoryServices.ActiveDirectory diff --git a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectorySecurity.cs b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectorySecurity.cs index d7ec807d0a72b..09a187f49e4d9 100644 --- a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectorySecurity.cs +++ b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectorySecurity.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Diagnostics; using System.ComponentModel; -using System.Security.Principal; +using System.Diagnostics; using System.Security.AccessControl; +using System.Security.Principal; namespace System.DirectoryServices { diff --git a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/Design/DirectoryEntryConverter.cs b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/Design/DirectoryEntryConverter.cs index d271095683c48..847d8cb5d0442 100644 --- a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/Design/DirectoryEntryConverter.cs +++ b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/Design/DirectoryEntryConverter.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.ComponentModel; using System.Collections; +using System.ComponentModel; using System.Globalization; namespace System.DirectoryServices.Design diff --git a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/DirectoryEntries.cs b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/DirectoryEntries.cs index cb2082a0f1ffb..4aa84eabb69c4 100644 --- a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/DirectoryEntries.cs +++ b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/DirectoryEntries.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Runtime.InteropServices; using System.Collections; +using System.Runtime.InteropServices; namespace System.DirectoryServices { diff --git a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/DirectoryEntry.cs b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/DirectoryEntry.cs index 54e26eb3653b4..0da317c9d72ab 100644 --- a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/DirectoryEntry.cs +++ b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/DirectoryEntry.cs @@ -1,15 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Runtime.InteropServices; -using System.Diagnostics; using System.ComponentModel; -using System.Threading; -using System.Reflection; +using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.DirectoryServices.Design; using System.Globalization; using System.Net; -using System.Diagnostics.CodeAnalysis; +using System.Reflection; +using System.Runtime.InteropServices; +using System.Threading; namespace System.DirectoryServices { diff --git a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/DirectorySearcher.cs b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/DirectorySearcher.cs index 65d921448894b..02f44bcb47654 100644 --- a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/DirectorySearcher.cs +++ b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/DirectorySearcher.cs @@ -1,13 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Runtime.InteropServices; using System.Collections; using System.Collections.Specialized; using System.ComponentModel; - -using INTPTR_INTPTRCAST = System.IntPtr; using System.Diagnostics.CodeAnalysis; +using System.Runtime.InteropServices; +using INTPTR_INTPTRCAST = System.IntPtr; namespace System.DirectoryServices { diff --git a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/PropertyCollection.cs b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/PropertyCollection.cs index 38d202f705364..5dbb2c3803820 100644 --- a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/PropertyCollection.cs +++ b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/PropertyCollection.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Runtime.InteropServices; using System.Collections; using System.Globalization; +using System.Runtime.InteropServices; namespace System.DirectoryServices { diff --git a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/SearchResultCollection.cs b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/SearchResultCollection.cs index ee820b02f589c..53008a9c79b1e 100644 --- a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/SearchResultCollection.cs +++ b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/SearchResultCollection.cs @@ -1,11 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Collections; using System.Net; using System.Runtime.InteropServices; -using System.Collections; using System.Text; - using INTPTR_INTPTRCAST = System.IntPtr; namespace System.DirectoryServices diff --git a/src/libraries/System.Formats.Tar/src/System/Formats/Tar/TarEntry.Unix.cs b/src/libraries/System.Formats.Tar/src/System/Formats/Tar/TarEntry.Unix.cs index 87a45ba14d6f5..95158c000fd7f 100644 --- a/src/libraries/System.Formats.Tar/src/System/Formats/Tar/TarEntry.Unix.cs +++ b/src/libraries/System.Formats.Tar/src/System/Formats/Tar/TarEntry.Unix.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Diagnostics; -using Microsoft.Win32.SafeHandles; using System.IO; +using Microsoft.Win32.SafeHandles; namespace System.Formats.Tar { diff --git a/src/libraries/System.Formats.Tar/src/System/Formats/Tar/TarHelpers.Unix.cs b/src/libraries/System.Formats.Tar/src/System/Formats/Tar/TarHelpers.Unix.cs index 3e0a0b814484d..f412d69306e19 100644 --- a/src/libraries/System.Formats.Tar/src/System/Formats/Tar/TarHelpers.Unix.cs +++ b/src/libraries/System.Formats.Tar/src/System/Formats/Tar/TarHelpers.Unix.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Collections.Generic; -using System.IO; using System.Diagnostics; +using System.IO; namespace System.Formats.Tar { diff --git a/src/libraries/System.Formats.Tar/src/System/Formats/Tar/TarHelpers.Windows.cs b/src/libraries/System.Formats.Tar/src/System/Formats/Tar/TarHelpers.Windows.cs index 7aedd36c3effc..90a3c22bff6ea 100644 --- a/src/libraries/System.Formats.Tar/src/System/Formats/Tar/TarHelpers.Windows.cs +++ b/src/libraries/System.Formats.Tar/src/System/Formats/Tar/TarHelpers.Windows.cs @@ -2,9 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Collections.Generic; +using System.Diagnostics; using System.IO; using System.Text; -using System.Diagnostics; namespace System.Formats.Tar { diff --git a/src/libraries/System.IO.Compression.ZipFile/src/System/IO/Compression/ZipFile.Create.cs b/src/libraries/System.IO.Compression.ZipFile/src/System/IO/Compression/ZipFile.Create.cs index 5cd64ca6156bd..20608092b959b 100644 --- a/src/libraries/System.IO.Compression.ZipFile/src/System/IO/Compression/ZipFile.Create.cs +++ b/src/libraries/System.IO.Compression.ZipFile/src/System/IO/Compression/ZipFile.Create.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Text; using System.IO.Enumeration; +using System.Text; namespace System.IO.Compression { diff --git a/src/libraries/System.IO.Compression/src/System/IO/Compression/DeflateZLib/DeflateStream.cs b/src/libraries/System.IO.Compression/src/System/IO/Compression/DeflateZLib/DeflateStream.cs index 18b6cb966b5b4..07af0f3a93efb 100644 --- a/src/libraries/System.IO.Compression/src/System/IO/Compression/DeflateZLib/DeflateStream.cs +++ b/src/libraries/System.IO.Compression/src/System/IO/Compression/DeflateZLib/DeflateStream.cs @@ -507,8 +507,13 @@ internal void WriteCore(ReadOnlySpan buffer) EnsureCompressionMode(); EnsureNotDisposed(); - Debug.Assert(_deflater != null); + if (buffer.IsEmpty) + { + return; + } + // Write compressed the bytes we already passed to the deflater: + Debug.Assert(_deflater != null); WriteDeflaterOutput(); unsafe @@ -793,8 +798,9 @@ internal ValueTask WriteAsyncMemory(ReadOnlyMemory buffer, CancellationTok EnsureNoActiveAsyncOperation(); EnsureNotDisposed(); - return cancellationToken.IsCancellationRequested ? - ValueTask.FromCanceled(cancellationToken) : + return + cancellationToken.IsCancellationRequested ? ValueTask.FromCanceled(cancellationToken) : + buffer.IsEmpty ? default : Core(buffer, cancellationToken); async ValueTask Core(ReadOnlyMemory buffer, CancellationToken cancellationToken) @@ -804,8 +810,8 @@ async ValueTask Core(ReadOnlyMemory buffer, CancellationToken cancellation { await WriteDeflaterOutputAsync(cancellationToken).ConfigureAwait(false); - Debug.Assert(_deflater != null); // Pass new bytes through deflater + Debug.Assert(_deflater != null); _deflater.SetInput(buffer); await WriteDeflaterOutputAsync(cancellationToken).ConfigureAwait(false); diff --git a/src/libraries/System.IO.Compression/src/System/IO/Compression/DeflateZLib/Deflater.cs b/src/libraries/System.IO.Compression/src/System/IO/Compression/DeflateZLib/Deflater.cs index f2d02cde7296b..cad0506968f14 100644 --- a/src/libraries/System.IO.Compression/src/System/IO/Compression/DeflateZLib/Deflater.cs +++ b/src/libraries/System.IO.Compression/src/System/IO/Compression/DeflateZLib/Deflater.cs @@ -122,10 +122,7 @@ private void Dispose(bool disposing) internal unsafe void SetInput(ReadOnlyMemory inputBuffer) { Debug.Assert(NeedsInput(), "We have something left in previous input!"); - if (0 == inputBuffer.Length) - { - return; - } + Debug.Assert(!inputBuffer.IsEmpty); lock (SyncLock) { @@ -140,11 +137,7 @@ internal unsafe void SetInput(byte* inputBufferPtr, int count) { Debug.Assert(NeedsInput(), "We have something left in previous input!"); Debug.Assert(inputBufferPtr != null); - - if (count == 0) - { - return; - } + Debug.Assert(count > 0); lock (SyncLock) { diff --git a/src/libraries/System.IO.Compression/tests/CompressionStreamUnitTests.Gzip.cs b/src/libraries/System.IO.Compression/tests/CompressionStreamUnitTests.Gzip.cs index c48e3550c68a1..0e66d73ae2d21 100644 --- a/src/libraries/System.IO.Compression/tests/CompressionStreamUnitTests.Gzip.cs +++ b/src/libraries/System.IO.Compression/tests/CompressionStreamUnitTests.Gzip.cs @@ -73,6 +73,10 @@ public async Task ConcatenatedEmptyGzipStreams() // payload being 0 length before it reads the final buffer-full. int minCompressedSize = 3 * actualBufferSize; + // A single empty chunk in a GZIP header/footer. This is writing the bytes directly + // as the implementation now avoids writing 0-length chunks. + byte[] payload = [31, 139, 8, 0, 0, 0, 0, 0, 2, 10, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + using (Stream compressedStream = new DerivedMemoryStream()) { using (var gz = new GZipStream(compressedStream, CompressionLevel.NoCompression, leaveOpen: true)) @@ -83,10 +87,7 @@ public async Task ConcatenatedEmptyGzipStreams() while (compressedStream.Length < minCompressedSize) { - using (var gz = new GZipStream(compressedStream, CompressionLevel.NoCompression, leaveOpen: true)) - { - gz.Write(Array.Empty()); - } + compressedStream.Write(payload); } compressedStream.Seek(0, SeekOrigin.Begin); diff --git a/src/libraries/System.IO.FileSystem.DriveInfo/src/System/IO/DriveInfo.UnixOrDefault.cs b/src/libraries/System.IO.FileSystem.DriveInfo/src/System/IO/DriveInfo.UnixOrDefault.cs index b39b223228834..90b954e443397 100644 --- a/src/libraries/System.IO.FileSystem.DriveInfo/src/System/IO/DriveInfo.UnixOrDefault.cs +++ b/src/libraries/System.IO.FileSystem.DriveInfo/src/System/IO/DriveInfo.UnixOrDefault.cs @@ -3,8 +3,8 @@ using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; -using System.Security; using System.Runtime.Versioning; +using System.Security; namespace System.IO { diff --git a/src/libraries/System.IO.FileSystem.DriveInfo/src/System/IO/DriveInfo.Windows.cs b/src/libraries/System.IO.FileSystem.DriveInfo/src/System/IO/DriveInfo.Windows.cs index bb495b09c1310..b1edeeee0fce9 100644 --- a/src/libraries/System.IO.FileSystem.DriveInfo/src/System/IO/DriveInfo.Windows.cs +++ b/src/libraries/System.IO.FileSystem.DriveInfo/src/System/IO/DriveInfo.Windows.cs @@ -5,8 +5,8 @@ using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Runtime.InteropServices; -using System.Text; using System.Runtime.Versioning; +using System.Text; namespace System.IO { diff --git a/src/libraries/System.IO.FileSystem.DriveInfo/src/System/IO/Error.cs b/src/libraries/System.IO.FileSystem.DriveInfo/src/System/IO/Error.cs index bf8141073883e..b37ef9f0cdc9e 100644 --- a/src/libraries/System.IO.FileSystem.DriveInfo/src/System/IO/Error.cs +++ b/src/libraries/System.IO.FileSystem.DriveInfo/src/System/IO/Error.cs @@ -2,9 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; +using System.Globalization; using System.Runtime.InteropServices; using System.Text; -using System.Globalization; namespace System.IO { diff --git a/src/libraries/System.IO.FileSystem.Watcher/src/System/IO/FileSystemWatcher.Linux.cs b/src/libraries/System.IO.FileSystem.Watcher/src/System/IO/FileSystemWatcher.Linux.cs index 8a8ae3d025b86..6e1050f1566ba 100644 --- a/src/libraries/System.IO.FileSystem.Watcher/src/System/IO/FileSystemWatcher.Linux.cs +++ b/src/libraries/System.IO.FileSystem.Watcher/src/System/IO/FileSystemWatcher.Linux.cs @@ -1,13 +1,13 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Collections.Generic; using System.Diagnostics; using System.Runtime.CompilerServices; using System.Text; using System.Threading; using System.Threading.Tasks; +using Microsoft.Win32.SafeHandles; namespace System.IO { diff --git a/src/libraries/System.IO.Hashing/src/System/IO/Hashing/Crc32.Vectorized.cs b/src/libraries/System.IO.Hashing/src/System/IO/Hashing/Crc32.Vectorized.cs index 47cc9f1609f95..2862e5b6b7e18 100644 --- a/src/libraries/System.IO.Hashing/src/System/IO/Hashing/Crc32.Vectorized.cs +++ b/src/libraries/System.IO.Hashing/src/System/IO/Hashing/Crc32.Vectorized.cs @@ -3,8 +3,8 @@ using System.Diagnostics; using System.Runtime.CompilerServices; -using System.Runtime.Intrinsics; using System.Runtime.InteropServices; +using System.Runtime.Intrinsics; using static System.IO.Hashing.VectorHelper; namespace System.IO.Hashing diff --git a/src/libraries/System.IO.Hashing/src/System/IO/Hashing/Crc64.Vectorized.cs b/src/libraries/System.IO.Hashing/src/System/IO/Hashing/Crc64.Vectorized.cs index 095bbce58ae46..c2156bd473347 100644 --- a/src/libraries/System.IO.Hashing/src/System/IO/Hashing/Crc64.Vectorized.cs +++ b/src/libraries/System.IO.Hashing/src/System/IO/Hashing/Crc64.Vectorized.cs @@ -3,8 +3,8 @@ using System.Diagnostics; using System.Runtime.CompilerServices; -using System.Runtime.Intrinsics; using System.Runtime.InteropServices; +using System.Runtime.Intrinsics; using static System.IO.Hashing.VectorHelper; namespace System.IO.Hashing diff --git a/src/libraries/System.IO.Hashing/src/System/IO/Hashing/VectorHelper.cs b/src/libraries/System.IO.Hashing/src/System/IO/Hashing/VectorHelper.cs index 8e9d140f2255f..282157eec6ec8 100644 --- a/src/libraries/System.IO.Hashing/src/System/IO/Hashing/VectorHelper.cs +++ b/src/libraries/System.IO.Hashing/src/System/IO/Hashing/VectorHelper.cs @@ -3,9 +3,9 @@ using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; +using System.Runtime.Intrinsics; using System.Runtime.Intrinsics.Arm; using System.Runtime.Intrinsics.X86; -using System.Runtime.Intrinsics; using Aes = System.Runtime.Intrinsics.Arm.Aes; namespace System.IO.Hashing diff --git a/src/libraries/System.IO.IsolatedStorage/src/System/IO/IsolatedStorage/Helper.NonMobile.cs b/src/libraries/System.IO.IsolatedStorage/src/System/IO/IsolatedStorage/Helper.NonMobile.cs index 111281734cc08..b69cdddf6cc88 100644 --- a/src/libraries/System.IO.IsolatedStorage/src/System/IO/IsolatedStorage/Helper.NonMobile.cs +++ b/src/libraries/System.IO.IsolatedStorage/src/System/IO/IsolatedStorage/Helper.NonMobile.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Threading; using System.Security; +using System.Threading; namespace System.IO.IsolatedStorage { diff --git a/src/libraries/System.IO.IsolatedStorage/src/System/IO/IsolatedStorage/IsolatedStorageFileStream.cs b/src/libraries/System.IO.IsolatedStorage/src/System/IO/IsolatedStorage/IsolatedStorageFileStream.cs index cd56b2031d0c4..500be7cc54019 100644 --- a/src/libraries/System.IO.IsolatedStorage/src/System/IO/IsolatedStorage/IsolatedStorageFileStream.cs +++ b/src/libraries/System.IO.IsolatedStorage/src/System/IO/IsolatedStorage/IsolatedStorageFileStream.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; +using System.Runtime.Versioning; using System.Threading; using System.Threading.Tasks; -using System.Runtime.Versioning; +using Microsoft.Win32.SafeHandles; namespace System.IO.IsolatedStorage { diff --git a/src/libraries/System.IO.MemoryMappedFiles/src/System/IO/MemoryMappedFiles/Interop.Windows.cs b/src/libraries/System.IO.MemoryMappedFiles/src/System/IO/MemoryMappedFiles/Interop.Windows.cs index 7c04070369e78..e389997307069 100644 --- a/src/libraries/System.IO.MemoryMappedFiles/src/System/IO/MemoryMappedFiles/Interop.Windows.cs +++ b/src/libraries/System.IO.MemoryMappedFiles/src/System/IO/MemoryMappedFiles/Interop.Windows.cs @@ -1,11 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System; using System.IO; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; internal static partial class Interop { diff --git a/src/libraries/System.IO.MemoryMappedFiles/src/System/IO/MemoryMappedFiles/MemoryMappedFile.Windows.cs b/src/libraries/System.IO.MemoryMappedFiles/src/System/IO/MemoryMappedFiles/MemoryMappedFile.Windows.cs index 702ac2c0e18b7..2b1dc6e465103 100644 --- a/src/libraries/System.IO.MemoryMappedFiles/src/System/IO/MemoryMappedFiles/MemoryMappedFile.Windows.cs +++ b/src/libraries/System.IO.MemoryMappedFiles/src/System/IO/MemoryMappedFiles/MemoryMappedFile.Windows.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Diagnostics; using System.Runtime.InteropServices; using System.Threading; +using Microsoft.Win32.SafeHandles; namespace System.IO.MemoryMappedFiles { diff --git a/src/libraries/System.IO.MemoryMappedFiles/src/System/IO/MemoryMappedFiles/MemoryMappedFile.cs b/src/libraries/System.IO.MemoryMappedFiles/src/System/IO/MemoryMappedFiles/MemoryMappedFile.cs index 49b33555f120d..c0e79b10bfb98 100644 --- a/src/libraries/System.IO.MemoryMappedFiles/src/System/IO/MemoryMappedFiles/MemoryMappedFile.cs +++ b/src/libraries/System.IO.MemoryMappedFiles/src/System/IO/MemoryMappedFiles/MemoryMappedFile.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Diagnostics; using System.Runtime.Versioning; +using Microsoft.Win32.SafeHandles; namespace System.IO.MemoryMappedFiles { diff --git a/src/libraries/System.IO.MemoryMappedFiles/src/System/IO/MemoryMappedFiles/MemoryMappedView.Unix.cs b/src/libraries/System.IO.MemoryMappedFiles/src/System/IO/MemoryMappedFiles/MemoryMappedView.Unix.cs index f3f0df8b02238..6560fc5c6cb25 100644 --- a/src/libraries/System.IO.MemoryMappedFiles/src/System/IO/MemoryMappedFiles/MemoryMappedView.Unix.cs +++ b/src/libraries/System.IO.MemoryMappedFiles/src/System/IO/MemoryMappedFiles/MemoryMappedView.Unix.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Diagnostics; +using Microsoft.Win32.SafeHandles; namespace System.IO.MemoryMappedFiles { diff --git a/src/libraries/System.IO.MemoryMappedFiles/src/System/IO/MemoryMappedFiles/MemoryMappedView.Windows.cs b/src/libraries/System.IO.MemoryMappedFiles/src/System/IO/MemoryMappedFiles/MemoryMappedView.Windows.cs index f92c402249749..f092aa6ff9644 100644 --- a/src/libraries/System.IO.MemoryMappedFiles/src/System/IO/MemoryMappedFiles/MemoryMappedView.Windows.cs +++ b/src/libraries/System.IO.MemoryMappedFiles/src/System/IO/MemoryMappedFiles/MemoryMappedView.Windows.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Diagnostics; using System.Runtime.InteropServices; using System.Threading; +using Microsoft.Win32.SafeHandles; namespace System.IO.MemoryMappedFiles { diff --git a/src/libraries/System.IO.MemoryMappedFiles/src/System/IO/MemoryMappedFiles/MemoryMappedView.cs b/src/libraries/System.IO.MemoryMappedFiles/src/System/IO/MemoryMappedFiles/MemoryMappedView.cs index 7e15128a0d61e..1086258b88816 100644 --- a/src/libraries/System.IO.MemoryMappedFiles/src/System/IO/MemoryMappedFiles/MemoryMappedView.cs +++ b/src/libraries/System.IO.MemoryMappedFiles/src/System/IO/MemoryMappedFiles/MemoryMappedView.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Diagnostics; +using Microsoft.Win32.SafeHandles; namespace System.IO.MemoryMappedFiles { diff --git a/src/libraries/System.IO.MemoryMappedFiles/src/System/IO/MemoryMappedFiles/MemoryMappedViewAccessor.cs b/src/libraries/System.IO.MemoryMappedFiles/src/System/IO/MemoryMappedFiles/MemoryMappedViewAccessor.cs index 2321438afb1d9..3ba6d7d84d796 100644 --- a/src/libraries/System.IO.MemoryMappedFiles/src/System/IO/MemoryMappedFiles/MemoryMappedViewAccessor.cs +++ b/src/libraries/System.IO.MemoryMappedFiles/src/System/IO/MemoryMappedFiles/MemoryMappedViewAccessor.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Diagnostics; +using Microsoft.Win32.SafeHandles; namespace System.IO.MemoryMappedFiles { diff --git a/src/libraries/System.IO.MemoryMappedFiles/src/System/IO/MemoryMappedFiles/MemoryMappedViewStream.cs b/src/libraries/System.IO.MemoryMappedFiles/src/System/IO/MemoryMappedFiles/MemoryMappedViewStream.cs index 6085562fbb030..0640ac6e4e8f5 100644 --- a/src/libraries/System.IO.MemoryMappedFiles/src/System/IO/MemoryMappedFiles/MemoryMappedViewStream.cs +++ b/src/libraries/System.IO.MemoryMappedFiles/src/System/IO/MemoryMappedFiles/MemoryMappedViewStream.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Diagnostics; +using Microsoft.Win32.SafeHandles; namespace System.IO.MemoryMappedFiles { diff --git a/src/libraries/System.IO.Packaging/src/System/IO/Packaging/ContentType.cs b/src/libraries/System.IO.Packaging/src/System/IO/Packaging/ContentType.cs index 91de323bf577b..c6fe72e7f047d 100644 --- a/src/libraries/System.IO.Packaging/src/System/IO/Packaging/ContentType.cs +++ b/src/libraries/System.IO.Packaging/src/System/IO/Packaging/ContentType.cs @@ -45,9 +45,9 @@ using System; using System.Collections.Generic; // For Dictionary -using System.Text; // For StringBuilder using System.Diagnostics; // For Debug.Assert using System.Diagnostics.CodeAnalysis; +using System.Text; // For StringBuilder namespace System.IO.Packaging { diff --git a/src/libraries/System.IO.Packaging/src/System/IO/Packaging/InternalRelationshipCollection.cs b/src/libraries/System.IO.Packaging/src/System/IO/Packaging/InternalRelationshipCollection.cs index efcec9e60be6e..b2ace96c80739 100644 --- a/src/libraries/System.IO.Packaging/src/System/IO/Packaging/InternalRelationshipCollection.cs +++ b/src/libraries/System.IO.Packaging/src/System/IO/Packaging/InternalRelationshipCollection.cs @@ -16,9 +16,9 @@ using System.Collections; using System.Collections.Generic; -using System.Xml; // for XmlReader/Writer using System.Diagnostics; using System.Diagnostics.CodeAnalysis; +using System.Xml; // for XmlReader/Writer namespace System.IO.Packaging { diff --git a/src/libraries/System.IO.Packaging/src/System/IO/Packaging/Package.cs b/src/libraries/System.IO.Packaging/src/System/IO/Packaging/Package.cs index 80a4041860279..f2f92345d3f7e 100644 --- a/src/libraries/System.IO.Packaging/src/System/IO/Packaging/Package.cs +++ b/src/libraries/System.IO.Packaging/src/System/IO/Packaging/Package.cs @@ -2,12 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.IO; using System.Collections; using System.Collections.Generic; using System.Diagnostics; -using System.Security; using System.Diagnostics.CodeAnalysis; +using System.IO; +using System.Security; namespace System.IO.Packaging { diff --git a/src/libraries/System.IO.Packaging/src/System/IO/Packaging/PackageRelationship.cs b/src/libraries/System.IO.Packaging/src/System/IO/Packaging/PackageRelationship.cs index 38b28057ba08d..24091a03f9fd4 100644 --- a/src/libraries/System.IO.Packaging/src/System/IO/Packaging/PackageRelationship.cs +++ b/src/libraries/System.IO.Packaging/src/System/IO/Packaging/PackageRelationship.cs @@ -3,9 +3,9 @@ using System; using System.Collections; -using System.Xml; -using System.Text; using System.Diagnostics; +using System.Text; +using System.Xml; namespace System.IO.Packaging { diff --git a/src/libraries/System.IO.Packaging/src/System/IO/Packaging/PackageXmlStringTable.cs b/src/libraries/System.IO.Packaging/src/System/IO/Packaging/PackageXmlStringTable.cs index 381d99574a2d2..1b52540c6cb56 100644 --- a/src/libraries/System.IO.Packaging/src/System/IO/Packaging/PackageXmlStringTable.cs +++ b/src/libraries/System.IO.Packaging/src/System/IO/Packaging/PackageXmlStringTable.cs @@ -3,9 +3,9 @@ using System; using System.Collections.Generic; +using System.Runtime.InteropServices; using System.Text; using System.Xml; -using System.Runtime.InteropServices; namespace System.IO.Packaging { diff --git a/src/libraries/System.IO.Packaging/src/System/IO/Packaging/PackagingUtilities.cs b/src/libraries/System.IO.Packaging/src/System/IO/Packaging/PackagingUtilities.cs index f87baba3e95df..13b202fdaacf7 100644 --- a/src/libraries/System.IO.Packaging/src/System/IO/Packaging/PackagingUtilities.cs +++ b/src/libraries/System.IO.Packaging/src/System/IO/Packaging/PackagingUtilities.cs @@ -2,10 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.IO; -using System.Xml; using System.Diagnostics; +using System.IO; using System.Text; +using System.Xml; namespace System.IO.Packaging { diff --git a/src/libraries/System.IO.Packaging/src/System/IO/Packaging/PartBasedPackageProperties.cs b/src/libraries/System.IO.Packaging/src/System/IO/Packaging/PartBasedPackageProperties.cs index a5035967e174e..e1fbb6f9b1b20 100644 --- a/src/libraries/System.IO.Packaging/src/System/IO/Packaging/PartBasedPackageProperties.cs +++ b/src/libraries/System.IO.Packaging/src/System/IO/Packaging/PartBasedPackageProperties.cs @@ -2,14 +2,14 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; +using System.Collections; +using System.Collections.Generic; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; +using System.Globalization; using System.IO; using System.IO.Packaging; -using System.Collections; -using System.Collections.Generic; using System.Xml; -using System.Globalization; -using System.Diagnostics.CodeAnalysis; namespace System.IO.Packaging { diff --git a/src/libraries/System.IO.Packaging/src/System/IO/Packaging/XmlCompatibilityReader.cs b/src/libraries/System.IO.Packaging/src/System/IO/Packaging/XmlCompatibilityReader.cs index 900d83d18ae97..f4f0fe9fff462 100644 --- a/src/libraries/System.IO.Packaging/src/System/IO/Packaging/XmlCompatibilityReader.cs +++ b/src/libraries/System.IO.Packaging/src/System/IO/Packaging/XmlCompatibilityReader.cs @@ -2,13 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Xml; using System.Collections; using System.Collections.Generic; -using System.Globalization; using System.Diagnostics; -using System.Threading; using System.Diagnostics.CodeAnalysis; +using System.Globalization; +using System.Threading; +using System.Xml; namespace System.IO.Packaging { diff --git a/src/libraries/System.IO.Packaging/src/System/IO/Packaging/XmlWrappingReader.cs b/src/libraries/System.IO.Packaging/src/System/IO/Packaging/XmlWrappingReader.cs index 370b566b5b0a6..b0bbd50d264d7 100644 --- a/src/libraries/System.IO.Packaging/src/System/IO/Packaging/XmlWrappingReader.cs +++ b/src/libraries/System.IO.Packaging/src/System/IO/Packaging/XmlWrappingReader.cs @@ -2,11 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Xml; -using System.Xml.Schema; -using System.Diagnostics; using System.Collections.Generic; +using System.Diagnostics; using System.Diagnostics.CodeAnalysis; +using System.Xml; +using System.Xml.Schema; namespace System.IO.Packaging { diff --git a/src/libraries/System.IO.Packaging/src/System/IO/Packaging/ZipPackage.cs b/src/libraries/System.IO.Packaging/src/System/IO/Packaging/ZipPackage.cs index d142afc3e0b57..c30915c5eacf9 100644 --- a/src/libraries/System.IO.Packaging/src/System/IO/Packaging/ZipPackage.cs +++ b/src/libraries/System.IO.Packaging/src/System/IO/Packaging/ZipPackage.cs @@ -3,10 +3,10 @@ using System; using System.Collections.Generic; -using System.Xml; //Required for Content Type File manipulation using System.Diagnostics; -using System.IO.Compression; using System.Diagnostics.CodeAnalysis; +using System.IO.Compression; +using System.Xml; //Required for Content Type File manipulation namespace System.IO.Packaging { diff --git a/src/libraries/System.IO.Pipelines/src/System/IO/Pipelines/BufferSegmentStack.cs b/src/libraries/System.IO.Pipelines/src/System/IO/Pipelines/BufferSegmentStack.cs index 026487137da70..35a18f4120f2c 100644 --- a/src/libraries/System.IO.Pipelines/src/System/IO/Pipelines/BufferSegmentStack.cs +++ b/src/libraries/System.IO.Pipelines/src/System/IO/Pipelines/BufferSegmentStack.cs @@ -3,9 +3,9 @@ using System; using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; using System.Text; -using System.Diagnostics.CodeAnalysis; namespace System.IO.Pipelines { diff --git a/src/libraries/System.IO.Pipelines/src/System/IO/Pipelines/ThrowHelper.cs b/src/libraries/System.IO.Pipelines/src/System/IO/Pipelines/ThrowHelper.cs index f769e23e5e8a8..912ceff377bd7 100644 --- a/src/libraries/System.IO.Pipelines/src/System/IO/Pipelines/ThrowHelper.cs +++ b/src/libraries/System.IO.Pipelines/src/System/IO/Pipelines/ThrowHelper.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Runtime.CompilerServices; using System.Diagnostics.CodeAnalysis; +using System.Runtime.CompilerServices; namespace System.IO.Pipelines { diff --git a/src/libraries/System.IO.Pipes/src/System/IO/Pipes/NamedPipeClientStream.Unix.cs b/src/libraries/System.IO.Pipes/src/System/IO/Pipes/NamedPipeClientStream.Unix.cs index cf86f49cf69e9..2dc43385bb6ee 100644 --- a/src/libraries/System.IO.Pipes/src/System/IO/Pipes/NamedPipeClientStream.Unix.cs +++ b/src/libraries/System.IO.Pipes/src/System/IO/Pipes/NamedPipeClientStream.Unix.cs @@ -1,14 +1,14 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.ComponentModel; using System.Diagnostics.CodeAnalysis; -using System.Runtime.InteropServices; using System.Net.Sockets; +using System.Runtime.InteropServices; +using System.Runtime.Versioning; using System.Security; using System.Threading; -using System.Runtime.Versioning; +using Microsoft.Win32.SafeHandles; namespace System.IO.Pipes { diff --git a/src/libraries/System.IO.Pipes/src/System/IO/Pipes/NamedPipeClientStream.Windows.cs b/src/libraries/System.IO.Pipes/src/System/IO/Pipes/NamedPipeClientStream.Windows.cs index 83d4f66d0cf47..6f612bbc904bc 100644 --- a/src/libraries/System.IO.Pipes/src/System/IO/Pipes/NamedPipeClientStream.Windows.cs +++ b/src/libraries/System.IO.Pipes/src/System/IO/Pipes/NamedPipeClientStream.Windows.cs @@ -3,10 +3,10 @@ using System.Diagnostics.CodeAnalysis; using System.Runtime.InteropServices; +using System.Runtime.Versioning; using System.Security.Principal; using System.Threading; using Microsoft.Win32.SafeHandles; -using System.Runtime.Versioning; namespace System.IO.Pipes { diff --git a/src/libraries/System.IO.Pipes/src/System/IO/Pipes/NamedPipeClientStream.cs b/src/libraries/System.IO.Pipes/src/System/IO/Pipes/NamedPipeClientStream.cs index 7af18e6a4f841..35681b35b89b0 100644 --- a/src/libraries/System.IO.Pipes/src/System/IO/Pipes/NamedPipeClientStream.cs +++ b/src/libraries/System.IO.Pipes/src/System/IO/Pipes/NamedPipeClientStream.cs @@ -1,12 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; +using System.Diagnostics; using System.Security; using System.Security.Principal; using System.Threading; using System.Threading.Tasks; -using System.Diagnostics; +using Microsoft.Win32.SafeHandles; namespace System.IO.Pipes { diff --git a/src/libraries/System.IO.Pipes/src/System/IO/Pipes/NamedPipeServerStream.Unix.cs b/src/libraries/System.IO.Pipes/src/System/IO/Pipes/NamedPipeServerStream.Unix.cs index 40bd09bd89ceb..4f6db79a54bf5 100644 --- a/src/libraries/System.IO.Pipes/src/System/IO/Pipes/NamedPipeServerStream.Unix.cs +++ b/src/libraries/System.IO.Pipes/src/System/IO/Pipes/NamedPipeServerStream.Unix.cs @@ -1,13 +1,13 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Collections.Generic; using System.Diagnostics; using System.Net.Sockets; using System.Runtime.InteropServices; using System.Threading; using System.Threading.Tasks; +using Microsoft.Win32.SafeHandles; namespace System.IO.Pipes { diff --git a/src/libraries/System.IO.Pipes/src/System/IO/Pipes/PipeSecurity.cs b/src/libraries/System.IO.Pipes/src/System/IO/Pipes/PipeSecurity.cs index c59046acc4e2b..4e475ee65f810 100644 --- a/src/libraries/System.IO.Pipes/src/System/IO/Pipes/PipeSecurity.cs +++ b/src/libraries/System.IO.Pipes/src/System/IO/Pipes/PipeSecurity.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; +using System.Runtime.InteropServices; using System.Security.AccessControl; using System.Security.Principal; -using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; namespace System.IO.Pipes { diff --git a/src/libraries/System.IO.Pipes/src/System/IO/Pipes/PipeStream.Unix.cs b/src/libraries/System.IO.Pipes/src/System/IO/Pipes/PipeStream.Unix.cs index 8b13fb83bb919..6f535e787fc84 100644 --- a/src/libraries/System.IO.Pipes/src/System/IO/Pipes/PipeStream.Unix.cs +++ b/src/libraries/System.IO.Pipes/src/System/IO/Pipes/PipeStream.Unix.cs @@ -1,16 +1,16 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; +using System.IO; using System.Net.Sockets; using System.Runtime.InteropServices; +using System.Runtime.Versioning; using System.Security; -using System.IO; using System.Threading; using System.Threading.Tasks; -using System.Runtime.Versioning; +using Microsoft.Win32.SafeHandles; namespace System.IO.Pipes { diff --git a/src/libraries/System.IO.Pipes/src/System/IO/Pipes/PipeStream.cs b/src/libraries/System.IO.Pipes/src/System/IO/Pipes/PipeStream.cs index 8e7790d463a31..a52b3cac99bc1 100644 --- a/src/libraries/System.IO.Pipes/src/System/IO/Pipes/PipeStream.cs +++ b/src/libraries/System.IO.Pipes/src/System/IO/Pipes/PipeStream.cs @@ -1,12 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Security; using System.Threading; using System.Threading.Tasks; +using Microsoft.Win32.SafeHandles; namespace System.IO.Pipes { diff --git a/src/libraries/System.IO.Ports/src/System/IO/Ports/SerialPort.Unix.cs b/src/libraries/System.IO.Ports/src/System/IO/Ports/SerialPort.Unix.cs index 79cc4a791f7ae..e8f7b0a2bed08 100644 --- a/src/libraries/System.IO.Ports/src/System/IO/Ports/SerialPort.Unix.cs +++ b/src/libraries/System.IO.Ports/src/System/IO/Ports/SerialPort.Unix.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.ComponentModel; using System.Collections.Generic; +using System.ComponentModel; using System.IO; using System.Runtime.InteropServices; diff --git a/src/libraries/System.IO.Ports/src/System/IO/Ports/SerialPort.Win32.cs b/src/libraries/System.IO.Ports/src/System/IO/Ports/SerialPort.Win32.cs index 22d6a92cd4bac..16393dd27b109 100644 --- a/src/libraries/System.IO.Ports/src/System/IO/Ports/SerialPort.Win32.cs +++ b/src/libraries/System.IO.Ports/src/System/IO/Ports/SerialPort.Win32.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32; using System.ComponentModel; using System.Diagnostics; using System.Runtime.InteropServices; +using Microsoft.Win32; namespace System.IO.Ports { diff --git a/src/libraries/System.IO.Ports/src/System/IO/Ports/SerialPort.cs b/src/libraries/System.IO.Ports/src/System/IO/Ports/SerialPort.cs index 187c22ba58596..83a9a02926bdd 100644 --- a/src/libraries/System.IO.Ports/src/System/IO/Ports/SerialPort.cs +++ b/src/libraries/System.IO.Ports/src/System/IO/Ports/SerialPort.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32; using System.ComponentModel; using System.Diagnostics; using System.Text; +using Microsoft.Win32; namespace System.IO.Ports { diff --git a/src/libraries/System.IO.Ports/src/System/IO/Ports/SerialStream.Unix.cs b/src/libraries/System.IO.Ports/src/System/IO/Ports/SerialStream.Unix.cs index b207ac3c43ab3..e5a8618b814cf 100644 --- a/src/libraries/System.IO.Ports/src/System/IO/Ports/SerialStream.Unix.cs +++ b/src/libraries/System.IO.Ports/src/System/IO/Ports/SerialStream.Unix.cs @@ -5,8 +5,8 @@ using System.Collections; using System.Collections.Generic; using System.Diagnostics; -using System.Runtime.InteropServices; using System.IO.Ports; +using System.Runtime.InteropServices; using System.Threading; using System.Threading.Tasks; using Signals = Interop.Termios.Signals; diff --git a/src/libraries/System.IO.Ports/src/System/IO/Ports/SerialStream.Win32.cs b/src/libraries/System.IO.Ports/src/System/IO/Ports/SerialStream.Win32.cs index fb91c0796e620..c1c56aeda061d 100644 --- a/src/libraries/System.IO.Ports/src/System/IO/Ports/SerialStream.Win32.cs +++ b/src/libraries/System.IO.Ports/src/System/IO/Ports/SerialStream.Win32.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Globalization; +using Microsoft.Win32.SafeHandles; namespace System.IO.Ports { diff --git a/src/libraries/System.IO.Ports/src/System/IO/Ports/SerialStream.Windows.cs b/src/libraries/System.IO.Ports/src/System/IO/Ports/SerialStream.Windows.cs index ee7d1f2190c4e..398eb2817a1d9 100644 --- a/src/libraries/System.IO.Ports/src/System/IO/Ports/SerialStream.Windows.cs +++ b/src/libraries/System.IO.Ports/src/System/IO/Ports/SerialStream.Windows.cs @@ -1,13 +1,13 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Runtime.InteropServices; using System.Threading; using System.Threading.Tasks; +using Microsoft.Win32.SafeHandles; // Notes about the SerialStream: // * The stream is always opened via the SerialStream constructor. diff --git a/src/libraries/System.IO.Ports/src/System/IO/Ports/SerialStream.cs b/src/libraries/System.IO.Ports/src/System/IO/Ports/SerialStream.cs index 298510f8a961f..82181c3e6b45d 100644 --- a/src/libraries/System.IO.Ports/src/System/IO/Ports/SerialStream.cs +++ b/src/libraries/System.IO.Ports/src/System/IO/Ports/SerialStream.cs @@ -1,12 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Collections; using System.Diagnostics; -using System.Runtime.InteropServices; using System.IO.Ports; using System.Net.Sockets; +using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; namespace System.IO.Ports { diff --git a/src/libraries/System.Linq.Expressions/src/System/Dynamic/DynamicObject.cs b/src/libraries/System.Linq.Expressions/src/System/Dynamic/DynamicObject.cs index 21ba4d3e0e723..9e44f0957f174 100644 --- a/src/libraries/System.Linq.Expressions/src/System/Dynamic/DynamicObject.cs +++ b/src/libraries/System.Linq.Expressions/src/System/Dynamic/DynamicObject.cs @@ -4,13 +4,13 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Dynamic.Utils; using System.Linq.Expressions; using System.Reflection; using System.Runtime.CompilerServices; -using AstUtils = System.Linq.Expressions.Utils; using static System.Linq.Expressions.CachedReflectionInfo; -using System.Diagnostics.CodeAnalysis; +using AstUtils = System.Linq.Expressions.Utils; namespace System.Dynamic { diff --git a/src/libraries/System.Linq.Expressions/src/System/Dynamic/Utils/CacheDict.cs b/src/libraries/System.Linq.Expressions/src/System/Dynamic/Utils/CacheDict.cs index 9c9a3bddcc738..b1446848ce617 100644 --- a/src/libraries/System.Linq.Expressions/src/System/Dynamic/Utils/CacheDict.cs +++ b/src/libraries/System.Linq.Expressions/src/System/Dynamic/Utils/CacheDict.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Threading; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; +using System.Threading; namespace System.Dynamic.Utils { diff --git a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/CompilerScope.cs b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/CompilerScope.cs index 0bf51d4af5d07..46ba8ba0859ba 100644 --- a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/CompilerScope.cs +++ b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/CompilerScope.cs @@ -1,15 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; +using System.Dynamic.Utils; using System.Reflection.Emit; using System.Runtime.CompilerServices; -using System.Dynamic.Utils; using static System.Linq.Expressions.CachedReflectionInfo; -using System.Collections; -using System.Diagnostics.CodeAnalysis; namespace System.Linq.Expressions.Compiler { diff --git a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/DelegateHelpers.cs b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/DelegateHelpers.cs index db80a9c43fd4c..5be00ff31ea82 100644 --- a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/DelegateHelpers.cs +++ b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/DelegateHelpers.cs @@ -2,12 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Collections.ObjectModel; -using System.Runtime.CompilerServices; using System.Diagnostics.CodeAnalysis; using System.Dynamic; using System.Dynamic.Utils; using System.Reflection; using System.Reflection.Emit; +using System.Runtime.CompilerServices; namespace System.Linq.Expressions.Compiler { diff --git a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/HoistedLocals.cs b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/HoistedLocals.cs index 0ee30b9f2abe4..de545b8096bc2 100644 --- a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/HoistedLocals.cs +++ b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/HoistedLocals.cs @@ -3,8 +3,8 @@ using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Runtime.CompilerServices; using System.Dynamic.Utils; +using System.Runtime.CompilerServices; namespace System.Linq.Expressions.Compiler { diff --git a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/StackSpiller.cs b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/StackSpiller.cs index 6b10eae46d43a..791d00074e770 100644 --- a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/StackSpiller.cs +++ b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/StackSpiller.cs @@ -4,10 +4,10 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Dynamic.Utils; using System.Reflection; using System.Runtime.CompilerServices; -using System.Diagnostics.CodeAnalysis; namespace System.Linq.Expressions.Compiler { diff --git a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/ConditionalExpression.cs b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/ConditionalExpression.cs index 6ba64991f2f7a..423a328b74e86 100644 --- a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/ConditionalExpression.cs +++ b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/ConditionalExpression.cs @@ -1,9 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Dynamic.Utils; using System.Diagnostics; - +using System.Dynamic.Utils; using AstUtils = System.Linq.Expressions.Utils; namespace System.Linq.Expressions diff --git a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Interpreter/BranchLabel.cs b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Interpreter/BranchLabel.cs index cdc11b8d4e8db..9d25321ac6419 100644 --- a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Interpreter/BranchLabel.cs +++ b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Interpreter/BranchLabel.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Diagnostics; using System.Collections.Generic; +using System.Diagnostics; using System.Globalization; namespace System.Linq.Expressions.Interpreter diff --git a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Interpreter/CallInstruction.cs b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Interpreter/CallInstruction.cs index f73d513a25d07..e582660ed3d20 100644 --- a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Interpreter/CallInstruction.cs +++ b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Interpreter/CallInstruction.cs @@ -1,11 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Reflection; -using System.Dynamic.Utils; using System.Collections.Generic; -using System.Runtime.CompilerServices; using System.Diagnostics.CodeAnalysis; +using System.Dynamic.Utils; +using System.Reflection; +using System.Runtime.CompilerServices; namespace System.Linq.Expressions.Interpreter { diff --git a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Interpreter/InstructionList.cs b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Interpreter/InstructionList.cs index c3cac4e6078a3..c9d525a81a082 100644 --- a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Interpreter/InstructionList.cs +++ b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Interpreter/InstructionList.cs @@ -6,10 +6,10 @@ using System.Collections.Generic; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; +using System.Dynamic.Utils; using System.Reflection; using System.Runtime.CompilerServices; -using System.Dynamic.Utils; -using System.Diagnostics.CodeAnalysis; namespace System.Linq.Expressions.Interpreter { diff --git a/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Channels/AsynchronousChannel.cs b/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Channels/AsynchronousChannel.cs index 95c8d1f658ba1..730f10d498aa0 100644 --- a/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Channels/AsynchronousChannel.cs +++ b/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Channels/AsynchronousChannel.cs @@ -7,9 +7,9 @@ // // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -using System.Threading; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; +using System.Threading; namespace System.Linq.Parallel { diff --git a/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Enumerables/AggregationMinMaxHelpers.cs b/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Enumerables/AggregationMinMaxHelpers.cs index 746c1a5b7496a..96121cd4809b6 100644 --- a/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Enumerables/AggregationMinMaxHelpers.cs +++ b/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Enumerables/AggregationMinMaxHelpers.cs @@ -8,9 +8,9 @@ // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- using System.Collections.Generic; -using System.Linq.Parallel; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; +using System.Linq.Parallel; namespace System.Linq { diff --git a/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Enumerables/OrderedParallelQuery.cs b/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Enumerables/OrderedParallelQuery.cs index 4a2fcf470bafd..97382a0f658de 100644 --- a/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Enumerables/OrderedParallelQuery.cs +++ b/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Enumerables/OrderedParallelQuery.cs @@ -9,9 +9,9 @@ using System; using System.Collections.Generic; -using System.Text; -using System.Linq.Parallel; using System.Diagnostics; +using System.Linq.Parallel; +using System.Text; namespace System.Linq { diff --git a/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Enumerables/ParallelQuery.cs b/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Enumerables/ParallelQuery.cs index c15f40560c5bc..4cc551c6a8bf3 100644 --- a/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Enumerables/ParallelQuery.cs +++ b/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Enumerables/ParallelQuery.cs @@ -10,9 +10,9 @@ using System.Collections; using System.Collections.Generic; -using System.Linq.Parallel; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; +using System.Linq.Parallel; namespace System.Linq { diff --git a/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Merging/ArrayMergeHelper.cs b/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Merging/ArrayMergeHelper.cs index 1be7789b710d1..2c2d7326cc617 100644 --- a/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Merging/ArrayMergeHelper.cs +++ b/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Merging/ArrayMergeHelper.cs @@ -9,12 +9,12 @@ using System; using System.Collections.Generic; +using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Linq; -using System.Text; using System.Linq.Parallel; -using System.Diagnostics; +using System.Text; using System.Threading.Tasks; -using System.Diagnostics.CodeAnalysis; namespace System.Linq.Parallel { diff --git a/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Merging/AsynchronousChannelMergeEnumerator.cs b/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Merging/AsynchronousChannelMergeEnumerator.cs index 4db5b14c1537b..4f07f1b5c4521 100644 --- a/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Merging/AsynchronousChannelMergeEnumerator.cs +++ b/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Merging/AsynchronousChannelMergeEnumerator.cs @@ -7,9 +7,9 @@ // // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -using System.Threading; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; +using System.Threading; namespace System.Linq.Parallel { diff --git a/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Merging/DefaultMergeHelper.cs b/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Merging/DefaultMergeHelper.cs index 26058969e63c5..6f6ce7e7e91c0 100644 --- a/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Merging/DefaultMergeHelper.cs +++ b/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Merging/DefaultMergeHelper.cs @@ -8,9 +8,9 @@ // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- using System.Collections.Generic; +using System.Diagnostics; using System.Threading; using System.Threading.Tasks; -using System.Diagnostics; namespace System.Linq.Parallel { diff --git a/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Merging/MergeExecutor.cs b/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Merging/MergeExecutor.cs index 5a18d6fd93ca6..7e2f989d36279 100644 --- a/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Merging/MergeExecutor.cs +++ b/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Merging/MergeExecutor.cs @@ -9,9 +9,9 @@ using System.Collections; using System.Collections.Generic; +using System.Diagnostics; using System.Threading; using System.Threading.Tasks; -using System.Diagnostics; namespace System.Linq.Parallel { diff --git a/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Merging/OrderPreservingMergeHelper.cs b/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Merging/OrderPreservingMergeHelper.cs index e79ed5116f594..356c22c62404a 100644 --- a/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Merging/OrderPreservingMergeHelper.cs +++ b/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Merging/OrderPreservingMergeHelper.cs @@ -8,8 +8,8 @@ // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- using System.Collections.Generic; -using System.Threading.Tasks; using System.Diagnostics; +using System.Threading.Tasks; namespace System.Linq.Parallel { diff --git a/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Partitioning/HashRepartitionEnumerator.cs b/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Partitioning/HashRepartitionEnumerator.cs index bce7107dd3640..e55089b7a86d4 100644 --- a/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Partitioning/HashRepartitionEnumerator.cs +++ b/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Partitioning/HashRepartitionEnumerator.cs @@ -8,9 +8,9 @@ // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- using System.Collections.Generic; -using System.Threading; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; +using System.Threading; namespace System.Linq.Parallel { diff --git a/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Partitioning/OrderedHashRepartitionEnumerator.cs b/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Partitioning/OrderedHashRepartitionEnumerator.cs index e1e749e5d7404..c608ea2fa0d39 100644 --- a/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Partitioning/OrderedHashRepartitionEnumerator.cs +++ b/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Partitioning/OrderedHashRepartitionEnumerator.cs @@ -8,9 +8,9 @@ // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- using System.Collections.Generic; -using System.Threading; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; +using System.Threading; namespace System.Linq.Parallel { diff --git a/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Partitioning/PartitionedDataSource.cs b/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Partitioning/PartitionedDataSource.cs index cf86f5d41663f..cf9eb1c3c0c80 100644 --- a/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Partitioning/PartitionedDataSource.cs +++ b/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Partitioning/PartitionedDataSource.cs @@ -8,9 +8,9 @@ // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- using System.Collections.Generic; -using System.Threading; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; +using System.Threading; namespace System.Linq.Parallel { diff --git a/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/QueryOperators/PartitionedStreamMerger.cs b/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/QueryOperators/PartitionedStreamMerger.cs index 65275582d630a..09a0209f4842a 100644 --- a/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/QueryOperators/PartitionedStreamMerger.cs +++ b/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/QueryOperators/PartitionedStreamMerger.cs @@ -7,8 +7,8 @@ // // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -using System.Threading.Tasks; using System.Diagnostics; +using System.Threading.Tasks; namespace System.Linq.Parallel { diff --git a/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/QueryOperators/PartitionerQueryOperator.cs b/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/QueryOperators/PartitionerQueryOperator.cs index 9ea85ac61d933..13d8d763ef638 100644 --- a/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/QueryOperators/PartitionerQueryOperator.cs +++ b/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/QueryOperators/PartitionerQueryOperator.cs @@ -8,14 +8,14 @@ // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- using System; +using System.Collections.Concurrent; using System.Collections.Generic; +using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Linq; -using System.Text; -using System.Collections.Concurrent; using System.Linq.Parallel; -using System.Diagnostics; +using System.Text; using System.Threading; -using System.Diagnostics.CodeAnalysis; namespace System.Linq.Parallel { diff --git a/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/QueryOperators/QueryOpeningEnumerator.cs b/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/QueryOperators/QueryOpeningEnumerator.cs index b85e3fb3a30ed..ca76489df3906 100644 --- a/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/QueryOperators/QueryOpeningEnumerator.cs +++ b/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/QueryOperators/QueryOpeningEnumerator.cs @@ -9,8 +9,8 @@ using System.Collections; using System.Collections.Generic; -using System.Threading; using System.Diagnostics; +using System.Threading; namespace System.Linq.Parallel { diff --git a/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/QueryOperators/QueryOperator.cs b/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/QueryOperators/QueryOperator.cs index 77708660deb2e..3aaea21dea256 100644 --- a/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/QueryOperators/QueryOperator.cs +++ b/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/QueryOperators/QueryOperator.cs @@ -9,9 +9,9 @@ using System.Collections; using System.Collections.Generic; +using System.Diagnostics; using System.Threading; using System.Threading.Tasks; -using System.Diagnostics; namespace System.Linq.Parallel { diff --git a/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/QueryOperators/QuerySettings.cs b/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/QueryOperators/QuerySettings.cs index 93bcda203a264..61d291fe33017 100644 --- a/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/QueryOperators/QuerySettings.cs +++ b/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/QueryOperators/QuerySettings.cs @@ -7,9 +7,9 @@ // // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- +using System.Diagnostics; using System.Threading; using System.Threading.Tasks; -using System.Diagnostics; namespace System.Linq.Parallel { diff --git a/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/QueryOperators/Unary/ForAllOperator.cs b/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/QueryOperators/Unary/ForAllOperator.cs index 67dac75447cd8..0862d63797f4c 100644 --- a/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/QueryOperators/Unary/ForAllOperator.cs +++ b/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/QueryOperators/Unary/ForAllOperator.cs @@ -8,9 +8,9 @@ // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- using System.Collections.Generic; -using System.Threading; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; +using System.Threading; namespace System.Linq.Parallel { diff --git a/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/QueryOperators/Unary/LastQueryOperator.cs b/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/QueryOperators/Unary/LastQueryOperator.cs index 6d3de6b44b96c..396c2680aca7f 100644 --- a/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/QueryOperators/Unary/LastQueryOperator.cs +++ b/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/QueryOperators/Unary/LastQueryOperator.cs @@ -8,9 +8,9 @@ // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- using System.Collections.Generic; -using System.Threading; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; +using System.Threading; namespace System.Linq.Parallel { diff --git a/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/QueryOperators/Unary/SingleQueryOperator.cs b/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/QueryOperators/Unary/SingleQueryOperator.cs index 2aa39c30ba66c..6e8930537b1d4 100644 --- a/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/QueryOperators/Unary/SingleQueryOperator.cs +++ b/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/QueryOperators/Unary/SingleQueryOperator.cs @@ -8,9 +8,9 @@ // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- using System.Collections.Generic; -using System.Threading; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; +using System.Threading; namespace System.Linq.Parallel { diff --git a/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/QueryOperators/Unary/TakeOrSkipQueryOperator.cs b/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/QueryOperators/Unary/TakeOrSkipQueryOperator.cs index 586a301cf1059..cd448cb1569bb 100644 --- a/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/QueryOperators/Unary/TakeOrSkipQueryOperator.cs +++ b/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/QueryOperators/Unary/TakeOrSkipQueryOperator.cs @@ -8,9 +8,9 @@ // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- using System.Collections.Generic; -using System.Threading; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; +using System.Threading; namespace System.Linq.Parallel { diff --git a/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/QueryOperators/Unary/TakeOrSkipWhileQueryOperator.cs b/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/QueryOperators/Unary/TakeOrSkipWhileQueryOperator.cs index 3624dfb29fc56..61596995c182b 100644 --- a/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/QueryOperators/Unary/TakeOrSkipWhileQueryOperator.cs +++ b/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/QueryOperators/Unary/TakeOrSkipWhileQueryOperator.cs @@ -8,9 +8,9 @@ // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- using System.Collections.Generic; -using System.Threading; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; +using System.Threading; namespace System.Linq.Parallel { diff --git a/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Scheduling/OrderPreservingPipeliningSpoolingTask.cs b/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Scheduling/OrderPreservingPipeliningSpoolingTask.cs index b419c38ce7839..1e16bcae8f238 100644 --- a/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Scheduling/OrderPreservingPipeliningSpoolingTask.cs +++ b/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Scheduling/OrderPreservingPipeliningSpoolingTask.cs @@ -9,12 +9,12 @@ using System; using System.Collections.Generic; +using System.Diagnostics; using System.Linq; using System.Linq.Parallel; using System.Text; using System.Threading; using System.Threading.Tasks; -using System.Diagnostics; namespace System.Linq.Parallel { diff --git a/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Scheduling/OrderPreservingSpoolingTask.cs b/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Scheduling/OrderPreservingSpoolingTask.cs index 36d0645dc293f..5542eec0c7924 100644 --- a/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Scheduling/OrderPreservingSpoolingTask.cs +++ b/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Scheduling/OrderPreservingSpoolingTask.cs @@ -7,9 +7,9 @@ // // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- +using System.Diagnostics; using System.Threading; using System.Threading.Tasks; -using System.Diagnostics; namespace System.Linq.Parallel { diff --git a/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Scheduling/QueryTask.cs b/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Scheduling/QueryTask.cs index 8020c59c8cf22..7dfbf60c46272 100644 --- a/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Scheduling/QueryTask.cs +++ b/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Scheduling/QueryTask.cs @@ -7,9 +7,9 @@ // // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- +using System.Diagnostics; using System.Threading; using System.Threading.Tasks; -using System.Diagnostics; namespace System.Linq.Parallel { diff --git a/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Scheduling/QueryTaskGroupState.cs b/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Scheduling/QueryTaskGroupState.cs index c3dff145ea172..19631faf1603b 100644 --- a/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Scheduling/QueryTaskGroupState.cs +++ b/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Scheduling/QueryTaskGroupState.cs @@ -8,9 +8,9 @@ // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- using System.Collections.Generic; +using System.Diagnostics; using System.Threading; using System.Threading.Tasks; -using System.Diagnostics; namespace System.Linq.Parallel { diff --git a/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Scheduling/Scheduling.cs b/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Scheduling/Scheduling.cs index fa609ca10719f..acc5c8f170371 100644 --- a/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Scheduling/Scheduling.cs +++ b/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Scheduling/Scheduling.cs @@ -12,12 +12,12 @@ using System; using System.Collections.Generic; +using System.Diagnostics; using System.Globalization; using System.Runtime.InteropServices; +using System.Security; using System.Threading; -using System.Diagnostics; using System.Threading.Tasks; -using System.Security; namespace System.Linq.Parallel { diff --git a/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Scheduling/SpoolingTask.cs b/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Scheduling/SpoolingTask.cs index 198fd693c458d..5c4c2e47ce6a5 100644 --- a/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Scheduling/SpoolingTask.cs +++ b/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Scheduling/SpoolingTask.cs @@ -7,9 +7,9 @@ // // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- +using System.Diagnostics; using System.Threading; using System.Threading.Tasks; -using System.Diagnostics; namespace System.Linq.Parallel { diff --git a/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Utils/CancellableEnumerable.cs b/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Utils/CancellableEnumerable.cs index 3eb4383618bdf..4943bcc1711a1 100644 --- a/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Utils/CancellableEnumerable.cs +++ b/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Utils/CancellableEnumerable.cs @@ -10,9 +10,9 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Linq.Parallel; using System.Text; using System.Threading; -using System.Linq.Parallel; namespace System.Linq.Parallel { diff --git a/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Utils/PLINQETWProvider.cs b/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Utils/PLINQETWProvider.cs index 3529a5edceb51..7cf1ba84e8536 100644 --- a/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Utils/PLINQETWProvider.cs +++ b/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Utils/PLINQETWProvider.cs @@ -11,10 +11,10 @@ using System; using System.Collections.Generic; +using System.Diagnostics.Tracing; using System.Text; using System.Threading; using System.Threading.Tasks; -using System.Diagnostics.Tracing; namespace System.Linq.Parallel { diff --git a/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Utils/Sorting.cs b/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Utils/Sorting.cs index 5a0fb29343b15..2f030b7939fa1 100644 --- a/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Utils/Sorting.cs +++ b/src/libraries/System.Linq.Parallel/src/System/Linq/Parallel/Utils/Sorting.cs @@ -11,8 +11,8 @@ using System; using System.Collections.Generic; -using System.Threading; using System.Diagnostics; +using System.Threading; namespace System.Linq.Parallel { diff --git a/src/libraries/System.Linq.Parallel/src/System/Linq/ParallelEnumerable.cs b/src/libraries/System.Linq.Parallel/src/System/Linq/ParallelEnumerable.cs index 0552ded75cb5f..855b7b52fd59e 100644 --- a/src/libraries/System.Linq.Parallel/src/System/Linq/ParallelEnumerable.cs +++ b/src/libraries/System.Linq.Parallel/src/System/Linq/ParallelEnumerable.cs @@ -12,14 +12,14 @@ // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- using System; +using System.Collections; +using System.Collections.Concurrent; using System.Collections.Generic; -using System.Threading; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Linq.Parallel; -using System.Collections.Concurrent; -using System.Collections; +using System.Threading; using System.Threading.Tasks; -using System.Diagnostics.CodeAnalysis; namespace System.Linq { diff --git a/src/libraries/System.Management/src/System/Management/InteropClasses/WMIInterop.cs b/src/libraries/System.Management/src/System/Management/InteropClasses/WMIInterop.cs index 16e6590200502..7ed074d30abf4 100644 --- a/src/libraries/System.Management/src/System/Management/InteropClasses/WMIInterop.cs +++ b/src/libraries/System.Management/src/System/Management/InteropClasses/WMIInterop.cs @@ -3,11 +3,11 @@ using System.Collections; using System.Runtime.InteropServices; -using System.Security; using System.Runtime.Serialization; -using System.Threading; using System.Runtime.Versioning; +using System.Security; using System.Text; +using System.Threading; // We need to target netstandard2.0, so keep using ref for MemoryMarshal.Write // CS9191: The 'ref' modifier for argument 2 corresponding to 'in' parameter is equivalent to 'in'. Consider using 'in' instead. diff --git a/src/libraries/System.Management/src/System/Management/ManagementBaseObject.cs b/src/libraries/System.Management/src/System/Management/ManagementBaseObject.cs index c196511a32b0f..0da42a48cedbb 100644 --- a/src/libraries/System.Management/src/System/Management/ManagementBaseObject.cs +++ b/src/libraries/System.Management/src/System/Management/ManagementBaseObject.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Runtime.InteropServices; using System.ComponentModel; +using System.Runtime.InteropServices; using System.Runtime.Serialization; using System.Security.Permissions; diff --git a/src/libraries/System.Management/src/System/Management/ManagementClass.cs b/src/libraries/System.Management/src/System/Management/ManagementClass.cs index 69a2e70b7b62f..96806c56afed3 100644 --- a/src/libraries/System.Management/src/System/Management/ManagementClass.cs +++ b/src/libraries/System.Management/src/System/Management/ManagementClass.cs @@ -1,11 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.CodeDom; using System.Collections.Specialized; using System.ComponentModel; using System.Runtime.InteropServices; using System.Runtime.Serialization; -using System.CodeDom; namespace System.Management { diff --git a/src/libraries/System.Management/src/System/Management/ManagementEventWatcher.cs b/src/libraries/System.Management/src/System/Management/ManagementEventWatcher.cs index 8d37ccdb2c816..846b73c89f5e7 100644 --- a/src/libraries/System.Management/src/System/Management/ManagementEventWatcher.cs +++ b/src/libraries/System.Management/src/System/Management/ManagementEventWatcher.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Runtime.InteropServices; using System.ComponentModel; +using System.Runtime.InteropServices; using System.Threading; namespace System.Management diff --git a/src/libraries/System.Management/src/System/Management/ManagementObjectSearcher.cs b/src/libraries/System.Management/src/System/Management/ManagementObjectSearcher.cs index 53a222f64b622..d985b03c7221b 100644 --- a/src/libraries/System.Management/src/System/Management/ManagementObjectSearcher.cs +++ b/src/libraries/System.Management/src/System/Management/ManagementObjectSearcher.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Runtime.InteropServices; using System.ComponentModel; +using System.Runtime.InteropServices; namespace System.Management { diff --git a/src/libraries/System.Management/src/System/Management/ManagementPath.cs b/src/libraries/System.Management/src/System/Management/ManagementPath.cs index 27837feba6fe6..87907913c4e77 100644 --- a/src/libraries/System.Management/src/System/Management/ManagementPath.cs +++ b/src/libraries/System.Management/src/System/Management/ManagementPath.cs @@ -1,12 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Diagnostics; using System.ComponentModel; -using System.Runtime.InteropServices; +using System.ComponentModel.Design.Serialization; +using System.Diagnostics; using System.Globalization; using System.Reflection; -using System.ComponentModel.Design.Serialization; +using System.Runtime.InteropServices; using System.Text; namespace System.Management diff --git a/src/libraries/System.Management/src/System/Management/ManagementQuery.cs b/src/libraries/System.Management/src/System/Management/ManagementQuery.cs index 4304123de2171..4cc54855c7044 100644 --- a/src/libraries/System.Management/src/System/Management/ManagementQuery.cs +++ b/src/libraries/System.Management/src/System/Management/ManagementQuery.cs @@ -2,10 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Collections.Specialized; +using System.ComponentModel; +using System.ComponentModel.Design.Serialization; using System.Globalization; using System.Reflection; -using System.ComponentModel.Design.Serialization; -using System.ComponentModel; namespace System.Management { diff --git a/src/libraries/System.Management/src/System/Management/ManagementScope.cs b/src/libraries/System.Management/src/System/Management/ManagementScope.cs index 79cbe515db5dc..84f3491f414ff 100644 --- a/src/libraries/System.Management/src/System/Management/ManagementScope.cs +++ b/src/libraries/System.Management/src/System/Management/ManagementScope.cs @@ -2,11 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.ComponentModel; -using System.Runtime.InteropServices; +using System.ComponentModel.Design.Serialization; using System.Globalization; using System.IO; using System.Reflection; -using System.ComponentModel.Design.Serialization; +using System.Runtime.InteropServices; using System.Security; using Microsoft.Win32; diff --git a/src/libraries/System.Management/src/System/Management/Property.cs b/src/libraries/System.Management/src/System/Management/Property.cs index 07969d4f03df5..fcb5d51bb1ae3 100644 --- a/src/libraries/System.Management/src/System/Management/Property.cs +++ b/src/libraries/System.Management/src/System/Management/Property.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Runtime.InteropServices; -using System.Runtime.CompilerServices; using System.Globalization; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; namespace System.Management { diff --git a/src/libraries/System.Management/src/System/Management/Qualifier.cs b/src/libraries/System.Management/src/System/Management/Qualifier.cs index fcc68f6ccf035..308c53687c58e 100644 --- a/src/libraries/System.Management/src/System/Management/Qualifier.cs +++ b/src/libraries/System.Management/src/System/Management/Qualifier.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Runtime.InteropServices; using System.Globalization; +using System.Runtime.InteropServices; namespace System.Management { diff --git a/src/libraries/System.Management/src/System/Management/WMIGenerator.cs b/src/libraries/System.Management/src/System/Management/WMIGenerator.cs index f60168c9cb976..e6c4eec34e5a5 100644 --- a/src/libraries/System.Management/src/System/Management/WMIGenerator.cs +++ b/src/libraries/System.Management/src/System/Management/WMIGenerator.cs @@ -1,8 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.CSharp; -using Microsoft.VisualBasic; using System.CodeDom; using System.CodeDom.Compiler; using System.Collections; @@ -10,6 +8,8 @@ using System.IO; using System.Reflection; using System.Runtime.Versioning; +using Microsoft.CSharp; +using Microsoft.VisualBasic; namespace System.Management { diff --git a/src/libraries/System.Net.Http/src/System/Net/Http/BrowserHttpHandler/BrowserHttpHandler.cs b/src/libraries/System.Net.Http/src/System/Net/Http/BrowserHttpHandler/BrowserHttpHandler.cs index 77468c70dd5cc..b1ef3b6c8999c 100644 --- a/src/libraries/System.Net.Http/src/System/Net/Http/BrowserHttpHandler/BrowserHttpHandler.cs +++ b/src/libraries/System.Net.Http/src/System/Net/Http/BrowserHttpHandler/BrowserHttpHandler.cs @@ -1,13 +1,13 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Collections.Concurrent; using System.Collections.Generic; -using System.Net.Security; using System.IO; +using System.Net.Security; +using System.Runtime.InteropServices.JavaScript; using System.Threading; using System.Threading.Tasks; -using System.Runtime.InteropServices.JavaScript; -using System.Collections.Concurrent; namespace System.Net.Http { diff --git a/src/libraries/System.Net.Http/src/System/Net/Http/BrowserHttpHandler/SocketsHttpHandler.cs b/src/libraries/System.Net.Http/src/System/Net/Http/BrowserHttpHandler/SocketsHttpHandler.cs index 9afd16e0d051b..1e82a7b46ea08 100644 --- a/src/libraries/System.Net.Http/src/System/Net/Http/BrowserHttpHandler/SocketsHttpHandler.cs +++ b/src/libraries/System.Net.Http/src/System/Net/Http/BrowserHttpHandler/SocketsHttpHandler.cs @@ -2,14 +2,14 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Collections.Generic; +using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; +using System.Diagnostics.Metrics; using System.IO; using System.Net.Security; using System.Runtime.Versioning; using System.Threading; using System.Threading.Tasks; -using System.Diagnostics.CodeAnalysis; -using System.Diagnostics; -using System.Diagnostics.Metrics; namespace System.Net.Http { diff --git a/src/libraries/System.Net.Http/src/System/Net/Http/DelegatingHandler.cs b/src/libraries/System.Net.Http/src/System/Net/Http/DelegatingHandler.cs index cb6d1ed4cc70c..e8d0ec2ff8397 100644 --- a/src/libraries/System.Net.Http/src/System/Net/Http/DelegatingHandler.cs +++ b/src/libraries/System.Net.Http/src/System/Net/Http/DelegatingHandler.cs @@ -3,10 +3,10 @@ using System; using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; using System.Text; using System.Threading; using System.Threading.Tasks; -using System.Diagnostics.CodeAnalysis; namespace System.Net.Http { diff --git a/src/libraries/System.Net.Http/src/System/Net/Http/Headers/RetryConditionHeaderValue.cs b/src/libraries/System.Net.Http/src/System/Net/Http/Headers/RetryConditionHeaderValue.cs index db32ceea9a5a8..709db244ee6e9 100644 --- a/src/libraries/System.Net.Http/src/System/Net/Http/Headers/RetryConditionHeaderValue.cs +++ b/src/libraries/System.Net.Http/src/System/Net/Http/Headers/RetryConditionHeaderValue.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Diagnostics; -using System.Globalization; using System.Diagnostics.CodeAnalysis; +using System.Globalization; namespace System.Net.Http.Headers { diff --git a/src/libraries/System.Net.Http/src/System/Net/Http/MessageProcessingHandler.cs b/src/libraries/System.Net.Http/src/System/Net/Http/MessageProcessingHandler.cs index 8c50087e6d59d..8e9ffc6993b41 100644 --- a/src/libraries/System.Net.Http/src/System/Net/Http/MessageProcessingHandler.cs +++ b/src/libraries/System.Net.Http/src/System/Net/Http/MessageProcessingHandler.cs @@ -6,8 +6,8 @@ using System.Diagnostics; using System.Runtime.ExceptionServices; using System.Text; -using System.Threading.Tasks; using System.Threading; +using System.Threading.Tasks; namespace System.Net.Http { diff --git a/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/AuthenticationHelper.NtAuth.cs b/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/AuthenticationHelper.NtAuth.cs index eee8c617b5345..f27e569ed332e 100644 --- a/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/AuthenticationHelper.NtAuth.cs +++ b/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/AuthenticationHelper.NtAuth.cs @@ -1,15 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.ComponentModel; using System.Collections.Generic; +using System.ComponentModel; using System.Diagnostics; using System.Net; using System.Net.Http.Headers; using System.Net.Security; +using System.Security.Authentication.ExtendedProtection; using System.Threading; using System.Threading.Tasks; -using System.Security.Authentication.ExtendedProtection; namespace System.Net.Http { diff --git a/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/CookieHelper.cs b/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/CookieHelper.cs index 7979d23d49529..6ebbb6de0d799 100644 --- a/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/CookieHelper.cs +++ b/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/CookieHelper.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Net.Http.Headers; -using System.Diagnostics; using System.Collections.Generic; +using System.Diagnostics; +using System.Net.Http.Headers; namespace System.Net.Http { diff --git a/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http3Connection.cs b/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http3Connection.cs index 58e9594691b91..a4e8efeca6412 100644 --- a/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http3Connection.cs +++ b/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http3Connection.cs @@ -1,16 +1,16 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Threading; -using System.Threading.Tasks; -using System.Runtime.CompilerServices; -using System.Runtime.Versioning; -using System.Net.Quic; -using System.IO; using System.Collections.Generic; using System.Diagnostics; using System.Globalization; +using System.IO; using System.Net.Http.Headers; +using System.Net.Quic; +using System.Runtime.CompilerServices; +using System.Runtime.Versioning; +using System.Threading; +using System.Threading.Tasks; namespace System.Net.Http { diff --git a/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http3RequestStream.cs b/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http3RequestStream.cs index 1c65fe256b48b..8ff03d84ca67c 100644 --- a/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http3RequestStream.cs +++ b/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http3RequestStream.cs @@ -6,14 +6,14 @@ using System.Diagnostics.CodeAnalysis; using System.IO; using System.Net.Http.Headers; +using System.Net.Http.QPack; using System.Net.Quic; +using System.Runtime.CompilerServices; +using System.Runtime.ExceptionServices; +using System.Runtime.Versioning; using System.Text; using System.Threading; using System.Threading.Tasks; -using System.Runtime.CompilerServices; -using System.Runtime.Versioning; -using System.Net.Http.QPack; -using System.Runtime.ExceptionServices; namespace System.Net.Http { diff --git a/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs b/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs index 163a9492ab41c..0c70813838b47 100644 --- a/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs +++ b/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs @@ -937,14 +937,12 @@ private async ValueTask GetHttp3ConnectionAsync(HttpRequestMess throw; } - //TODO: NegotiatedApplicationProtocol not yet implemented. -#if false if (quicConnection.NegotiatedApplicationProtocol != SslApplicationProtocol.Http3) { BlocklistAuthority(authority); - throw new HttpRequestException("QUIC connected but no HTTP/3 indicated via ALPN.", null, RequestRetryType.RetryOnSameOrNextProxy); + throw new HttpRequestException(HttpRequestError.ConnectionError, "QUIC connected but no HTTP/3 indicated via ALPN.", null, RequestRetryType.RetryOnConnectionFailure); } -#endif + // if the authority was sent as an option through alt-svc then include alt-used header http3Connection = new Http3Connection(this, authority, quicConnection, includeAltUsedHeader: _http3Authority == authority); _http3Connection = http3Connection; diff --git a/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPoolManager.cs b/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPoolManager.cs index a2a39db41aaaa..c0dcd40e64806 100644 --- a/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPoolManager.cs +++ b/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPoolManager.cs @@ -5,10 +5,10 @@ using System.Collections.Generic; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; +using System.Net.NetworkInformation; using System.Runtime.ExceptionServices; using System.Threading; using System.Threading.Tasks; -using System.Net.NetworkInformation; namespace System.Net.Http { diff --git a/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionSettings.cs b/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionSettings.cs index 52ffd655d4fa6..a76440e5fb163 100644 --- a/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionSettings.cs +++ b/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionSettings.cs @@ -2,14 +2,14 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Collections.Generic; -using System.Net.Security; +using System.Diagnostics; +using System.Diagnostics.Metrics; using System.IO; +using System.Net.Http.Metrics; +using System.Net.Security; using System.Runtime.Versioning; using System.Threading; using System.Threading.Tasks; -using System.Diagnostics; -using System.Diagnostics.Metrics; -using System.Net.Http.Metrics; namespace System.Net.Http { diff --git a/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpEnvironmentProxy.cs b/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpEnvironmentProxy.cs index 7f790d4b95745..226f0f449df50 100644 --- a/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpEnvironmentProxy.cs +++ b/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpEnvironmentProxy.cs @@ -2,9 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Net.Http; -using System.Net; using System.Collections.Generic; +using System.Net; +using System.Net.Http; namespace System.Net.Http { diff --git a/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/MacProxy.cs b/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/MacProxy.cs index e9729cc6f3653..05cef8a22315a 100644 --- a/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/MacProxy.cs +++ b/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/MacProxy.cs @@ -2,13 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Net.Http; -using System.Net; using System.Collections.Generic; +using System.Net; +using System.Net.Http; using Microsoft.Win32.SafeHandles; using static Interop.CoreFoundation; using static Interop.RunLoop; - using CFRunLoopRef = System.IntPtr; using CFRunLoopSourceRef = System.IntPtr; diff --git a/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/SocketsHttpHandler.cs b/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/SocketsHttpHandler.cs index b6c69a046e809..6227738dc3d30 100644 --- a/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/SocketsHttpHandler.cs +++ b/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/SocketsHttpHandler.cs @@ -2,16 +2,16 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Collections.Generic; +using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; +using System.Diagnostics.Metrics; using System.IO; +using System.Net.Http.Metrics; using System.Net.Security; using System.Runtime.Versioning; +using System.Text; using System.Threading; using System.Threading.Tasks; -using System.Diagnostics.CodeAnalysis; -using System.Text; -using System.Diagnostics; -using System.Diagnostics.Metrics; -using System.Net.Http.Metrics; namespace System.Net.Http { diff --git a/src/libraries/System.Net.HttpListener/src/System/Net/HttpListenerRequestUriBuilder.cs b/src/libraries/System.Net.HttpListener/src/System/Net/HttpListenerRequestUriBuilder.cs index bd0f464b0733f..3d625a0474389 100644 --- a/src/libraries/System.Net.HttpListener/src/System/Net/HttpListenerRequestUriBuilder.cs +++ b/src/libraries/System.Net.HttpListener/src/System/Net/HttpListenerRequestUriBuilder.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Diagnostics; -using System.Text; using System.Collections.Generic; +using System.Diagnostics; using System.Globalization; +using System.Text; namespace System.Net { diff --git a/src/libraries/System.Net.HttpListener/src/System/Net/Managed/ChunkStream.cs b/src/libraries/System.Net.HttpListener/src/System/Net/Managed/ChunkStream.cs index c71cfdc6a18c1..d942ce8cca293 100644 --- a/src/libraries/System.Net.HttpListener/src/System/Net/Managed/ChunkStream.cs +++ b/src/libraries/System.Net.HttpListener/src/System/Net/Managed/ChunkStream.cs @@ -32,8 +32,8 @@ // using System.Collections; -using System.Diagnostics; using System.Collections.Generic; +using System.Diagnostics; using System.Globalization; using System.IO; using System.Text; diff --git a/src/libraries/System.Net.HttpListener/src/System/Net/Managed/HttpResponseStream.Managed.cs b/src/libraries/System.Net.HttpListener/src/System/Net/Managed/HttpResponseStream.Managed.cs index ad68780d98e1e..7a7af00502187 100644 --- a/src/libraries/System.Net.HttpListener/src/System/Net/Managed/HttpResponseStream.Managed.cs +++ b/src/libraries/System.Net.HttpListener/src/System/Net/Managed/HttpResponseStream.Managed.cs @@ -31,9 +31,9 @@ using System.IO; using System.Net.Sockets; -using System.Text; using System.Runtime.ExceptionServices; using System.Runtime.InteropServices; +using System.Text; using System.Threading; using System.Threading.Tasks; diff --git a/src/libraries/System.Net.HttpListener/src/System/Net/ServiceNameStore.cs b/src/libraries/System.Net.HttpListener/src/System/Net/ServiceNameStore.cs index 2855afcfd6e50..deaf7e1851a59 100644 --- a/src/libraries/System.Net.HttpListener/src/System/Net/ServiceNameStore.cs +++ b/src/libraries/System.Net.HttpListener/src/System/Net/ServiceNameStore.cs @@ -3,9 +3,9 @@ using System; using System.Collections.Generic; -using System.Security.Authentication.ExtendedProtection; using System.Diagnostics; using System.Globalization; +using System.Security.Authentication.ExtendedProtection; namespace System.Net { diff --git a/src/libraries/System.Net.HttpListener/src/System/Net/Windows/CookieExtensions.cs b/src/libraries/System.Net.HttpListener/src/System/Net/Windows/CookieExtensions.cs index 20e1fad79890f..e5b3783c19e72 100644 --- a/src/libraries/System.Net.HttpListener/src/System/Net/Windows/CookieExtensions.cs +++ b/src/libraries/System.Net.HttpListener/src/System/Net/Windows/CookieExtensions.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Diagnostics; -using System.Reflection; using System.Diagnostics.CodeAnalysis; +using System.Reflection; namespace System.Net { diff --git a/src/libraries/System.Net.HttpListener/src/System/Net/Windows/HttpListener.Windows.cs b/src/libraries/System.Net.HttpListener/src/System/Net/Windows/HttpListener.Windows.cs index 5f9b939182b78..899fff5d788eb 100644 --- a/src/libraries/System.Net.HttpListener/src/System/Net/Windows/HttpListener.Windows.cs +++ b/src/libraries/System.Net.HttpListener/src/System/Net/Windows/HttpListener.Windows.cs @@ -1,7 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System; using System.Collections; using System.Collections.Generic; @@ -14,6 +13,7 @@ using System.Security.Principal; using System.Text; using System.Threading; +using Microsoft.Win32.SafeHandles; namespace System.Net { diff --git a/src/libraries/System.Net.HttpListener/src/System/Net/Windows/HttpRequestQueueV2Handle.cs b/src/libraries/System.Net.HttpListener/src/System/Net/Windows/HttpRequestQueueV2Handle.cs index 98fdf54908cc4..3f7b60a9ab11a 100644 --- a/src/libraries/System.Net.HttpListener/src/System/Net/Windows/HttpRequestQueueV2Handle.cs +++ b/src/libraries/System.Net.HttpListener/src/System/Net/Windows/HttpRequestQueueV2Handle.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Threading; +using Microsoft.Win32.SafeHandles; namespace System.Net { diff --git a/src/libraries/System.Net.HttpListener/src/System/Net/Windows/HttpResponseStream.Windows.cs b/src/libraries/System.Net.HttpListener/src/System/Net/Windows/HttpResponseStream.Windows.cs index d325f3eb24fad..226d115d68065 100644 --- a/src/libraries/System.Net.HttpListener/src/System/Net/Windows/HttpResponseStream.Windows.cs +++ b/src/libraries/System.Net.HttpListener/src/System/Net/Windows/HttpResponseStream.Windows.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Globalization; using System.IO; using System.Runtime.ExceptionServices; using System.Runtime.InteropServices; -using System.Globalization; using Microsoft.Win32.SafeHandles; namespace System.Net diff --git a/src/libraries/System.Net.HttpListener/src/System/Net/Windows/HttpServerSessionHandle.cs b/src/libraries/System.Net.HttpListener/src/System/Net/Windows/HttpServerSessionHandle.cs index 671eae6386b5d..eb97a7aeb31ac 100644 --- a/src/libraries/System.Net.HttpListener/src/System/Net/Windows/HttpServerSessionHandle.cs +++ b/src/libraries/System.Net.HttpListener/src/System/Net/Windows/HttpServerSessionHandle.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Threading; +using Microsoft.Win32.SafeHandles; namespace System.Net { diff --git a/src/libraries/System.Net.HttpListener/src/System/Net/Windows/WebSockets/WebSocketHttpListenerDuplexStream.cs b/src/libraries/System.Net.HttpListener/src/System/Net/Windows/WebSockets/WebSocketHttpListenerDuplexStream.cs index e16d8f33bc874..d694448435d1a 100644 --- a/src/libraries/System.Net.HttpListener/src/System/Net/Windows/WebSockets/WebSocketHttpListenerDuplexStream.cs +++ b/src/libraries/System.Net.HttpListener/src/System/Net/Windows/WebSockets/WebSocketHttpListenerDuplexStream.cs @@ -1,13 +1,13 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Runtime.InteropServices; using System.Threading; using System.Threading.Tasks; +using Microsoft.Win32.SafeHandles; #pragma warning disable CA1844 // Memory-based Read/WriteAsync diff --git a/src/libraries/System.Net.Mail/src/System/Net/Mail/DomainLiteralReader.cs b/src/libraries/System.Net.Mail/src/System/Net/Mail/DomainLiteralReader.cs index 884b5c123bfcf..66e17a9a1a2a5 100644 --- a/src/libraries/System.Net.Mail/src/System/Net/Mail/DomainLiteralReader.cs +++ b/src/libraries/System.Net.Mail/src/System/Net/Mail/DomainLiteralReader.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Text; using System.Diagnostics; using System.Net.Mime; +using System.Text; namespace System.Net.Mail { diff --git a/src/libraries/System.Net.Mail/src/System/Net/Mail/DotAtomReader.cs b/src/libraries/System.Net.Mail/src/System/Net/Mail/DotAtomReader.cs index b032299b85352..968104159e0e3 100644 --- a/src/libraries/System.Net.Mail/src/System/Net/Mail/DotAtomReader.cs +++ b/src/libraries/System.Net.Mail/src/System/Net/Mail/DotAtomReader.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Text; using System.Diagnostics; using System.Net.Mime; +using System.Text; namespace System.Net.Mail { diff --git a/src/libraries/System.Net.Mail/src/System/Net/Mail/QuotedPairReader.cs b/src/libraries/System.Net.Mail/src/System/Net/Mail/QuotedPairReader.cs index af55831d78d41..125228988c366 100644 --- a/src/libraries/System.Net.Mail/src/System/Net/Mail/QuotedPairReader.cs +++ b/src/libraries/System.Net.Mail/src/System/Net/Mail/QuotedPairReader.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Text; using System.Diagnostics; using System.Net.Mime; +using System.Text; namespace System.Net.Mail { diff --git a/src/libraries/System.Net.Mail/src/System/Net/Mail/QuotedStringFormatReader.cs b/src/libraries/System.Net.Mail/src/System/Net/Mail/QuotedStringFormatReader.cs index 495a3ad5abc2e..cfdd7b14c797c 100644 --- a/src/libraries/System.Net.Mail/src/System/Net/Mail/QuotedStringFormatReader.cs +++ b/src/libraries/System.Net.Mail/src/System/Net/Mail/QuotedStringFormatReader.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Text; using System.Diagnostics; using System.Net.Mime; +using System.Text; namespace System.Net.Mail { diff --git a/src/libraries/System.Net.Mail/src/System/Net/Mail/WhitespaceReader.cs b/src/libraries/System.Net.Mail/src/System/Net/Mail/WhitespaceReader.cs index b4f4382ccb8bd..8d647529bf428 100644 --- a/src/libraries/System.Net.Mail/src/System/Net/Mail/WhitespaceReader.cs +++ b/src/libraries/System.Net.Mail/src/System/Net/Mail/WhitespaceReader.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Text; using System.Diagnostics; using System.Net.Mime; +using System.Text; namespace System.Net.Mail { diff --git a/src/libraries/System.Net.Mail/src/System/Net/Mime/BaseWriter.cs b/src/libraries/System.Net.Mail/src/System/Net/Mime/BaseWriter.cs index d54af7a50bb55..3b59251a0cccb 100644 --- a/src/libraries/System.Net.Mail/src/System/Net/Mime/BaseWriter.cs +++ b/src/libraries/System.Net.Mail/src/System/Net/Mime/BaseWriter.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.IO; using System.Collections.Specialized; +using System.IO; using System.Net.Mail; using System.Runtime.ExceptionServices; diff --git a/src/libraries/System.Net.Mail/src/System/Net/Mime/MimeBasePart.cs b/src/libraries/System.Net.Mail/src/System/Net/Mime/MimeBasePart.cs index 305dacb05a066..332f9db055e27 100644 --- a/src/libraries/System.Net.Mail/src/System/Net/Mime/MimeBasePart.cs +++ b/src/libraries/System.Net.Mail/src/System/Net/Mime/MimeBasePart.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Collections.Specialized; -using System.Text; using System.Net.Mail; +using System.Text; namespace System.Net.Mime { diff --git a/src/libraries/System.Net.Mail/src/System/Net/Mime/MimeMultiPart.cs b/src/libraries/System.Net.Mail/src/System/Net/Mime/MimeMultiPart.cs index 543e4db6a0462..b9b2038c50778 100644 --- a/src/libraries/System.Net.Mail/src/System/Net/Mime/MimeMultiPart.cs +++ b/src/libraries/System.Net.Mail/src/System/Net/Mime/MimeMultiPart.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.IO; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Globalization; +using System.IO; using System.Runtime.ExceptionServices; using System.Threading; diff --git a/src/libraries/System.Net.Mail/src/System/Net/Mime/MimePart.cs b/src/libraries/System.Net.Mail/src/System/Net/Mime/MimePart.cs index 8f2bb67e74183..85d20815d71f0 100644 --- a/src/libraries/System.Net.Mail/src/System/Net/Mime/MimePart.cs +++ b/src/libraries/System.Net.Mail/src/System/Net/Mime/MimePart.cs @@ -2,12 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.IO; -using System.Text; using System.Collections; using System.Globalization; +using System.IO; using System.Net.Mail; using System.Runtime.ExceptionServices; +using System.Text; namespace System.Net.Mime { diff --git a/src/libraries/System.Net.Mail/src/System/Net/Mime/MimeWriter.cs b/src/libraries/System.Net.Mail/src/System/Net/Mime/MimeWriter.cs index 3ad72d01c8253..8d9482b8ee1aa 100644 --- a/src/libraries/System.Net.Mail/src/System/Net/Mime/MimeWriter.cs +++ b/src/libraries/System.Net.Mail/src/System/Net/Mime/MimeWriter.cs @@ -2,9 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; +using System.Collections.Specialized; using System.IO; using System.Text; -using System.Collections.Specialized; namespace System.Net.Mime { diff --git a/src/libraries/System.Net.Mail/src/System/Net/Mime/SmtpDateTime.cs b/src/libraries/System.Net.Mail/src/System/Net/Mime/SmtpDateTime.cs index 0416cc86a27a6..3549ce962ccf0 100644 --- a/src/libraries/System.Net.Mail/src/System/Net/Mime/SmtpDateTime.cs +++ b/src/libraries/System.Net.Mail/src/System/Net/Mime/SmtpDateTime.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Globalization; using System.Collections.Generic; using System.Diagnostics; +using System.Globalization; namespace System.Net.Mime { diff --git a/src/libraries/System.Net.Mail/src/System/Net/TrackingValidationObjectDictionary.cs b/src/libraries/System.Net.Mail/src/System/Net/TrackingValidationObjectDictionary.cs index 0c7c4d0985c1c..3237a05d4f678 100644 --- a/src/libraries/System.Net.Mail/src/System/Net/TrackingValidationObjectDictionary.cs +++ b/src/libraries/System.Net.Mail/src/System/Net/TrackingValidationObjectDictionary.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Collections.Specialized; using System.Collections.Generic; +using System.Collections.Specialized; using System.Diagnostics; namespace System.Net diff --git a/src/libraries/System.Net.NameResolution/src/System/Net/NameResolutionPal.Windows.cs b/src/libraries/System.Net.NameResolution/src/System/Net/NameResolutionPal.Windows.cs index d088a30d6f744..72fc7685dffe9 100644 --- a/src/libraries/System.Net.NameResolution/src/System/Net/NameResolutionPal.Windows.cs +++ b/src/libraries/System.Net.NameResolution/src/System/Net/NameResolutionPal.Windows.cs @@ -1,13 +1,13 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Diagnostics; +using System.Net.Sockets; using System.Runtime.CompilerServices; using System.Runtime.ExceptionServices; using System.Runtime.InteropServices; -using System.Net.Sockets; using System.Threading; using System.Threading.Tasks; -using System.Diagnostics; using Microsoft.Win32.SafeHandles; namespace System.Net diff --git a/src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/AndroidIPGlobalStatistics.cs b/src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/AndroidIPGlobalStatistics.cs index de57e068a1ddb..e9f9d73abe08b 100644 --- a/src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/AndroidIPGlobalStatistics.cs +++ b/src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/AndroidIPGlobalStatistics.cs @@ -3,9 +3,9 @@ using System.Diagnostics; using System.IO; +using System.Net.Sockets; using System.Runtime.InteropServices; using System.Runtime.Versioning; -using System.Net.Sockets; namespace System.Net.NetworkInformation { diff --git a/src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/NetworkAddressChange.OSX.cs b/src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/NetworkAddressChange.OSX.cs index aa456fdfd01b3..738e9fd63921f 100644 --- a/src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/NetworkAddressChange.OSX.cs +++ b/src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/NetworkAddressChange.OSX.cs @@ -2,14 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Collections.Generic; +using System.Diagnostics; using System.Runtime.InteropServices; using System.Runtime.Versioning; -using Microsoft.Win32.SafeHandles; -using System.Diagnostics; using System.Threading; - -using CFStringRef = System.IntPtr; +using Microsoft.Win32.SafeHandles; using CFRunLoopRef = System.IntPtr; +using CFStringRef = System.IntPtr; namespace System.Net.NetworkInformation { diff --git a/src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/NetworkAddressChange.Windows.cs b/src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/NetworkAddressChange.Windows.cs index 345aa6c509cd1..8499eac6b1660 100644 --- a/src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/NetworkAddressChange.Windows.cs +++ b/src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/NetworkAddressChange.Windows.cs @@ -1,12 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; - using System.Collections.Generic; using System.Net.Sockets; using System.Runtime.Versioning; using System.Threading; +using Microsoft.Win32.SafeHandles; namespace System.Net.NetworkInformation { diff --git a/src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/SystemIPv4InterfaceProperties.cs b/src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/SystemIPv4InterfaceProperties.cs index 08670e0cad4f6..d3a8318c18418 100644 --- a/src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/SystemIPv4InterfaceProperties.cs +++ b/src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/SystemIPv4InterfaceProperties.cs @@ -1,9 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; - using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; namespace System.Net.NetworkInformation { diff --git a/src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/SystemNetworkInterface.cs b/src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/SystemNetworkInterface.cs index 96256e552a0f1..7a9750970f9cb 100644 --- a/src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/SystemNetworkInterface.cs +++ b/src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/SystemNetworkInterface.cs @@ -1,11 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; - using System.Collections.Generic; using System.Net.Sockets; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; namespace System.Net.NetworkInformation { diff --git a/src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/TeredoHelper.cs b/src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/TeredoHelper.cs index d75c0a3a5b4a2..17649af8a3041 100644 --- a/src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/TeredoHelper.cs +++ b/src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/TeredoHelper.cs @@ -4,8 +4,8 @@ using System.Collections.Generic; using System.ComponentModel; using System.Diagnostics; -using System.Runtime.InteropServices; using System.Net.Sockets; +using System.Runtime.InteropServices; using System.Threading; namespace System.Net.NetworkInformation diff --git a/src/libraries/System.Net.Ping/src/System/Net/NetworkInformation/Ping.Windows.cs b/src/libraries/System.Net.Ping/src/System/Net/NetworkInformation/Ping.Windows.cs index b5ca9832bdb3e..0b04636ac4f71 100644 --- a/src/libraries/System.Net.Ping/src/System/Net/NetworkInformation/Ping.Windows.cs +++ b/src/libraries/System.Net.Ping/src/System/Net/NetworkInformation/Ping.Windows.cs @@ -1,14 +1,13 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; - using System.ComponentModel; using System.Diagnostics; using System.Net.Sockets; using System.Runtime.InteropServices; using System.Threading; using System.Threading.Tasks; +using Microsoft.Win32.SafeHandles; namespace System.Net.NetworkInformation { diff --git a/src/libraries/System.Net.Primitives/src/System/Net/EndPoint.cs b/src/libraries/System.Net.Primitives/src/System/Net/EndPoint.cs index 36a60632021b7..a07cc4902653e 100644 --- a/src/libraries/System.Net.Primitives/src/System/Net/EndPoint.cs +++ b/src/libraries/System.Net.Primitives/src/System/Net/EndPoint.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Runtime.InteropServices; using System.Net.Sockets; +using System.Runtime.InteropServices; namespace System.Net { diff --git a/src/libraries/System.Net.Quic/src/System/Net/Quic/QuicConnection.cs b/src/libraries/System.Net.Quic/src/System/Net/Quic/QuicConnection.cs index 20e0de1771faf..5f3d4f16deb4b 100644 --- a/src/libraries/System.Net.Quic/src/System/Net/Quic/QuicConnection.cs +++ b/src/libraries/System.Net.Quic/src/System/Net/Quic/QuicConnection.cs @@ -13,15 +13,14 @@ using System.Threading.Tasks; using Microsoft.Quic; using static Microsoft.Quic.MsQuic; - using CONNECTED_DATA = Microsoft.Quic.QUIC_CONNECTION_EVENT._Anonymous_e__Union._CONNECTED_e__Struct; -using SHUTDOWN_INITIATED_BY_TRANSPORT_DATA = Microsoft.Quic.QUIC_CONNECTION_EVENT._Anonymous_e__Union._SHUTDOWN_INITIATED_BY_TRANSPORT_e__Struct; -using SHUTDOWN_INITIATED_BY_PEER_DATA = Microsoft.Quic.QUIC_CONNECTION_EVENT._Anonymous_e__Union._SHUTDOWN_INITIATED_BY_PEER_e__Struct; -using SHUTDOWN_COMPLETE_DATA = Microsoft.Quic.QUIC_CONNECTION_EVENT._Anonymous_e__Union._SHUTDOWN_COMPLETE_e__Struct; using LOCAL_ADDRESS_CHANGED_DATA = Microsoft.Quic.QUIC_CONNECTION_EVENT._Anonymous_e__Union._LOCAL_ADDRESS_CHANGED_e__Struct; using PEER_ADDRESS_CHANGED_DATA = Microsoft.Quic.QUIC_CONNECTION_EVENT._Anonymous_e__Union._PEER_ADDRESS_CHANGED_e__Struct; -using PEER_STREAM_STARTED_DATA = Microsoft.Quic.QUIC_CONNECTION_EVENT._Anonymous_e__Union._PEER_STREAM_STARTED_e__Struct; using PEER_CERTIFICATE_RECEIVED_DATA = Microsoft.Quic.QUIC_CONNECTION_EVENT._Anonymous_e__Union._PEER_CERTIFICATE_RECEIVED_e__Struct; +using PEER_STREAM_STARTED_DATA = Microsoft.Quic.QUIC_CONNECTION_EVENT._Anonymous_e__Union._PEER_STREAM_STARTED_e__Struct; +using SHUTDOWN_COMPLETE_DATA = Microsoft.Quic.QUIC_CONNECTION_EVENT._Anonymous_e__Union._SHUTDOWN_COMPLETE_e__Struct; +using SHUTDOWN_INITIATED_BY_PEER_DATA = Microsoft.Quic.QUIC_CONNECTION_EVENT._Anonymous_e__Union._SHUTDOWN_INITIATED_BY_PEER_e__Struct; +using SHUTDOWN_INITIATED_BY_TRANSPORT_DATA = Microsoft.Quic.QUIC_CONNECTION_EVENT._Anonymous_e__Union._SHUTDOWN_INITIATED_BY_TRANSPORT_e__Struct; namespace System.Net.Quic; diff --git a/src/libraries/System.Net.Quic/src/System/Net/Quic/QuicStream.cs b/src/libraries/System.Net.Quic/src/System/Net/Quic/QuicStream.cs index b6a766a0ef30e..6dcd92395b50c 100644 --- a/src/libraries/System.Net.Quic/src/System/Net/Quic/QuicStream.cs +++ b/src/libraries/System.Net.Quic/src/System/Net/Quic/QuicStream.cs @@ -10,14 +10,13 @@ using Microsoft.Quic; using static System.Net.Quic.MsQuicHelpers; using static Microsoft.Quic.MsQuic; - -using START_COMPLETE_DATA = Microsoft.Quic.QUIC_STREAM_EVENT._Anonymous_e__Union._START_COMPLETE_e__Struct; +using PEER_RECEIVE_ABORTED_DATA = Microsoft.Quic.QUIC_STREAM_EVENT._Anonymous_e__Union._PEER_RECEIVE_ABORTED_e__Struct; +using PEER_SEND_ABORTED_DATA = Microsoft.Quic.QUIC_STREAM_EVENT._Anonymous_e__Union._PEER_SEND_ABORTED_e__Struct; using RECEIVE_DATA = Microsoft.Quic.QUIC_STREAM_EVENT._Anonymous_e__Union._RECEIVE_e__Struct; using SEND_COMPLETE_DATA = Microsoft.Quic.QUIC_STREAM_EVENT._Anonymous_e__Union._SEND_COMPLETE_e__Struct; -using PEER_SEND_ABORTED_DATA = Microsoft.Quic.QUIC_STREAM_EVENT._Anonymous_e__Union._PEER_SEND_ABORTED_e__Struct; -using PEER_RECEIVE_ABORTED_DATA = Microsoft.Quic.QUIC_STREAM_EVENT._Anonymous_e__Union._PEER_RECEIVE_ABORTED_e__Struct; using SEND_SHUTDOWN_COMPLETE_DATA = Microsoft.Quic.QUIC_STREAM_EVENT._Anonymous_e__Union._SEND_SHUTDOWN_COMPLETE_e__Struct; using SHUTDOWN_COMPLETE_DATA = Microsoft.Quic.QUIC_STREAM_EVENT._Anonymous_e__Union._SHUTDOWN_COMPLETE_e__Struct; +using START_COMPLETE_DATA = Microsoft.Quic.QUIC_STREAM_EVENT._Anonymous_e__Union._START_COMPLETE_e__Struct; namespace System.Net.Quic; diff --git a/src/libraries/System.Net.Requests/src/System/Net/FileWebRequest.cs b/src/libraries/System.Net.Requests/src/System/Net/FileWebRequest.cs index e643354699d35..85d9097da906b 100644 --- a/src/libraries/System.Net.Requests/src/System/Net/FileWebRequest.cs +++ b/src/libraries/System.Net.Requests/src/System/Net/FileWebRequest.cs @@ -3,8 +3,8 @@ using System.ComponentModel; using System.IO; -using System.Threading; using System.Runtime.Serialization; +using System.Threading; using System.Threading.Tasks; namespace System.Net diff --git a/src/libraries/System.Net.Requests/src/System/Net/FileWebResponse.cs b/src/libraries/System.Net.Requests/src/System/Net/FileWebResponse.cs index c1c26f1705995..1c3f0abd3bb64 100644 --- a/src/libraries/System.Net.Requests/src/System/Net/FileWebResponse.cs +++ b/src/libraries/System.Net.Requests/src/System/Net/FileWebResponse.cs @@ -2,9 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.ComponentModel; +using System.Globalization; using System.IO; using System.Runtime.Serialization; -using System.Globalization; namespace System.Net { diff --git a/src/libraries/System.Net.Requests/src/System/Net/FtpWebRequest.cs b/src/libraries/System.Net.Requests/src/System/Net/FtpWebRequest.cs index 5a6009240fd92..a7b005f87c685 100644 --- a/src/libraries/System.Net.Requests/src/System/Net/FtpWebRequest.cs +++ b/src/libraries/System.Net.Requests/src/System/Net/FtpWebRequest.cs @@ -2,15 +2,15 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.IO; using System.Net.Cache; using System.Net.Sockets; -using System.Security; using System.Runtime.ExceptionServices; +using System.Security; using System.Security.Authentication; using System.Security.Cryptography.X509Certificates; using System.Threading; -using System.Diagnostics.CodeAnalysis; namespace System.Net { diff --git a/src/libraries/System.Net.Security/src/System/Net/CertificateValidationPal.Unix.cs b/src/libraries/System.Net.Security/src/System/Net/CertificateValidationPal.Unix.cs index 700901e13e8dd..5a2daad3d2019 100644 --- a/src/libraries/System.Net.Security/src/System/Net/CertificateValidationPal.Unix.cs +++ b/src/libraries/System.Net.Security/src/System/Net/CertificateValidationPal.Unix.cs @@ -2,9 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Diagnostics; -using Microsoft.Win32.SafeHandles; using System.Net.Security; using System.Security.Cryptography.X509Certificates; +using Microsoft.Win32.SafeHandles; namespace System.Net { diff --git a/src/libraries/System.Net.Security/src/System/Net/CertificateValidationPal.Windows.cs b/src/libraries/System.Net.Security/src/System/Net/CertificateValidationPal.Windows.cs index f0e58802dbda5..0c053abe24312 100644 --- a/src/libraries/System.Net.Security/src/System/Net/CertificateValidationPal.Windows.cs +++ b/src/libraries/System.Net.Security/src/System/Net/CertificateValidationPal.Windows.cs @@ -1,13 +1,13 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Diagnostics; using System.Net.Security; using System.Runtime.InteropServices; using System.Security.Cryptography; using System.Security.Cryptography.X509Certificates; using System.Security.Principal; +using Microsoft.Win32.SafeHandles; using static Interop.SspiCli; namespace System.Net diff --git a/src/libraries/System.Net.Security/src/System/Net/CertificateValidationPal.cs b/src/libraries/System.Net.Security/src/System/Net/CertificateValidationPal.cs index 5301525b8dadb..a8ca3426d041b 100644 --- a/src/libraries/System.Net.Security/src/System/Net/CertificateValidationPal.cs +++ b/src/libraries/System.Net.Security/src/System/Net/CertificateValidationPal.cs @@ -3,10 +3,10 @@ using System.Diagnostics; using System.Net.Security; +using System.Runtime.InteropServices; using System.Security; using System.Security.Cryptography; using System.Security.Cryptography.X509Certificates; -using System.Runtime.InteropServices; namespace System.Net { diff --git a/src/libraries/System.Net.Security/src/System/Net/NegotiateAuthenticationPal.ManagedSpnego.cs b/src/libraries/System.Net.Security/src/System/Net/NegotiateAuthenticationPal.ManagedSpnego.cs index 4b94b32b02a23..1ddb004769037 100644 --- a/src/libraries/System.Net.Security/src/System/Net/NegotiateAuthenticationPal.ManagedSpnego.cs +++ b/src/libraries/System.Net.Security/src/System/Net/NegotiateAuthenticationPal.ManagedSpnego.cs @@ -4,8 +4,8 @@ using System; using System.Buffers; using System.Buffers.Binary; -using System.ComponentModel; using System.Collections.Generic; +using System.ComponentModel; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Formats.Asn1; diff --git a/src/libraries/System.Net.Security/src/System/Net/NegotiateAuthenticationPal.Unix.cs b/src/libraries/System.Net.Security/src/System/Net/NegotiateAuthenticationPal.Unix.cs index 610a6939e8123..f200e11ca4c43 100644 --- a/src/libraries/System.Net.Security/src/System/Net/NegotiateAuthenticationPal.Unix.cs +++ b/src/libraries/System.Net.Security/src/System/Net/NegotiateAuthenticationPal.Unix.cs @@ -7,12 +7,12 @@ using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Globalization; +using System.Net.Security; using System.Runtime.InteropServices; using System.Security; -using System.Security.Principal; using System.Security.Authentication.ExtendedProtection; +using System.Security.Principal; using System.Text; -using System.Net.Security; using Microsoft.Win32.SafeHandles; namespace System.Net diff --git a/src/libraries/System.Net.Security/src/System/Net/NegotiateAuthenticationPal.Unsupported.cs b/src/libraries/System.Net.Security/src/System/Net/NegotiateAuthenticationPal.Unsupported.cs index 85f3f01d55da8..1cdeef37fad54 100644 --- a/src/libraries/System.Net.Security/src/System/Net/NegotiateAuthenticationPal.Unsupported.cs +++ b/src/libraries/System.Net.Security/src/System/Net/NegotiateAuthenticationPal.Unsupported.cs @@ -4,8 +4,8 @@ using System; using System.Buffers; using System.Diagnostics; -using System.Security.Principal; using System.Net.Security; +using System.Security.Principal; namespace System.Net { diff --git a/src/libraries/System.Net.Security/src/System/Net/NegotiateAuthenticationPal.Windows.cs b/src/libraries/System.Net.Security/src/System/Net/NegotiateAuthenticationPal.Windows.cs index 07e8dea22baa9..334edfbb76e09 100644 --- a/src/libraries/System.Net.Security/src/System/Net/NegotiateAuthenticationPal.Windows.cs +++ b/src/libraries/System.Net.Security/src/System/Net/NegotiateAuthenticationPal.Windows.cs @@ -7,11 +7,11 @@ using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Globalization; +using System.Net.Security; using System.Runtime.InteropServices; using System.Security; -using System.Security.Principal; using System.Security.Authentication.ExtendedProtection; -using System.Net.Security; +using System.Security.Principal; namespace System.Net { diff --git a/src/libraries/System.Net.Security/src/System/Net/NegotiateAuthenticationPal.cs b/src/libraries/System.Net.Security/src/System/Net/NegotiateAuthenticationPal.cs index 78eed0d81f84c..4f6e44ee3e375 100644 --- a/src/libraries/System.Net.Security/src/System/Net/NegotiateAuthenticationPal.cs +++ b/src/libraries/System.Net.Security/src/System/Net/NegotiateAuthenticationPal.cs @@ -3,8 +3,8 @@ using System; using System.Buffers; -using System.Security.Principal; using System.Net.Security; +using System.Security.Principal; namespace System.Net { diff --git a/src/libraries/System.Net.Security/src/System/Net/Security/CipherSuitesPolicyPal.Linux.cs b/src/libraries/System.Net.Security/src/System/Net/Security/CipherSuitesPolicyPal.Linux.cs index 6a879f8d4db6e..72b56306a27e0 100644 --- a/src/libraries/System.Net.Security/src/System/Net/Security/CipherSuitesPolicyPal.Linux.cs +++ b/src/libraries/System.Net.Security/src/System/Net/Security/CipherSuitesPolicyPal.Linux.cs @@ -1,14 +1,14 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Security.Authentication; using System.Text; -using Ssl = Interop.Ssl; +using Microsoft.Win32.SafeHandles; using OpenSsl = Interop.OpenSsl; +using Ssl = Interop.Ssl; namespace System.Net.Security { diff --git a/src/libraries/System.Net.Security/src/System/Net/Security/NegotiateAuthentication.cs b/src/libraries/System.Net.Security/src/System/Net/Security/NegotiateAuthentication.cs index 6b990651e8939..0aca973f71a5d 100644 --- a/src/libraries/System.Net.Security/src/System/Net/Security/NegotiateAuthentication.cs +++ b/src/libraries/System.Net.Security/src/System/Net/Security/NegotiateAuthentication.cs @@ -5,8 +5,8 @@ using System.ComponentModel; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; -using System.Security.Principal; using System.Security.Authentication.ExtendedProtection; +using System.Security.Principal; namespace System.Net.Security { diff --git a/src/libraries/System.Net.Security/src/System/Net/Security/NetSecurityTelemetry.cs b/src/libraries/System.Net.Security/src/System/Net/Security/NetSecurityTelemetry.cs index a1d79aee0e259..a2d4e411e75af 100644 --- a/src/libraries/System.Net.Security/src/System/Net/Security/NetSecurityTelemetry.cs +++ b/src/libraries/System.Net.Security/src/System/Net/Security/NetSecurityTelemetry.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Diagnostics; -using System.Diagnostics.Tracing; using System.Diagnostics.CodeAnalysis; +using System.Diagnostics.Tracing; using System.Security.Authentication; using System.Threading; diff --git a/src/libraries/System.Net.Security/src/System/Net/Security/SslConnectionInfo.Linux.cs b/src/libraries/System.Net.Security/src/System/Net/Security/SslConnectionInfo.Linux.cs index 40d88dd90f571..a22a85292ab5d 100644 --- a/src/libraries/System.Net.Security/src/System/Net/Security/SslConnectionInfo.Linux.cs +++ b/src/libraries/System.Net.Security/src/System/Net/Security/SslConnectionInfo.Linux.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Security.Authentication; +using Microsoft.Win32.SafeHandles; namespace System.Net.Security { diff --git a/src/libraries/System.Net.Security/src/System/Net/Security/SslStream.Android.cs b/src/libraries/System.Net.Security/src/System/Net/Security/SslStream.Android.cs index 172e5854bf872..317375cec0b1d 100644 --- a/src/libraries/System.Net.Security/src/System/Net/Security/SslStream.Android.cs +++ b/src/libraries/System.Net.Security/src/System/Net/Security/SslStream.Android.cs @@ -4,9 +4,9 @@ using System; using System.Diagnostics; using System.Net.Security; -using System.Threading; using System.Runtime.InteropServices; using System.Security.Cryptography.X509Certificates; +using System.Threading; namespace System.Net.Security { diff --git a/src/libraries/System.Net.Security/src/System/Net/Security/SslStreamCertificateContext.Linux.cs b/src/libraries/System.Net.Security/src/System/Net/Security/SslStreamCertificateContext.Linux.cs index cc80cc6e27bad..bf8ee151cb75c 100644 --- a/src/libraries/System.Net.Security/src/System/Net/Security/SslStreamCertificateContext.Linux.cs +++ b/src/libraries/System.Net.Security/src/System/Net/Security/SslStreamCertificateContext.Linux.cs @@ -1,7 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Buffers; using System.Collections.Concurrent; using System.Collections.Generic; @@ -12,6 +11,7 @@ using System.Security.Cryptography.X509Certificates; using System.Text; using System.Threading.Tasks; +using Microsoft.Win32.SafeHandles; namespace System.Net.Security { diff --git a/src/libraries/System.Net.Security/src/System/Net/Security/TlsFrameHelper.cs b/src/libraries/System.Net.Security/src/System/Net/Security/TlsFrameHelper.cs index 09953bf56f961..47acff8ecc6a6 100644 --- a/src/libraries/System.Net.Security/src/System/Net/Security/TlsFrameHelper.cs +++ b/src/libraries/System.Net.Security/src/System/Net/Security/TlsFrameHelper.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Diagnostics; using System.Buffers.Binary; +using System.Diagnostics; using System.Globalization; using System.Security.Authentication; using System.Text; diff --git a/src/libraries/System.Net.Security/src/System/Net/StreamFramer.cs b/src/libraries/System.Net.Security/src/System/Net/StreamFramer.cs index 6689c01fe8193..50d41627e0dd4 100644 --- a/src/libraries/System.Net.Security/src/System/Net/StreamFramer.cs +++ b/src/libraries/System.Net.Security/src/System/Net/StreamFramer.cs @@ -1,11 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.IO; using System.Globalization; +using System.IO; using System.Net.Security; -using System.Threading.Tasks; using System.Threading; +using System.Threading.Tasks; namespace System.Net { diff --git a/src/libraries/System.Net.Sockets/src/System/Net/Sockets/SafeSocketHandle.Unix.cs b/src/libraries/System.Net.Sockets/src/System/Net/Sockets/SafeSocketHandle.Unix.cs index 0cad7394da157..62417e62599ba 100644 --- a/src/libraries/System.Net.Sockets/src/System/Net/Sockets/SafeSocketHandle.Unix.cs +++ b/src/libraries/System.Net.Sockets/src/System/Net/Sockets/SafeSocketHandle.Unix.cs @@ -2,11 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Runtime.InteropServices; +using System.Diagnostics; using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; using System.Threading; using Microsoft.Win32.SafeHandles; -using System.Diagnostics; namespace System.Net.Sockets { diff --git a/src/libraries/System.Net.Sockets/src/System/Net/Sockets/SafeSocketHandle.cs b/src/libraries/System.Net.Sockets/src/System/Net/Sockets/SafeSocketHandle.cs index c8b2cfdccb687..f427aa88cc1f4 100644 --- a/src/libraries/System.Net.Sockets/src/System/Net/Sockets/SafeSocketHandle.cs +++ b/src/libraries/System.Net.Sockets/src/System/Net/Sockets/SafeSocketHandle.cs @@ -1,10 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; - using System.Diagnostics; using System.Threading; +using Microsoft.Win32.SafeHandles; namespace System.Net.Sockets { diff --git a/src/libraries/System.Net.Sockets/src/System/Net/Sockets/Socket.Unix.cs b/src/libraries/System.Net.Sockets/src/System/Net/Sockets/Socket.Unix.cs index 70b89071349be..73ff6521aa31f 100644 --- a/src/libraries/System.Net.Sockets/src/System/Net/Sockets/Socket.Unix.cs +++ b/src/libraries/System.Net.Sockets/src/System/Net/Sockets/Socket.Unix.cs @@ -1,14 +1,14 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Collections; using System.Diagnostics; using System.IO; -using System.Threading.Tasks; -using System.Runtime.Versioning; -using Microsoft.Win32.SafeHandles; using System.Reflection; -using System.Collections; +using System.Runtime.Versioning; using System.Threading; +using System.Threading.Tasks; +using Microsoft.Win32.SafeHandles; namespace System.Net.Sockets { diff --git a/src/libraries/System.Net.Sockets/src/System/Net/Sockets/Socket.Windows.cs b/src/libraries/System.Net.Sockets/src/System/Net/Sockets/Socket.Windows.cs index c7fd8394807fe..142e2a7c258f3 100644 --- a/src/libraries/System.Net.Sockets/src/System/Net/Sockets/Socket.Windows.cs +++ b/src/libraries/System.Net.Sockets/src/System/Net/Sockets/Socket.Windows.cs @@ -1,14 +1,14 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Collections; using System.Diagnostics; using System.IO; using System.Runtime.CompilerServices; +using System.Runtime.Versioning; using System.Threading; using System.Threading.Tasks; -using System.Runtime.Versioning; +using Microsoft.Win32.SafeHandles; namespace System.Net.Sockets { diff --git a/src/libraries/System.Net.Sockets/src/System/Net/Sockets/SocketAsyncContext.Unix.cs b/src/libraries/System.Net.Sockets/src/System/Net/Sockets/SocketAsyncContext.Unix.cs index 48063c26d0604..58a806d6d68ea 100644 --- a/src/libraries/System.Net.Sockets/src/System/Net/Sockets/SocketAsyncContext.Unix.cs +++ b/src/libraries/System.Net.Sockets/src/System/Net/Sockets/SocketAsyncContext.Unix.cs @@ -1,13 +1,13 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Collections.Generic; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Threading; +using Microsoft.Win32.SafeHandles; namespace System.Net.Sockets { diff --git a/src/libraries/System.Net.Sockets/src/System/Net/Sockets/SocketTaskExtensions.cs b/src/libraries/System.Net.Sockets/src/System/Net/Sockets/SocketTaskExtensions.cs index 38a88fd188a02..777d39bcf944a 100644 --- a/src/libraries/System.Net.Sockets/src/System/Net/Sockets/SocketTaskExtensions.cs +++ b/src/libraries/System.Net.Sockets/src/System/Net/Sockets/SocketTaskExtensions.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.ComponentModel; using System.Collections.Generic; +using System.ComponentModel; using System.Threading; using System.Threading.Tasks; diff --git a/src/libraries/System.Net.Sockets/src/System/Net/Sockets/TCPListener.cs b/src/libraries/System.Net.Sockets/src/System/Net/Sockets/TCPListener.cs index 39b931cc63472..06f80e97a52f5 100644 --- a/src/libraries/System.Net.Sockets/src/System/Net/Sockets/TCPListener.cs +++ b/src/libraries/System.Net.Sockets/src/System/Net/Sockets/TCPListener.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Diagnostics; +using System.Runtime.Versioning; using System.Threading; using System.Threading.Tasks; -using System.Runtime.Versioning; -using System.Diagnostics; namespace System.Net.Sockets { diff --git a/src/libraries/System.Net.Sockets/src/System/Net/Sockets/UDPClient.cs b/src/libraries/System.Net.Sockets/src/System/Net/Sockets/UDPClient.cs index 4229d9a0171f3..7646d0ae458d3 100644 --- a/src/libraries/System.Net.Sockets/src/System/Net/Sockets/UDPClient.cs +++ b/src/libraries/System.Net.Sockets/src/System/Net/Sockets/UDPClient.cs @@ -2,9 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Diagnostics.CodeAnalysis; -using System.Threading.Tasks; using System.Runtime.Versioning; using System.Threading; +using System.Threading.Tasks; namespace System.Net.Sockets { diff --git a/src/libraries/System.Net.Sockets/src/System/Net/Sockets/UnixDomainSocketEndPoint.cs b/src/libraries/System.Net.Sockets/src/System/Net/Sockets/UnixDomainSocketEndPoint.cs index fab23b52982e1..4c69b1b8a6e1c 100644 --- a/src/libraries/System.Net.Sockets/src/System/Net/Sockets/UnixDomainSocketEndPoint.cs +++ b/src/libraries/System.Net.Sockets/src/System/Net/Sockets/UnixDomainSocketEndPoint.cs @@ -3,8 +3,8 @@ using System.Diagnostics; using System.Diagnostics.CodeAnalysis; -using System.Text; using System.IO; +using System.Text; namespace System.Net.Sockets { diff --git a/src/libraries/System.Net.WebHeaderCollection/src/System/Net/WebHeaderCollection.cs b/src/libraries/System.Net.WebHeaderCollection/src/System/Net/WebHeaderCollection.cs index 0c8a61f0134ab..a2a92decd12c3 100644 --- a/src/libraries/System.Net.WebHeaderCollection/src/System/Net/WebHeaderCollection.cs +++ b/src/libraries/System.Net.WebHeaderCollection/src/System/Net/WebHeaderCollection.cs @@ -6,10 +6,10 @@ using System.Collections.Specialized; using System.ComponentModel; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Runtime.Serialization; using System.Text; -using System.Diagnostics.CodeAnalysis; namespace System.Net { diff --git a/src/libraries/System.Net.WebSockets.Client/src/System/Net/WebSockets/BrowserWebSockets/BrowserInterop.cs b/src/libraries/System.Net.WebSockets.Client/src/System/Net/WebSockets/BrowserWebSockets/BrowserInterop.cs index 5ea45c2a7a222..a03a0d6941190 100644 --- a/src/libraries/System.Net.WebSockets.Client/src/System/Net/WebSockets/BrowserWebSockets/BrowserInterop.cs +++ b/src/libraries/System.Net.WebSockets.Client/src/System/Net/WebSockets/BrowserWebSockets/BrowserInterop.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Threading.Tasks; -using System.Runtime.InteropServices.JavaScript; using System.Buffers; +using System.Runtime.InteropServices.JavaScript; +using System.Threading.Tasks; namespace System.Net.WebSockets { diff --git a/src/libraries/System.Net.WebSockets.Client/src/System/Net/WebSockets/BrowserWebSockets/BrowserWebSocket.cs b/src/libraries/System.Net.WebSockets.Client/src/System/Net/WebSockets/BrowserWebSockets/BrowserWebSocket.cs index ed139d83fd74f..5abe81f919acf 100644 --- a/src/libraries/System.Net.WebSockets.Client/src/System/Net/WebSockets/BrowserWebSockets/BrowserWebSocket.cs +++ b/src/libraries/System.Net.WebSockets.Client/src/System/Net/WebSockets/BrowserWebSockets/BrowserWebSocket.cs @@ -1,11 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Buffers; using System.Collections.Generic; +using System.Runtime.InteropServices.JavaScript; using System.Threading; using System.Threading.Tasks; -using System.Runtime.InteropServices.JavaScript; -using System.Buffers; namespace System.Net.WebSockets { diff --git a/src/libraries/System.ObjectModel/src/System/Collections/ObjectModel/ReadOnlyObservableCollection.cs b/src/libraries/System.ObjectModel/src/System/Collections/ObjectModel/ReadOnlyObservableCollection.cs index e53c0cc0db978..9a64be94f3d62 100644 --- a/src/libraries/System.ObjectModel/src/System/Collections/ObjectModel/ReadOnlyObservableCollection.cs +++ b/src/libraries/System.ObjectModel/src/System/Collections/ObjectModel/ReadOnlyObservableCollection.cs @@ -3,8 +3,8 @@ using System.Collections.Generic; using System.Collections.Specialized; -using System.Diagnostics; using System.ComponentModel; +using System.Diagnostics; using System.Runtime.CompilerServices; namespace System.Collections.ObjectModel diff --git a/src/libraries/System.Private.CoreLib/src/Internal/AssemblyAttributes.cs b/src/libraries/System.Private.CoreLib/src/Internal/AssemblyAttributes.cs index 280925881c40d..3a78b23ef2987 100644 --- a/src/libraries/System.Private.CoreLib/src/Internal/AssemblyAttributes.cs +++ b/src/libraries/System.Private.CoreLib/src/Internal/AssemblyAttributes.cs @@ -3,8 +3,8 @@ using System; using System.Reflection; -using System.Runtime.InteropServices; using System.Resources; +using System.Runtime.InteropServices; [assembly: CLSCompliant(true)] [assembly: ComVisible(false)] diff --git a/src/libraries/System.Private.CoreLib/src/Microsoft/Win32/SafeHandles/SafeFileHandle.Windows.cs b/src/libraries/System.Private.CoreLib/src/Microsoft/Win32/SafeHandles/SafeFileHandle.Windows.cs index 35db20c5388dd..91b863e22f7a5 100644 --- a/src/libraries/System.Private.CoreLib/src/Microsoft/Win32/SafeHandles/SafeFileHandle.Windows.cs +++ b/src/libraries/System.Private.CoreLib/src/Microsoft/Win32/SafeHandles/SafeFileHandle.Windows.cs @@ -2,11 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; +using System.Buffers; using System.Diagnostics; using System.IO; using System.Runtime.InteropServices; using System.Threading; -using System.Buffers; namespace Microsoft.Win32.SafeHandles { diff --git a/src/libraries/System.Private.CoreLib/src/Microsoft/Win32/SafeHandles/SafeRegistryHandle.cs b/src/libraries/System.Private.CoreLib/src/Microsoft/Win32/SafeHandles/SafeRegistryHandle.cs index 73419ae1e51b7..265c8bcaec760 100644 --- a/src/libraries/System.Private.CoreLib/src/Microsoft/Win32/SafeHandles/SafeRegistryHandle.cs +++ b/src/libraries/System.Private.CoreLib/src/Microsoft/Win32/SafeHandles/SafeRegistryHandle.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System; +using Microsoft.Win32.SafeHandles; #if REGISTRY_ASSEMBLY namespace Microsoft.Win32.SafeHandles diff --git a/src/libraries/System.Private.CoreLib/src/System/Activator.RuntimeType.cs b/src/libraries/System.Private.CoreLib/src/System/Activator.RuntimeType.cs index 87c163a176e8e..d31c2d231f661 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Activator.RuntimeType.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Activator.RuntimeType.cs @@ -2,13 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Diagnostics.CodeAnalysis; -using System.Reflection; using System.Globalization; +using System.Reflection; +using System.Runtime.CompilerServices; using System.Runtime.Loader; using System.Runtime.Remoting; -using System.Threading; -using System.Runtime.CompilerServices; using System.Security; +using System.Threading; namespace System { diff --git a/src/libraries/System.Private.CoreLib/src/System/ArgumentOutOfRangeException.cs b/src/libraries/System.Private.CoreLib/src/System/ArgumentOutOfRangeException.cs index 97cf6349b26b8..b64df585efbfb 100644 --- a/src/libraries/System.Private.CoreLib/src/System/ArgumentOutOfRangeException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/ArgumentOutOfRangeException.cs @@ -1,12 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Collections.Generic; using System.ComponentModel; -using System.Runtime.Serialization; -using System.Runtime.CompilerServices; using System.Diagnostics.CodeAnalysis; using System.Numerics; -using System.Collections.Generic; +using System.Runtime.CompilerServices; +using System.Runtime.Serialization; namespace System { diff --git a/src/libraries/System.Private.CoreLib/src/System/Array.Enumerators.cs b/src/libraries/System.Private.CoreLib/src/System/Array.Enumerators.cs index 60aa83909d4b6..8c2204b7d61e3 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Array.Enumerators.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Array.Enumerators.cs @@ -4,8 +4,8 @@ using System; using System.Collections; using System.Collections.Generic; -using System.Runtime.CompilerServices; using System.Diagnostics; +using System.Runtime.CompilerServices; namespace System { diff --git a/src/libraries/System.Private.CoreLib/src/System/Array.cs b/src/libraries/System.Private.CoreLib/src/System/Array.cs index cfa16efccd263..44e3e6ee35e7a 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Array.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Array.cs @@ -74,10 +74,8 @@ ref MemoryMarshal.GetArrayDataReference(larray), [RequiresDynamicCode("The code for an array of the specified type might not be available.")] public static unsafe Array CreateInstance(Type elementType, int length) { - if (elementType is null) - ThrowHelper.ThrowArgumentNullException(ExceptionArgument.elementType); - if (length < 0) - ThrowHelper.ThrowLengthArgumentOutOfRange_ArgumentOutOfRange_NeedNonNegNum(); + ArgumentNullException.ThrowIfNull(elementType); + ArgumentOutOfRangeException.ThrowIfNegative(length); RuntimeType? t = elementType.UnderlyingSystemType as RuntimeType; if (t == null) @@ -90,12 +88,9 @@ public static unsafe Array CreateInstance(Type elementType, int length) Justification = "MDArrays of Rank != 1 can be created because they don't implement generic interfaces.")] public static unsafe Array CreateInstance(Type elementType, int length1, int length2) { - if (elementType is null) - ThrowHelper.ThrowArgumentNullException(ExceptionArgument.elementType); - if (length1 < 0) - ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.length1, ExceptionResource.ArgumentOutOfRange_NeedNonNegNum); - if (length2 < 0) - ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.length2, ExceptionResource.ArgumentOutOfRange_NeedNonNegNum); + ArgumentNullException.ThrowIfNull(elementType); + ArgumentOutOfRangeException.ThrowIfNegative(length1); + ArgumentOutOfRangeException.ThrowIfNegative(length2); RuntimeType? t = elementType.UnderlyingSystemType as RuntimeType; if (t == null) @@ -109,30 +104,25 @@ public static unsafe Array CreateInstance(Type elementType, int length1, int len Justification = "MDArrays of Rank != 1 can be created because they don't implement generic interfaces.")] public static unsafe Array CreateInstance(Type elementType, int length1, int length2, int length3) { - if (elementType is null) - ThrowHelper.ThrowArgumentNullException(ExceptionArgument.elementType); - if (length1 < 0) - ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.length1, ExceptionResource.ArgumentOutOfRange_NeedNonNegNum); - if (length2 < 0) - ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.length2, ExceptionResource.ArgumentOutOfRange_NeedNonNegNum); - if (length3 < 0) - ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.length3, ExceptionResource.ArgumentOutOfRange_NeedNonNegNum); + ArgumentNullException.ThrowIfNull(elementType); + ArgumentOutOfRangeException.ThrowIfNegative(length1); + ArgumentOutOfRangeException.ThrowIfNegative(length2); + ArgumentOutOfRangeException.ThrowIfNegative(length3); RuntimeType? t = elementType.UnderlyingSystemType as RuntimeType; if (t == null) ThrowHelper.ThrowArgumentException(ExceptionResource.Arg_MustBeType, ExceptionArgument.elementType); - int* pLengths = stackalloc int[3] { length1, length2, length3 }; + int* pLengths = stackalloc int[] { length1, length2, length3 }; return InternalCreate(t, 3, pLengths, null); } [RequiresDynamicCode("The code for an array of the specified type might not be available.")] public static unsafe Array CreateInstance(Type elementType, params int[] lengths) { - if (elementType is null) - ThrowHelper.ThrowArgumentNullException(ExceptionArgument.elementType); - if (lengths == null) - ThrowHelper.ThrowArgumentNullException(ExceptionArgument.lengths); + ArgumentNullException.ThrowIfNull(elementType); + ArgumentNullException.ThrowIfNull(lengths); + if (lengths.Length == 0) ThrowHelper.ThrowArgumentException(ExceptionResource.Arg_NeedAtLeast1Rank); @@ -155,12 +145,10 @@ public static unsafe Array CreateInstance(Type elementType, params int[] lengths [RequiresDynamicCode("The code for an array of the specified type might not be available.")] public static unsafe Array CreateInstance(Type elementType, int[] lengths, int[] lowerBounds) { - if (elementType == null) - ThrowHelper.ThrowArgumentNullException(ExceptionArgument.elementType); - if (lengths == null) - ThrowHelper.ThrowArgumentNullException(ExceptionArgument.lengths); - if (lowerBounds == null) - ThrowHelper.ThrowArgumentNullException(ExceptionArgument.lowerBounds); + ArgumentNullException.ThrowIfNull(elementType); + ArgumentNullException.ThrowIfNull(lengths); + ArgumentNullException.ThrowIfNull(lowerBounds); + if (lengths.Length != lowerBounds.Length) ThrowHelper.ThrowArgumentException(ExceptionResource.Arg_RanksAndBounds); if (lengths.Length == 0) @@ -186,12 +174,7 @@ public static unsafe Array CreateInstance(Type elementType, int[] lengths, int[] [RequiresDynamicCode("The code for an array of the specified type might not be available.")] public static Array CreateInstance(Type elementType, params long[] lengths) { - if (lengths == null) - { - ThrowHelper.ThrowArgumentNullException(ExceptionArgument.lengths); - } - if (lengths.Length == 0) - ThrowHelper.ThrowArgumentException(ExceptionResource.Arg_NeedAtLeast1Rank); + ArgumentNullException.ThrowIfNull(lengths); int[] intLengths = new int[lengths.Length]; @@ -207,6 +190,144 @@ public static Array CreateInstance(Type elementType, params long[] lengths) return CreateInstance(elementType, intLengths); } + /// + /// Creates a one-dimensional of the specified array type and length, with zero-based indexing. + /// + /// The type of the array (not of the array element type). + /// The size of the to create. + /// A new one-dimensional of the specified with the specified length. + /// is null. + /// is negative. + /// is not an array type. + /// -or- + /// is not one-dimensional array. + /// + /// When the array type is readily available, this method should be preferred over , as it has + /// better performance and it is AOT-friendly. + public static unsafe Array CreateInstanceFromArrayType(Type arrayType, int length) + { + ArgumentNullException.ThrowIfNull(arrayType); + ArgumentOutOfRangeException.ThrowIfNegative(length); + + RuntimeType? t = arrayType as RuntimeType; + if (t == null) + ThrowHelper.ThrowArgumentException(ExceptionResource.Arg_MustBeType, ExceptionArgument.arrayType); + + if (!t.IsArray) + ThrowHelper.ThrowArgumentException(ExceptionResource.Argument_HasToBeArrayClass, ExceptionArgument.arrayType); + + if (t.GetArrayRank() != 1) + ThrowHelper.ThrowArgumentException(ExceptionResource.Arg_RankMultiDimNotSupported, ExceptionArgument.arrayType); + + return InternalCreateFromArrayType(t, 1, &length, null); + } + + /// + /// Creates a multidimensional of the specified and dimension lengths, with zero-based indexing. + /// + /// The type of the array (not of the array element type). + /// The dimension lengths, specified in an array of 32-bit integers. + /// A new multidimensional of the specified Type with the specified length for each dimension, using zero-based indexing. + /// is null. + /// -or- + /// is null. + /// + /// Any value in is less than zero. + /// The lengths array is empty. + /// -or- + /// is not an array type. + /// -or- + /// rank does not match length. + /// + /// When the array type is readily available, this method should be preferred over , as it has + /// better performance and it is AOT-friendly. + public static unsafe Array CreateInstanceFromArrayType(Type arrayType, params int[] lengths) + { + ArgumentNullException.ThrowIfNull(arrayType); + ArgumentNullException.ThrowIfNull(lengths); + + RuntimeType? t = arrayType as RuntimeType; + if (t == null) + ThrowHelper.ThrowArgumentException(ExceptionResource.Arg_MustBeType, ExceptionArgument.arrayType); + + if (!t.IsArray) + ThrowHelper.ThrowArgumentException(ExceptionResource.Argument_HasToBeArrayClass, ExceptionArgument.arrayType); + + if (t.GetArrayRank() != lengths.Length) + ThrowHelper.ThrowArgumentException(ExceptionResource.Arg_RankIndices); + + // Check to make sure the lengths are all non-negative. Note that we check this here to give + // a good exception message if they are not; however we check this again inside the execution + // engine's low level allocation function after having made a copy of the array to prevent a + // malicious caller from mutating the array after this check. + for (int i = 0; i < lengths.Length; i++) + if (lengths[i] < 0) + ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.lengths, i, ExceptionResource.ArgumentOutOfRange_NeedNonNegNum); + + fixed (int* pLengths = &lengths[0]) + return InternalCreateFromArrayType(t, lengths.Length, pLengths, null); + } + + /// + /// Creates a multidimensional of the specified and dimension lengths, with the specified lower bounds. + /// + /// The type of the array (not of the array element type). + /// The dimension lengths, specified in an array of 32-bit integers. + /// A one-dimensional array that contains the lower bound (starting index) of each dimension of the to create. + /// A new multidimensional of the specified with the specified length and lower bound for each dimension. + /// is null. + /// -or- + /// is null. + /// -or- + /// is null. + /// + /// The and arrays do not contain the same number of elements. + /// -or- + /// The lengths array is empty. + /// -or- + /// is not an array type. + /// -or- + /// rank does not match length. + /// + /// Any value in is less than zero. + /// Native AOT: any value in is different than zero. + /// When the array type is readily available, this method should be preferred over , as it has + /// better performance and it is AOT-friendly. + public static unsafe Array CreateInstanceFromArrayType(Type arrayType, int[] lengths, int[] lowerBounds) + { + ArgumentNullException.ThrowIfNull(arrayType); + ArgumentNullException.ThrowIfNull(lengths); + ArgumentNullException.ThrowIfNull(lowerBounds); + + if (lengths.Length != lowerBounds.Length) + ThrowHelper.ThrowArgumentException(ExceptionResource.Arg_RanksAndBounds); + + RuntimeType? t = arrayType as RuntimeType; + if (t == null) + ThrowHelper.ThrowArgumentException(ExceptionResource.Arg_MustBeType, ExceptionArgument.arrayType); + + if (!t.IsArray) + ThrowHelper.ThrowArgumentException(ExceptionResource.Argument_HasToBeArrayClass, ExceptionArgument.arrayType); + + if (t.GetArrayRank() != lengths.Length) + ThrowHelper.ThrowArgumentException(ExceptionResource.Arg_RankIndices); + + if (lowerBounds[0] != 0 && t.IsSZArray) + ThrowHelper.ThrowArgumentException(ExceptionResource.Arg_NonZeroLowerBound); + + // Check to make sure the lengths are all non-negative. Note that we check this here to give + // a good exception message if they are not; however we check this again inside the execution + // engine's low level allocation function after having made a copy of the array to prevent a + // malicious caller from mutating the array after this check. + for (int i = 0; i < lengths.Length; i++) + if (lengths[i] < 0) + ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.lengths, i, ExceptionResource.ArgumentOutOfRange_NeedNonNegNum); + + fixed (int* pLengths = &lengths[0]) + fixed (int* pLowerBounds = &lowerBounds[0]) + return InternalCreateFromArrayType(t, lengths.Length, pLengths, pLowerBounds); + } + public static void Copy(Array sourceArray, Array destinationArray, long length) { int ilength = (int)length; diff --git a/src/libraries/System.Private.CoreLib/src/System/Buffers/ArrayPoolEventSource.cs b/src/libraries/System.Private.CoreLib/src/System/Buffers/ArrayPoolEventSource.cs index fe52a9b516347..ea1baec2be7dc 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Buffers/ArrayPoolEventSource.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Buffers/ArrayPoolEventSource.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Diagnostics.Tracing; using System.Diagnostics.CodeAnalysis; +using System.Diagnostics.Tracing; namespace System.Buffers { diff --git a/src/libraries/System.Private.CoreLib/src/System/Char.cs b/src/libraries/System.Private.CoreLib/src/System/Char.cs index dc08ddf97c63f..a44d61f61a2ae 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Char.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Char.cs @@ -253,9 +253,9 @@ internal static bool TryParse(ReadOnlySpan s, out char result) /// Indicates whether a character is categorized as an uppercase ASCII letter. /// The character to evaluate. - /// true if is a uppercase ASCII letter; otherwise, false. + /// true if is an uppercase ASCII letter; otherwise, false. /// - /// This determines whether the character is in the range 'a' through 'z', inclusive. + /// This determines whether the character is in the range 'A' through 'Z', inclusive. /// public static bool IsAsciiLetterUpper(char c) => IsBetween(c, 'A', 'Z'); diff --git a/src/libraries/System.Private.CoreLib/src/System/Collections/HashHelpers.SerializationInfoTable.cs b/src/libraries/System.Private.CoreLib/src/System/Collections/HashHelpers.SerializationInfoTable.cs index 25a47ec67bd5e..4154b32aca460 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Collections/HashHelpers.SerializationInfoTable.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Collections/HashHelpers.SerializationInfoTable.cs @@ -4,9 +4,9 @@ // Used by Hashtable and Dictionary's SeralizationInfo .ctor's to store the SeralizationInfo // object until OnDeserialization is called. -using System.Threading; using System.Runtime.CompilerServices; using System.Runtime.Serialization; +using System.Threading; namespace System.Collections { diff --git a/src/libraries/System.Private.CoreLib/src/System/DateTimeOffset.Android.cs b/src/libraries/System.Private.CoreLib/src/System/DateTimeOffset.Android.cs index c40e4708e47aa..e9ca7bb3eeb87 100644 --- a/src/libraries/System.Private.CoreLib/src/System/DateTimeOffset.Android.cs +++ b/src/libraries/System.Private.CoreLib/src/System/DateTimeOffset.Android.cs @@ -1,6 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Globalization; using System.Threading; namespace System @@ -60,7 +61,7 @@ public static DateTimeOffset Now } // Fast path obtained offset incorporated into ToLocalTime(DateTime.UtcNow, true) logic - int localDateTimeOffsetSeconds = Convert.ToInt32(localDateTimeOffset); + int localDateTimeOffsetSeconds = Convert.ToInt32(localDateTimeOffset, CultureInfo.InvariantCulture); TimeSpan offset = TimeSpan.FromSeconds(localDateTimeOffsetSeconds); long localTicks = utcDateTime.Ticks + offset.Ticks; if (localTicks < DateTime.MinTicks || localTicks > DateTime.MaxTicks) diff --git a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/StackFrame.cs b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/StackFrame.cs index 67831fc087219..ff5463bb4cbe1 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/StackFrame.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/StackFrame.cs @@ -2,9 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Diagnostics.CodeAnalysis; -using System.Text; using System.Reflection; using System.Runtime.CompilerServices; +using System.Text; namespace System.Diagnostics { diff --git a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/ActivityTracker.cs b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/ActivityTracker.cs index 1d5d086dfbfea..6bba8725c848a 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/ActivityTracker.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/ActivityTracker.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Threading.Tasks; using System.Threading; +using System.Threading.Tasks; namespace System.Diagnostics.Tracing { diff --git a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventProvider.cs b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventProvider.cs index 995fced70a96c..b9fcf2859cff9 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventProvider.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventProvider.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Diagnostics; using System.Collections.Generic; +using System.Diagnostics; using System.Globalization; using System.Numerics; using System.Runtime.InteropServices; diff --git a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/FrameworkEventSource.cs b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/FrameworkEventSource.cs index f8ce8aebe672e..264f4a6bc8557 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/FrameworkEventSource.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/FrameworkEventSource.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Runtime.CompilerServices; using System.Diagnostics.CodeAnalysis; +using System.Runtime.CompilerServices; namespace System.Diagnostics.Tracing { diff --git a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/NativeRuntimeEventSource.Threading.NativeSinks.cs b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/NativeRuntimeEventSource.Threading.NativeSinks.cs index 61ad1d5f055e4..a97f2ef62c9fe 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/NativeRuntimeEventSource.Threading.NativeSinks.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/NativeRuntimeEventSource.Threading.NativeSinks.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Diagnostics.CodeAnalysis; -using System.Threading; using System.Runtime.CompilerServices; +using System.Threading; namespace System.Diagnostics.Tracing { diff --git a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/NativeRuntimeEventSource.Threading.cs b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/NativeRuntimeEventSource.Threading.cs index c77cfe8a56154..d04824bb37cb5 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/NativeRuntimeEventSource.Threading.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/NativeRuntimeEventSource.Threading.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Diagnostics.CodeAnalysis; -using System.Threading; using System.Runtime.CompilerServices; +using System.Threading; namespace System.Diagnostics.Tracing { diff --git a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/RuntimeEventSource.cs b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/RuntimeEventSource.cs index 649ef854a0f38..731762bacea20 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/RuntimeEventSource.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/RuntimeEventSource.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Threading; using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; +using System.Threading; namespace System.Diagnostics.Tracing { diff --git a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/XplatEventLogger.cs b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/XplatEventLogger.cs index bad01b46499fa..1a4d4f92ce889 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/XplatEventLogger.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/XplatEventLogger.cs @@ -2,13 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Runtime.CompilerServices; -using System.Collections.ObjectModel; using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Diagnostics; -using System.Text; +using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; +using System.Text; #if FEATURE_EVENTSOURCE_XPLAT diff --git a/src/libraries/System.Private.CoreLib/src/System/Environment.Android.cs b/src/libraries/System.Private.CoreLib/src/System/Environment.Android.cs index b3bb0a25a1542..d5e3fae3a9e2b 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Environment.Android.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Environment.Android.cs @@ -1,11 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.IO; -using System.Threading; using System.Collections.Generic; -using System.Runtime.InteropServices; using System.Diagnostics; +using System.IO; +using System.Runtime.InteropServices; +using System.Threading; namespace System { diff --git a/src/libraries/System.Private.CoreLib/src/System/Environment.Windows.cs b/src/libraries/System.Private.CoreLib/src/System/Environment.Windows.cs index 01339a82477d4..7e78ede36eb63 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Environment.Windows.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Environment.Windows.cs @@ -1,13 +1,13 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Text; +using Microsoft.Win32.SafeHandles; namespace System { diff --git a/src/libraries/System.Private.CoreLib/src/System/Environment.iOS.cs b/src/libraries/System.Private.CoreLib/src/System/Environment.iOS.cs index 9f69fdea66588..973790e0785a0 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Environment.iOS.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Environment.iOS.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.IO; -using System.Threading; using System.Collections.Generic; +using System.IO; using System.Runtime.InteropServices; +using System.Threading; using NSSearchPathDirectory = Interop.Sys.NSSearchPathDirectory; namespace System diff --git a/src/libraries/System.Private.CoreLib/src/System/Globalization/CalendarData.Nls.cs b/src/libraries/System.Private.CoreLib/src/System/Globalization/CalendarData.Nls.cs index 2e04ff6c688b2..54677a079b6aa 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Globalization/CalendarData.Nls.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Globalization/CalendarData.Nls.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Diagnostics; using System.Collections.Generic; +using System.Diagnostics; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; diff --git a/src/libraries/System.Private.CoreLib/src/System/Globalization/CharUnicodeInfo.cs b/src/libraries/System.Private.CoreLib/src/System/Globalization/CharUnicodeInfo.cs index 5a1ce17427643..d98008b8c3a24 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Globalization/CharUnicodeInfo.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Globalization/CharUnicodeInfo.cs @@ -3,10 +3,10 @@ using System.Buffers.Binary; using System.Diagnostics; +using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Text; using System.Text.Unicode; -using System.Runtime.CompilerServices; namespace System.Globalization { diff --git a/src/libraries/System.Private.CoreLib/src/System/Globalization/CultureData.Nls.cs b/src/libraries/System.Private.CoreLib/src/System/Globalization/CultureData.Nls.cs index 69b7518150550..5ac62150c3c5b 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Globalization/CultureData.Nls.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Globalization/CultureData.Nls.cs @@ -4,9 +4,9 @@ using System.Collections.Generic; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; -using System.Text; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; +using System.Text; #pragma warning disable 8500 // taking address of managed type diff --git a/src/libraries/System.Private.CoreLib/src/System/Globalization/InvariantModeCasing.cs b/src/libraries/System.Private.CoreLib/src/System/Globalization/InvariantModeCasing.cs index 6e85fb44d1ab5..0e991b1ec2211 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Globalization/InvariantModeCasing.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Globalization/InvariantModeCasing.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Text; using System.Diagnostics; -using System.Runtime.InteropServices; using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Text; namespace System.Globalization { diff --git a/src/libraries/System.Private.CoreLib/src/System/Globalization/OrdinalCasing.Icu.cs b/src/libraries/System.Private.CoreLib/src/System/Globalization/OrdinalCasing.Icu.cs index 41a0705698bc0..b21d821bbc33b 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Globalization/OrdinalCasing.Icu.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Globalization/OrdinalCasing.Icu.cs @@ -1,11 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Text; using System.Diagnostics; -using System.Threading; -using System.Runtime.InteropServices; using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Text; +using System.Threading; namespace System.Globalization { diff --git a/src/libraries/System.Private.CoreLib/src/System/Globalization/SurrogateCasing.cs b/src/libraries/System.Private.CoreLib/src/System/Globalization/SurrogateCasing.cs index a867a04fbd9e3..ce4c301487b09 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Globalization/SurrogateCasing.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Globalization/SurrogateCasing.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Text; using System.Diagnostics; using System.Runtime.CompilerServices; +using System.Text; namespace System.Globalization { diff --git a/src/libraries/System.Private.CoreLib/src/System/IO/DirectoryInfo.cs b/src/libraries/System.Private.CoreLib/src/System/IO/DirectoryInfo.cs index 12ad222031f7e..2f46635df51b6 100644 --- a/src/libraries/System.Private.CoreLib/src/System/IO/DirectoryInfo.cs +++ b/src/libraries/System.Private.CoreLib/src/System/IO/DirectoryInfo.cs @@ -2,9 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.IO; using System.Collections.Generic; using System.Diagnostics; +using System.IO; using System.IO.Enumeration; namespace System.IO diff --git a/src/libraries/System.Private.CoreLib/src/System/IO/Enumeration/FileSystemEnumerator.Windows.cs b/src/libraries/System.Private.CoreLib/src/System/IO/Enumeration/FileSystemEnumerator.Windows.cs index 47acd695a01ce..a4ceade7483f1 100644 --- a/src/libraries/System.Private.CoreLib/src/System/IO/Enumeration/FileSystemEnumerator.Windows.cs +++ b/src/libraries/System.Private.CoreLib/src/System/IO/Enumeration/FileSystemEnumerator.Windows.cs @@ -2,10 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.IO; using System.Buffers; using System.Collections.Generic; using System.Diagnostics; +using System.IO; using System.Runtime.CompilerServices; using System.Runtime.ConstrainedExecution; using System.Runtime.InteropServices; diff --git a/src/libraries/System.Private.CoreLib/src/System/IO/FileInfo.cs b/src/libraries/System.Private.CoreLib/src/System/IO/FileInfo.cs index ac0b6c3fccbce..f752f64e8e0d5 100644 --- a/src/libraries/System.Private.CoreLib/src/System/IO/FileInfo.cs +++ b/src/libraries/System.Private.CoreLib/src/System/IO/FileInfo.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Diagnostics; -using System.Text; using System.Runtime.Versioning; +using System.Text; namespace System.IO { diff --git a/src/libraries/System.Private.CoreLib/src/System/IO/FileStatus.SetTimes.OSX.cs b/src/libraries/System.Private.CoreLib/src/System/IO/FileStatus.SetTimes.OSX.cs index ea01090fc5d06..6d4b8dd99c11e 100644 --- a/src/libraries/System.Private.CoreLib/src/System/IO/FileStatus.SetTimes.OSX.cs +++ b/src/libraries/System.Private.CoreLib/src/System/IO/FileStatus.SetTimes.OSX.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Runtime.InteropServices; using System.Diagnostics; +using System.Runtime.InteropServices; using Microsoft.Win32.SafeHandles; namespace System.IO diff --git a/src/libraries/System.Private.CoreLib/src/System/IO/FileSystem.TryCloneFile.OSX.cs b/src/libraries/System.Private.CoreLib/src/System/IO/FileSystem.TryCloneFile.OSX.cs index 5f321b3fc0a65..261755de3385e 100644 --- a/src/libraries/System.Private.CoreLib/src/System/IO/FileSystem.TryCloneFile.OSX.cs +++ b/src/libraries/System.Private.CoreLib/src/System/IO/FileSystem.TryCloneFile.OSX.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Diagnostics; +using Microsoft.Win32.SafeHandles; namespace System.IO { diff --git a/src/libraries/System.Private.CoreLib/src/System/IO/FileSystem.Windows.cs b/src/libraries/System.Private.CoreLib/src/System/IO/FileSystem.Windows.cs index fc063209e36fc..c49f98c6aab03 100644 --- a/src/libraries/System.Private.CoreLib/src/System/IO/FileSystem.Windows.cs +++ b/src/libraries/System.Private.CoreLib/src/System/IO/FileSystem.Windows.cs @@ -1,11 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; -using System.Diagnostics; -using System.Runtime.InteropServices; using System.Buffers; using System.ComponentModel; +using System.Diagnostics; +using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; namespace System.IO { diff --git a/src/libraries/System.Private.CoreLib/src/System/IO/PinnedBufferMemoryStream.cs b/src/libraries/System.Private.CoreLib/src/System/IO/PinnedBufferMemoryStream.cs index 2d33c11b704a1..d3f06c0e1d9b3 100644 --- a/src/libraries/System.Private.CoreLib/src/System/IO/PinnedBufferMemoryStream.cs +++ b/src/libraries/System.Private.CoreLib/src/System/IO/PinnedBufferMemoryStream.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Runtime.InteropServices; using System.Diagnostics; +using System.Runtime.InteropServices; namespace System.IO { diff --git a/src/libraries/System.Private.CoreLib/src/System/IO/TextReader.cs b/src/libraries/System.Private.CoreLib/src/System/IO/TextReader.cs index 179a07e0a956e..55b12e8834438 100644 --- a/src/libraries/System.Private.CoreLib/src/System/IO/TextReader.cs +++ b/src/libraries/System.Private.CoreLib/src/System/IO/TextReader.cs @@ -1,12 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Buffers; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; using System.Text; using System.Threading; using System.Threading.Tasks; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Buffers; namespace System.IO { diff --git a/src/libraries/System.Private.CoreLib/src/System/IO/TextWriter.cs b/src/libraries/System.Private.CoreLib/src/System/IO/TextWriter.cs index e01444f8e91c7..874638ee34fd8 100644 --- a/src/libraries/System.Private.CoreLib/src/System/IO/TextWriter.cs +++ b/src/libraries/System.Private.CoreLib/src/System/IO/TextWriter.cs @@ -1,14 +1,14 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Text; -using System.Threading; +using System.Buffers; +using System.Diagnostics.CodeAnalysis; using System.Globalization; -using System.Threading.Tasks; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -using System.Buffers; -using System.Diagnostics.CodeAnalysis; +using System.Text; +using System.Threading; +using System.Threading.Tasks; namespace System.IO { diff --git a/src/libraries/System.Private.CoreLib/src/System/IO/UnmanagedMemoryAccessor.cs b/src/libraries/System.Private.CoreLib/src/System/IO/UnmanagedMemoryAccessor.cs index dbb896a39f139..9156b5efd21f4 100644 --- a/src/libraries/System.Private.CoreLib/src/System/IO/UnmanagedMemoryAccessor.cs +++ b/src/libraries/System.Private.CoreLib/src/System/IO/UnmanagedMemoryAccessor.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Diagnostics; -using System.Runtime.InteropServices; using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; namespace System.IO { diff --git a/src/libraries/System.Private.CoreLib/src/System/Math.cs b/src/libraries/System.Private.CoreLib/src/System/Math.cs index 53e96f11c7ca4..88d96c09eeca3 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Math.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Math.cs @@ -10,8 +10,8 @@ using System.Numerics; using System.Runtime.CompilerServices; using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; using System.Runtime.Intrinsics.Arm; +using System.Runtime.Intrinsics.X86; using System.Runtime.Versioning; namespace System diff --git a/src/libraries/System.Private.CoreLib/src/System/MathF.cs b/src/libraries/System.Private.CoreLib/src/System/MathF.cs index 8cc0bcd2999ab..b3c27fc13da06 100644 --- a/src/libraries/System.Private.CoreLib/src/System/MathF.cs +++ b/src/libraries/System.Private.CoreLib/src/System/MathF.cs @@ -9,8 +9,8 @@ using System.Numerics; using System.Runtime.CompilerServices; using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; using System.Runtime.Intrinsics.Arm; +using System.Runtime.Intrinsics.X86; namespace System { diff --git a/src/libraries/System.Private.CoreLib/src/System/Number.BigInteger.cs b/src/libraries/System.Private.CoreLib/src/System/Number.BigInteger.cs index c671b5ad8faed..8af96fc72569d 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Number.BigInteger.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Number.BigInteger.cs @@ -3,8 +3,8 @@ using System.Diagnostics; using System.Numerics; -using System.Runtime.InteropServices; using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; namespace System { diff --git a/src/libraries/System.Private.CoreLib/src/System/Number.NumberBuffer.cs b/src/libraries/System.Private.CoreLib/src/System/Number.NumberBuffer.cs index 22a20762d7539..5b4fc7a7564e8 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Number.NumberBuffer.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Number.NumberBuffer.cs @@ -2,9 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Diagnostics; -using System.Text; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; +using System.Text; namespace System { diff --git a/src/libraries/System.Private.CoreLib/src/System/Numerics/BitOperations.cs b/src/libraries/System.Private.CoreLib/src/System/Numerics/BitOperations.cs index 7338e9aa5ee0f..be2f133b15b6b 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Numerics/BitOperations.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Numerics/BitOperations.cs @@ -7,8 +7,8 @@ using System.Runtime.InteropServices; using System.Runtime.Intrinsics; using System.Runtime.Intrinsics.Arm; -using System.Runtime.Intrinsics.X86; using System.Runtime.Intrinsics.Wasm; +using System.Runtime.Intrinsics.X86; // Some routines inspired by the Stanford Bit Twiddling Hacks by Sean Eron Anderson: // http://graphics.stanford.edu/~seander/bithacks.html diff --git a/src/libraries/System.Private.CoreLib/src/System/Numerics/VectorMath.cs b/src/libraries/System.Private.CoreLib/src/System/Numerics/VectorMath.cs index 7c00f683c5d0a..aea7b92581740 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Numerics/VectorMath.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Numerics/VectorMath.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Runtime.CompilerServices; using System.Runtime.Intrinsics; -using System.Runtime.Intrinsics.X86; using System.Runtime.Intrinsics.Arm; -using System.Runtime.CompilerServices; +using System.Runtime.Intrinsics.X86; namespace System.Numerics { diff --git a/src/libraries/System.Private.CoreLib/src/System/ObjectDisposedException.cs b/src/libraries/System.Private.CoreLib/src/System/ObjectDisposedException.cs index 5066ae5ea4379..e0360d7eddca6 100644 --- a/src/libraries/System.Private.CoreLib/src/System/ObjectDisposedException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/ObjectDisposedException.cs @@ -2,10 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.ComponentModel; -using System.Runtime.CompilerServices; -using System.Runtime.Serialization; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; +using System.Runtime.CompilerServices; +using System.Runtime.Serialization; namespace System { diff --git a/src/libraries/System.Private.CoreLib/src/System/Progress.cs b/src/libraries/System.Private.CoreLib/src/System/Progress.cs index ae7cc6bc5a3b9..5d3f4d2cc65f7 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Progress.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Progress.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Threading; using System.Diagnostics; +using System.Threading; namespace System { diff --git a/src/libraries/System.Private.CoreLib/src/System/Reflection/Assembly.cs b/src/libraries/System.Private.CoreLib/src/System/Reflection/Assembly.cs index a8cfd993acbd1..5021f9b4e9eef 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Reflection/Assembly.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Reflection/Assembly.cs @@ -1,16 +1,16 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.IO; -using System.Globalization; using System.Collections.Generic; using System.ComponentModel; using System.Configuration.Assemblies; using System.Diagnostics.CodeAnalysis; +using System.Globalization; +using System.IO; +using System.Runtime.CompilerServices; +using System.Runtime.Loader; using System.Runtime.Serialization; using System.Security; -using System.Runtime.Loader; -using System.Runtime.CompilerServices; namespace System.Reflection { diff --git a/src/libraries/System.Private.CoreLib/src/System/Reflection/AssemblyNameFormatter.cs b/src/libraries/System.Private.CoreLib/src/System/Reflection/AssemblyNameFormatter.cs index 947765b1021ee..c1a810db50755 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Reflection/AssemblyNameFormatter.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Reflection/AssemblyNameFormatter.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Collections.Generic; using System.Diagnostics; -using System.Text; using System.Globalization; -using System.Collections.Generic; +using System.Text; namespace System.Reflection { diff --git a/src/libraries/System.Private.CoreLib/src/System/Reflection/ConstructorInvoker.cs b/src/libraries/System.Private.CoreLib/src/System/Reflection/ConstructorInvoker.cs index 3fad9dc8dba85..4285027c439e5 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Reflection/ConstructorInvoker.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Reflection/ConstructorInvoker.cs @@ -2,9 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Diagnostics; +using System.Runtime; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -using System.Runtime; using static System.Reflection.InvokerEmitUtil; using static System.Reflection.MethodBase; using static System.Reflection.MethodInvokerCommon; diff --git a/src/libraries/System.Private.CoreLib/src/System/Reflection/Emit/Opcode.cs b/src/libraries/System.Private.CoreLib/src/System/Reflection/Emit/Opcode.cs index 3f29e6e0e3516..c5a57fde1ecb2 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Reflection/Emit/Opcode.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Reflection/Emit/Opcode.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Threading; using System.Diagnostics.CodeAnalysis; +using System.Threading; namespace System.Reflection.Emit { diff --git a/src/libraries/System.Private.CoreLib/src/System/Reflection/Emit/TypeNameBuilder.cs b/src/libraries/System.Private.CoreLib/src/System/Reflection/Emit/TypeNameBuilder.cs index 940623ff809a2..3adc772898019 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Reflection/Emit/TypeNameBuilder.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Reflection/Emit/TypeNameBuilder.cs @@ -5,8 +5,8 @@ // It replaces the C++ bits of the implementation with a faithful C# port. using System.Collections.Generic; -using System.Text; using System.Diagnostics; +using System.Text; namespace System.Reflection.Emit { diff --git a/src/libraries/System.Private.CoreLib/src/System/Reflection/InvokeUtils.cs b/src/libraries/System.Private.CoreLib/src/System/Reflection/InvokeUtils.cs index a701be7564566..5ad0b2729646b 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Reflection/InvokeUtils.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Reflection/InvokeUtils.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Runtime; -using System.Runtime.CompilerServices; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; +using System.Runtime; +using System.Runtime.CompilerServices; namespace System.Reflection { diff --git a/src/libraries/System.Private.CoreLib/src/System/Reflection/MethodBaseInvoker.cs b/src/libraries/System.Private.CoreLib/src/System/Reflection/MethodBaseInvoker.cs index 02967f04b59de..9a30a15dcae0d 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Reflection/MethodBaseInvoker.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Reflection/MethodBaseInvoker.cs @@ -1,12 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Diagnostics.CodeAnalysis; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Globalization; +using System.Runtime; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -using System.Runtime; using static System.Reflection.InvokerEmitUtil; using static System.Reflection.MethodBase; using static System.Reflection.MethodInvokerCommon; diff --git a/src/libraries/System.Private.CoreLib/src/System/Reflection/MethodInvoker.cs b/src/libraries/System.Private.CoreLib/src/System/Reflection/MethodInvoker.cs index 0c8d9c5958070..68380efb9098d 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Reflection/MethodInvoker.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Reflection/MethodInvoker.cs @@ -2,10 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Diagnostics; +using System.Reflection.Emit; +using System.Runtime; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -using System.Runtime; -using System.Reflection.Emit; using static System.Reflection.InvokerEmitUtil; using static System.Reflection.MethodBase; using static System.Reflection.MethodInvokerCommon; diff --git a/src/libraries/System.Private.CoreLib/src/System/Reflection/Pointer.cs b/src/libraries/System.Private.CoreLib/src/System/Reflection/Pointer.cs index 2d311272cb8b1..0482d908a8ead 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Reflection/Pointer.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Reflection/Pointer.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Diagnostics; -using System.Runtime.Serialization; using System.Diagnostics.CodeAnalysis; +using System.Runtime.Serialization; namespace System.Reflection { diff --git a/src/libraries/System.Private.CoreLib/src/System/Resources/IResourceGroveler.cs b/src/libraries/System.Private.CoreLib/src/System/Resources/IResourceGroveler.cs index 3bc19181f088d..ec0b89fce7a5a 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Resources/IResourceGroveler.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Resources/IResourceGroveler.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Globalization; using System.Collections.Generic; +using System.Globalization; namespace System.Resources { diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncMethodBuilderCore.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncMethodBuilderCore.cs index 9d5fcd9c399c9..459fd26e6abb3 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncMethodBuilderCore.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncMethodBuilderCore.cs @@ -5,9 +5,9 @@ using System.Diagnostics.CodeAnalysis; using System.Diagnostics.Tracing; using System.Reflection; +using System.Text; using System.Threading; using System.Threading.Tasks; -using System.Text; namespace System.Runtime.CompilerServices { diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/RuntimeHelpers.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/RuntimeHelpers.cs index 47014ec5d718f..662225afc91d8 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/RuntimeHelpers.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/RuntimeHelpers.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Runtime.InteropServices; using System.Reflection; +using System.Runtime.InteropServices; namespace System.Runtime.CompilerServices { diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/COMException.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/COMException.cs index 86e0b7b7f303f..c74821e21c685 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/COMException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/COMException.cs @@ -2,9 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.ComponentModel; +using System.Runtime.CompilerServices; using System.Runtime.Serialization; using System.Text; -using System.Runtime.CompilerServices; namespace System.Runtime.InteropServices { diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/GCHandle.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/GCHandle.cs index 1a79a82741e8f..7a4f50bf6bcc1 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/GCHandle.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/GCHandle.cs @@ -78,7 +78,7 @@ public void Free() // Target property - allows getting / updating of the handle's referent. public object? Target { - get + readonly get { IntPtr handle = _handle; ThrowIfInvalid(handle); @@ -103,7 +103,7 @@ public object? Target /// Retrieve the address of an object in a Pinned handle. This throws /// an exception if the handle is any type other than Pinned. /// - public IntPtr AddrOfPinnedObject() + public readonly IntPtr AddrOfPinnedObject() { // Check if the handle was not a pinned handle. // You can only get the address of pinned handles. @@ -141,7 +141,7 @@ public IntPtr AddrOfPinnedObject() } /// Determine whether this handle has been allocated or not. - public bool IsAllocated => (nint)_handle != 0; + public readonly bool IsAllocated => (nint)_handle != 0; /// /// Used to create a GCHandle from an int. This is intended to @@ -160,14 +160,14 @@ public static GCHandle FromIntPtr(IntPtr value) public static IntPtr ToIntPtr(GCHandle value) => value._handle; - public override int GetHashCode() => _handle.GetHashCode(); + public override readonly int GetHashCode() => _handle.GetHashCode(); - public override bool Equals([NotNullWhen(true)] object? o) => o is GCHandle other && Equals(other); + public override readonly bool Equals([NotNullWhen(true)] object? o) => o is GCHandle other && Equals(other); /// Indicates whether the current instance is equal to another instance of the same type. /// An instance to compare with this instance. /// true if the current instance is equal to the other instance; otherwise, false. - public bool Equals(GCHandle other) => _handle == other._handle; + public readonly bool Equals(GCHandle other) => _handle == other._handle; public static bool operator ==(GCHandle a, GCHandle b) => (nint)a._handle == (nint)b._handle; diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ObjectiveC/ObjectiveCMarshal.PlatformNotSupported.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ObjectiveC/ObjectiveCMarshal.PlatformNotSupported.cs index fa97f66b2f3f5..3215cdb9ffffd 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ObjectiveC/ObjectiveCMarshal.PlatformNotSupported.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ObjectiveC/ObjectiveCMarshal.PlatformNotSupported.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Runtime.Versioning; using System.Runtime.CompilerServices; +using System.Runtime.Versioning; namespace System.Runtime.InteropServices.ObjectiveC { diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ObjectiveC/ObjectiveCMarshal.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ObjectiveC/ObjectiveCMarshal.cs index c2cb899e11552..1f84eb52fd9b1 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ObjectiveC/ObjectiveCMarshal.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ObjectiveC/ObjectiveCMarshal.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Runtime.Versioning; using System.Runtime.CompilerServices; +using System.Runtime.Versioning; namespace System.Runtime.InteropServices.ObjectiveC { diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Arm/AdvSimd.PlatformNotSupported.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Arm/AdvSimd.PlatformNotSupported.cs index 26e4f2cbd2467..3202d6dc94a62 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Arm/AdvSimd.PlatformNotSupported.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Arm/AdvSimd.PlatformNotSupported.cs @@ -3776,6 +3776,177 @@ internal Arm64() { } /// public static unsafe void StorePairScalarNonTemporal(uint* address, Vector64 value1, Vector64 value2) { throw new PlatformNotSupportedException(); } + /// + /// void vst2_lane_s8 (int8_t * ptr, int8x16x2_t val, const int lane) + /// A64: ST2 { Vt.16B, Vt+1.16B }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(byte* address, (Vector128 value1, Vector128 value2) value, [ConstantExpected(Max = (byte)(15))] byte index) { throw new PlatformNotSupportedException(); } + + /// + /// void vst2_lane_s8 (int8_t * ptr, int8x16x2_t val, const int lane) + /// A64: ST2 { Vt.16B, Vt+1.16B }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(sbyte* address, (Vector128 value1, Vector128 value2) value, [ConstantExpected(Max = (byte)(15))] byte index) { throw new PlatformNotSupportedException(); } + + /// + /// void vst2_lane_s16 (int16_t * ptr, int16x8x2_t val, const int lane) + /// A64: ST2 { Vt.8H, Vt+1.8H }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(short* address, (Vector128 value1, Vector128 value2) value, [ConstantExpected(Max = (byte)(7))] byte index) { throw new PlatformNotSupportedException(); } + + /// + /// void vst2_lane_s16 (int16_t * ptr, int16x8x2_t val, const int lane) + /// A64: ST2 { Vt.8H, Vt+1.8H }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(ushort* address, (Vector128 value1, Vector128 value2) value, [ConstantExpected(Max = (byte)(7))] byte index) { throw new PlatformNotSupportedException(); } + + /// + /// void vst2_lane_s32 (int32_t * ptr, int32x4x2_t val, const int lane) + /// A64: ST2 { Vt.4S, Vt+1.4S }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(int* address, (Vector128 value1, Vector128 value2) value, [ConstantExpected(Max = (byte)(3))] byte index) { throw new PlatformNotSupportedException(); } + + /// + /// void vst2_lane_s32 (int32_t * ptr, int32x4x2_t val, const int lane) + /// A64: ST2 { Vt.4S, Vt+1.4S }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(uint* address, (Vector128 value1, Vector128 value2) value, [ConstantExpected(Max = (byte)(3))] byte index) { throw new PlatformNotSupportedException(); } + + /// + /// A64: ST2 { Vt.2D, Vt+1.2D }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(long* address, (Vector128 value1, Vector128 value2) value, [ConstantExpected(Max = (byte)(1))] byte index) { throw new PlatformNotSupportedException(); } + + /// + /// A64: ST2 { Vt.2D, Vt+1.2D }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(ulong* address, (Vector128 value1, Vector128 value2) value, [ConstantExpected(Max = (byte)(1))] byte index) { throw new PlatformNotSupportedException(); } + + /// + /// void vst2_lane_f32 (float32_t * ptr, float32x2x2_t val, const int lane) + /// A64: ST2 { Vt.4S, Vt+1.4S }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(float* address, (Vector128 value1, Vector128 value2) value, [ConstantExpected(Max = (byte)(3))] byte index) { throw new PlatformNotSupportedException(); } + + /// + /// A64: ST2 { Vt.2D, Vt+1.2D }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(double* address, (Vector128 value1, Vector128 value2) value, [ConstantExpected(Max = (byte)(1))] byte index) { throw new PlatformNotSupportedException(); } + + /// + /// void vst3_lane_s8 (int8_t * ptr, int8x16x3_t val, const int lane) + /// A64: ST3 { Vt.16B, Vt+1.16B, Vt+2.16B }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(byte* address, (Vector128 value1, Vector128 value2, Vector128 value3) value, [ConstantExpected(Max = (byte)(15))] byte index) { throw new PlatformNotSupportedException(); } + + /// + /// void vst3_lane_s8 (int8_t * ptr, int8x16x3_t val, const int lane) + /// A64: ST3 { Vt.16B, Vt+1.16B, Vt+2.16B }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(sbyte* address, (Vector128 value1, Vector128 value2, Vector128 value3) value, [ConstantExpected(Max = (byte)(15))] byte index) { throw new PlatformNotSupportedException(); } + + /// + /// void vst3_lane_s16 (int16_t * ptr, int16x8x3_t val, const int lane) + /// A64: ST3 { Vt.8H, Vt+1.8H, Vt+2.8H }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(short* address, (Vector128 value1, Vector128 value2, Vector128 value3) value, [ConstantExpected(Max = (byte)(7))] byte index) { throw new PlatformNotSupportedException(); } + + /// + /// void vst3_lane_s16 (int16_t * ptr, int16x8x3_t val, const int lane) + /// A64: ST3 { Vt.8H, Vt+1.8H, Vt+2.8H }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(ushort* address, (Vector128 value1, Vector128 value2, Vector128 value3) value, [ConstantExpected(Max = (byte)(7))] byte index) { throw new PlatformNotSupportedException(); } + + /// + /// void vst3_lane_s32 (int32_t * ptr, int32x4x3_t val, const int lane) + /// A64: ST3 { Vt.4S, Vt+1.4S, Vt+2.4S }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(int* address, (Vector128 value1, Vector128 value2, Vector128 value3) value, [ConstantExpected(Max = (byte)(3))] byte index) { throw new PlatformNotSupportedException(); } + + /// + /// void vst3_lane_s32 (int32_t * ptr, int32x4x3_t val, const int lane) + /// A64: ST3 { Vt.4S, Vt+1.4S, Vt+2.4S }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(uint* address, (Vector128 value1, Vector128 value2, Vector128 value3) value, [ConstantExpected(Max = (byte)(3))] byte index) { throw new PlatformNotSupportedException(); } + + /// + /// A64: ST3 { Vt.2D, Vt+1.2D, Vt+2.2D }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(long* address, (Vector128 value1, Vector128 value2, Vector128 value3) value, [ConstantExpected(Max = (byte)(1))] byte index) { throw new PlatformNotSupportedException(); } + + /// + /// A64: ST3 { Vt.2D, Vt+1.2D, Vt+2.2D }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(ulong* address, (Vector128 value1, Vector128 value2, Vector128 value3) value, [ConstantExpected(Max = (byte)(1))] byte index) { throw new PlatformNotSupportedException(); } + + /// + /// void vst3_lane_f32 (float32_t * ptr, float32x2x3_t val, const int lane) + /// A64: ST3 { Vt.4S, Vt+1.4S, Vt+2.4S }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(float* address, (Vector128 value1, Vector128 value2, Vector128 value3) value, [ConstantExpected(Max = (byte)(3))] byte index) { throw new PlatformNotSupportedException(); } + + /// + /// A64: ST3 { Vt.2D, Vt+1.2D, Vt+2.2D }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(double* address, (Vector128 value1, Vector128 value2, Vector128 value3) value, [ConstantExpected(Max = (byte)(1))] byte index) { throw new PlatformNotSupportedException(); } + + /// + /// void vst4_lane_s8 (int8_t * ptr, int8x16x4_t val, const int lane) + /// A64: ST4 { Vt.16B, Vt+1.16B, Vt+2.16B, Vt+3.16B }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(byte* address, (Vector128 value1, Vector128 value2, Vector128 value3, Vector128 value4) value, [ConstantExpected(Max = (byte)(15))] byte index) { throw new PlatformNotSupportedException(); } + + /// + /// void vst4_lane_s8 (int8_t * ptr, int8x16x4_t val, const int lane) + /// A64: ST4 { Vt.16B, Vt+1.16B, Vt+2.16B, Vt+3.16B }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(sbyte* address, (Vector128 value1, Vector128 value2, Vector128 value3, Vector128 value4) value, [ConstantExpected(Max = (byte)(15))] byte index) { throw new PlatformNotSupportedException(); } + + /// + /// void vst4_lane_s16 (int16_t * ptr, int16x8x4_t val, const int lane) + /// A64: ST4 { Vt.8H, Vt+1.8H, Vt+2.8H, Vt+3.8H }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(short* address, (Vector128 value1, Vector128 value2, Vector128 value3, Vector128 value4) value, [ConstantExpected(Max = (byte)(7))] byte index) { throw new PlatformNotSupportedException(); } + + /// + /// void vst4_lane_s16 (int16_t * ptr, int16x8x4_t val, const int lane) + /// A64: ST4 { Vt.8H, Vt+1.8H, Vt+2.8H, Vt+3.8H }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(ushort* address, (Vector128 value1, Vector128 value2, Vector128 value3, Vector128 value4) value, [ConstantExpected(Max = (byte)(7))] byte index) { throw new PlatformNotSupportedException(); } + + /// + /// void vst4_lane_s32 (int32_t * ptr, int32x4x4_t val, const int lane) + /// A64: ST4 { Vt.4S, Vt+1.4S, Vt+2.4S, Vt+3.4S }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(int* address, (Vector128 value1, Vector128 value2, Vector128 value3, Vector128 value4) value, [ConstantExpected(Max = (byte)(3))] byte index) { throw new PlatformNotSupportedException(); } + + /// + /// void vst4_lane_s32 (int32_t * ptr, int32x4x4_t val, const int lane) + /// A64: ST4 { Vt.4S, Vt+1.4S, Vt+2.4S, Vt+3.4S }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(uint* address, (Vector128 value1, Vector128 value2, Vector128 value3, Vector128 value4) value, [ConstantExpected(Max = (byte)(3))] byte index) { throw new PlatformNotSupportedException(); } + + /// + /// A64: ST4 { Vt.2D, Vt+1.2D, Vt+2.2D, Vt+3.2D }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(long* address, (Vector128 value1, Vector128 value2, Vector128 value3, Vector128 value4) value, [ConstantExpected(Max = (byte)(1))] byte index) { throw new PlatformNotSupportedException(); } + + /// + /// A64: ST4 { Vt.2D, Vt+1.2D, Vt+2.2D, Vt+3.2D }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(ulong* address, (Vector128 value1, Vector128 value2, Vector128 value3, Vector128 value4) value, [ConstantExpected(Max = (byte)(1))] byte index) { throw new PlatformNotSupportedException(); } + + /// + /// void vst4_lane_f32 (float32_t * ptr, float32x2x4_t val, const int lane) + /// A64: ST4 { Vt.4S, Vt+1.4S, Vt+2.4S, Vt+3.4S }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(float* address, (Vector128 value1, Vector128 value2, Vector128 value3, Vector128 value4) value, [ConstantExpected(Max = (byte)(3))] byte index) { throw new PlatformNotSupportedException(); } + + /// + /// A64: ST3 { Vt.2D, Vt+1.2D, Vt+2.2D, Vt+3.2D }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(double* address, (Vector128 value1, Vector128 value2, Vector128 value3, Vector128 value4) value, [ConstantExpected(Max = (byte)(1))] byte index) { throw new PlatformNotSupportedException(); } + /// /// A64: ST2 { Vn.16B, Vn+1.16B }, [Xn] /// @@ -15757,6 +15928,111 @@ internal Arm64() { } /// public static unsafe void StoreSelectedScalar(ulong* address, Vector128 value, [ConstantExpected(Max = (byte)(1))] byte index) { throw new PlatformNotSupportedException(); } + /// + /// A64: ST2 { Vt.8B, Vt+1.8B }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(byte* address, (Vector64 value1, Vector64 value2) value, [ConstantExpected(Max = (byte)(7))] byte index) { throw new PlatformNotSupportedException(); } + + /// + /// A64: ST2 { Vt.8B, Vt+1.8B }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(sbyte* address, (Vector64 value1, Vector64 value2) value, [ConstantExpected(Max = (byte)(7))] byte index) { throw new PlatformNotSupportedException(); } + + /// + /// A64: ST2 { Vt.4H, Vt+1.4H }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(short* address, (Vector64 value1, Vector64 value2) value, [ConstantExpected(Max = (byte)(3))] byte index) { throw new PlatformNotSupportedException(); } + + /// + /// A64: ST2 { Vt.4H, Vt+1.4H }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(ushort* address, (Vector64 value1, Vector64 value2) value, [ConstantExpected(Max = (byte)(3))] byte index) { throw new PlatformNotSupportedException(); } + + /// + /// A64: ST2 { Vt.2S, Vt+1.2S }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(int* address, (Vector64 value1, Vector64 value2) value, [ConstantExpected(Max = (byte)(1))] byte index) { throw new PlatformNotSupportedException(); } + + /// + /// A64: ST2 { Vt.2S, Vt+1.2S }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(uint* address, (Vector64 value1, Vector64 value2) value, [ConstantExpected(Max = (byte)(1))] byte index) { throw new PlatformNotSupportedException(); } + + /// + /// A64: ST2 { Vt.2S, Vt+1.2S }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(float* address, (Vector64 value1, Vector64 value2) value, [ConstantExpected(Max = (byte)(1))] byte index) { throw new PlatformNotSupportedException(); } + + /// + /// A64: ST3 { Vt.8B, Vt+1.8B, Vt+2.8B }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(byte* address, (Vector64 value1, Vector64 value2, Vector64 value3) value, [ConstantExpected(Max = (byte)(7))] byte index) { throw new PlatformNotSupportedException(); } + + /// + /// A64: ST3 { Vt.8B, Vt+1.8B, Vt+2.8B }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(sbyte* address, (Vector64 value1, Vector64 value2, Vector64 value3) value, [ConstantExpected(Max = (byte)(7))] byte index) { throw new PlatformNotSupportedException(); } + + /// + /// A64: ST3 { Vt.4H, Vt+1.4H, Vt+2.4H }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(short* address, (Vector64 value1, Vector64 value2, Vector64 value3) value, [ConstantExpected(Max = (byte)(3))] byte index) { throw new PlatformNotSupportedException(); } + + /// + /// A64: ST3 { Vt.4H, Vt+1.4H, Vt+2.4H }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(ushort* address, (Vector64 value1, Vector64 value2, Vector64 value3) value, [ConstantExpected(Max = (byte)(3))] byte index) { throw new PlatformNotSupportedException(); } + + /// + /// A64: ST3 { Vt.2S, Vt+1.2S, Vt+2.2S }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(int* address, (Vector64 value1, Vector64 value2, Vector64 value3) value, [ConstantExpected(Max = (byte)(1))] byte index) { throw new PlatformNotSupportedException(); } + + /// + /// A64: ST3 { Vt.2S, Vt+1.2S, Vt+2.2S }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(uint* address, (Vector64 value1, Vector64 value2, Vector64 value3) value, [ConstantExpected(Max = (byte)(1))] byte index) { throw new PlatformNotSupportedException(); } + + /// + /// A64: ST3 { Vt.2S, Vt+1.2S, Vt+2.2S }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(float* address, (Vector64 value1, Vector64 value2, Vector64 value3) value, [ConstantExpected(Max = (byte)(1))] byte index) { throw new PlatformNotSupportedException(); } + + /// + /// A64: ST4 { Vt.8B, Vt+1.8B, Vt+2.8B, Vt+3.8B }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(byte* address, (Vector64 value1, Vector64 value2, Vector64 value3, Vector64 value4) value, [ConstantExpected(Max = (byte)(7))] byte index) { throw new PlatformNotSupportedException(); } + + /// + /// A64: ST4 { Vt.8B, Vt+1.8B, Vt+2.8B, Vt+3.8B }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(sbyte* address, (Vector64 value1, Vector64 value2, Vector64 value3, Vector64 value4) value, [ConstantExpected(Max = (byte)(7))] byte index) { throw new PlatformNotSupportedException(); } + + /// + /// A64: ST4 { Vt.4H, Vt+1.4H, Vt+2.4H, Vt+3.4H }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(short* address, (Vector64 value1, Vector64 value2, Vector64 value3, Vector64 value4) value, [ConstantExpected(Max = (byte)(3))] byte index) { throw new PlatformNotSupportedException(); } + + /// + /// A64: ST4 { Vt.4H, Vt+1.4H, Vt+2.4H, Vt+3.4H }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(ushort* address, (Vector64 value1, Vector64 value2, Vector64 value3, Vector64 value4) value, [ConstantExpected(Max = (byte)(3))] byte index) { throw new PlatformNotSupportedException(); } + + /// + /// A64: ST4 { Vt.2S, Vt+1.2S, Vt+2.2S, Vt+3.2S }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(int* address, (Vector64 value1, Vector64 value2, Vector64 value3, Vector64 value4) value, [ConstantExpected(Max = (byte)(1))] byte index) { throw new PlatformNotSupportedException(); } + + /// + /// A64: ST4 { Vt.2S, Vt+1.2S, Vt+2.2S, Vt+3.2S }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(uint* address, (Vector64 value1, Vector64 value2, Vector64 value3, Vector64 value4) value, [ConstantExpected(Max = (byte)(1))] byte index) { throw new PlatformNotSupportedException(); } + + /// + /// A64: ST4 { Vt.2S, Vt+1.2S, Vt+2.2S, Vt+3.2S }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(float* address, (Vector64 value1, Vector64 value2, Vector64 value3, Vector64 value4) value, [ConstantExpected(Max = (byte)(1))] byte index) { throw new PlatformNotSupportedException(); } + /// /// A64: ST2 { Vn.8B, Vn+1.8B }, [Xn] /// diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Arm/AdvSimd.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Arm/AdvSimd.cs index bbdfad39422d5..97bf19cde73e6 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Arm/AdvSimd.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Arm/AdvSimd.cs @@ -3774,6 +3774,177 @@ internal Arm64() { } /// public static unsafe void StorePairScalarNonTemporal(uint* address, Vector64 value1, Vector64 value2) => StorePairScalarNonTemporal(address, value1, value2); + /// + /// void vst2_lane_s8 (int8_t * ptr, int8x16x2_t val, const int lane) + /// A64: ST2 { Vt.16B, Vt+1.16B }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(byte* address, (Vector128 value1, Vector128 value2) value, [ConstantExpected(Max = (byte)(15))] byte index) => StoreSelectedScalar(address, value, index); + + /// + /// void vst2_lane_s8 (int8_t * ptr, int8x16x2_t val, const int lane) + /// A64: ST2 { Vt.16B, Vt+1.16B }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(sbyte* address, (Vector128 value1, Vector128 value2) value, [ConstantExpected(Max = (byte)(15))] byte index) => StoreSelectedScalar(address, value, index); + + /// + /// void vst2_lane_s16 (int16_t * ptr, int16x8x2_t val, const int lane) + /// A64: ST2 { Vt.8H, Vt+1.8H }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(short* address, (Vector128 value1, Vector128 value2) value, [ConstantExpected(Max = (byte)(7))] byte index) => StoreSelectedScalar(address, value, index); + + /// + /// void vst2_lane_s16 (int16_t * ptr, int16x8x2_t val, const int lane) + /// A64: ST2 { Vt.8H, Vt+1.8H }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(ushort* address, (Vector128 value1, Vector128 value2) value, [ConstantExpected(Max = (byte)(7))] byte index) => StoreSelectedScalar(address, value, index); + + /// + /// void vst2_lane_s32 (int32_t * ptr, int32x4x2_t val, const int lane) + /// A64: ST2 { Vt.4S, Vt+1.4S }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(int* address, (Vector128 value1, Vector128 value2) value, [ConstantExpected(Max = (byte)(3))] byte index) => StoreSelectedScalar(address, value, index); + + /// + /// void vst2_lane_s32 (int32_t * ptr, int32x4x2_t val, const int lane) + /// A64: ST2 { Vt.4S, Vt+1.4S }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(uint* address, (Vector128 value1, Vector128 value2) value, [ConstantExpected(Max = (byte)(3))] byte index) => StoreSelectedScalar(address, value, index); + + /// + /// A64: ST2 { Vt.2D, Vt+1.2D }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(long* address, (Vector128 value1, Vector128 value2) value, [ConstantExpected(Max = (byte)(1))] byte index) => StoreSelectedScalar(address, value, index); + + /// + /// A64: ST2 { Vt.2D, Vt+1.2D }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(ulong* address, (Vector128 value1, Vector128 value2) value, [ConstantExpected(Max = (byte)(1))] byte index) => StoreSelectedScalar(address, value, index); + + /// + /// void vst2_lane_f32 (float32_t * ptr, float32x2x2_t val, const int lane) + /// A64: ST2 { Vt.4S, Vt+1.4S }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(float* address, (Vector128 value1, Vector128 value2) value, [ConstantExpected(Max = (byte)(3))] byte index) => StoreSelectedScalar(address, value, index); + + /// + /// A64: ST2 { Vt.2D, Vt+1.2D }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(double* address, (Vector128 value1, Vector128 value2) value, [ConstantExpected(Max = (byte)(1))] byte index) => StoreSelectedScalar(address, value, index); + + /// + /// void vst3_lane_s8 (int8_t * ptr, int8x16x3_t val, const int lane) + /// A64: ST3 { Vt.16B, Vt+1.16B, Vt+2.16B }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(byte* address, (Vector128 value1, Vector128 value2, Vector128 value3) value, [ConstantExpected(Max = (byte)(15))] byte index) => StoreSelectedScalar(address, value, index); + + /// + /// void vst3_lane_s8 (int8_t * ptr, int8x16x3_t val, const int lane) + /// A64: ST3 { Vt.16B, Vt+1.16B, Vt+2.16B }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(sbyte* address, (Vector128 value1, Vector128 value2, Vector128 value3) value, [ConstantExpected(Max = (byte)(15))] byte index) => StoreSelectedScalar(address, value, index); + + /// + /// void vst3_lane_s16 (int16_t * ptr, int16x8x3_t val, const int lane) + /// A64: ST3 { Vt.8H, Vt+1.8H, Vt+2.8H }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(short* address, (Vector128 value1, Vector128 value2, Vector128 value3) value, [ConstantExpected(Max = (byte)(7))] byte index) => StoreSelectedScalar(address, value, index); + + /// + /// void vst3_lane_s16 (int16_t * ptr, int16x8x3_t val, const int lane) + /// A64: ST3 { Vt.8H, Vt+1.8H, Vt+2.8H }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(ushort* address, (Vector128 value1, Vector128 value2, Vector128 value3) value, [ConstantExpected(Max = (byte)(7))] byte index) => StoreSelectedScalar(address, value, index); + + /// + /// void vst3_lane_s32 (int32_t * ptr, int32x4x3_t val, const int lane) + /// A64: ST3 { Vt.4S, Vt+1.4S, Vt+2.4S }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(int* address, (Vector128 value1, Vector128 value2, Vector128 value3) value, [ConstantExpected(Max = (byte)(3))] byte index) => StoreSelectedScalar(address, value, index); + + /// + /// void vst3_lane_s32 (int32_t * ptr, int32x4x3_t val, const int lane) + /// A64: ST3 { Vt.4S, Vt+1.4S, Vt+2.4S }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(uint* address, (Vector128 value1, Vector128 value2, Vector128 value3) value, [ConstantExpected(Max = (byte)(3))] byte index) => StoreSelectedScalar(address, value, index); + + /// + /// A64: ST3 { Vt.2D, Vt+1.2D, Vt+2.2D }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(long* address, (Vector128 value1, Vector128 value2, Vector128 value3) value, [ConstantExpected(Max = (byte)(1))] byte index) => StoreSelectedScalar(address, value, index); + + /// + /// A64: ST3 { Vt.2D, Vt+1.2D, Vt+2.2D }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(ulong* address, (Vector128 value1, Vector128 value2, Vector128 value3) value, [ConstantExpected(Max = (byte)(1))] byte index) => StoreSelectedScalar(address, value, index); + + /// + /// void vst3_lane_f32 (float32_t * ptr, float32x2x3_t val, const int lane) + /// A64: ST3 { Vt.4S, Vt+1.4S, Vt+2.4S }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(float* address, (Vector128 value1, Vector128 value2, Vector128 value3) value, [ConstantExpected(Max = (byte)(3))] byte index) => StoreSelectedScalar(address, value, index); + + /// + /// A64: ST3 { Vt.2D, Vt+1.2D, Vt+2.2D }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(double* address, (Vector128 value1, Vector128 value2, Vector128 value3) value, [ConstantExpected(Max = (byte)(1))] byte index) => StoreSelectedScalar(address, value, index); + + /// + /// void vst4_lane_s8 (int8_t * ptr, int8x16x4_t val, const int lane) + /// A64: ST4 { Vt.16B, Vt+1.16B, Vt+2.16B, Vt+3.16B }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(byte* address, (Vector128 value1, Vector128 value2, Vector128 value3, Vector128 value4) value, [ConstantExpected(Max = (byte)(15))] byte index) => StoreSelectedScalar(address, value, index); + + /// + /// void vst4_lane_s8 (int8_t * ptr, int8x16x4_t val, const int lane) + /// A64: ST4 { Vt.16B, Vt+1.16B, Vt+2.16B, Vt+3.16B }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(sbyte* address, (Vector128 value1, Vector128 value2, Vector128 value3, Vector128 value4) value, [ConstantExpected(Max = (byte)(15))] byte index) => StoreSelectedScalar(address, value, index); + + /// + /// void vst4_lane_s16 (int16_t * ptr, int16x8x4_t val, const int lane) + /// A64: ST4 { Vt.8H, Vt+1.8H, Vt+2.8H, Vt+3.8H }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(short* address, (Vector128 value1, Vector128 value2, Vector128 value3, Vector128 value4) value, [ConstantExpected(Max = (byte)(7))] byte index) => StoreSelectedScalar(address, value, index); + + /// + /// void vst4_lane_s16 (int16_t * ptr, int16x8x4_t val, const int lane) + /// A64: ST4 { Vt.8H, Vt+1.8H, Vt+2.8H, Vt+3.8H }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(ushort* address, (Vector128 value1, Vector128 value2, Vector128 value3, Vector128 value4) value, [ConstantExpected(Max = (byte)(7))] byte index) => StoreSelectedScalar(address, value, index); + + /// + /// void vst4_lane_s32 (int32_t * ptr, int32x4x4_t val, const int lane) + /// A64: ST4 { Vt.4S, Vt+1.4S, Vt+2.4S, Vt+3.4S }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(int* address, (Vector128 value1, Vector128 value2, Vector128 value3, Vector128 value4) value, [ConstantExpected(Max = (byte)(3))] byte index) => StoreSelectedScalar(address, value, index); + + /// + /// void vst4_lane_s32 (int32_t * ptr, int32x4x4_t val, const int lane) + /// A64: ST4 { Vt.4S, Vt+1.4S, Vt+2.4S, Vt+3.4S }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(uint* address, (Vector128 value1, Vector128 value2, Vector128 value3, Vector128 value4) value, [ConstantExpected(Max = (byte)(3))] byte index) => StoreSelectedScalar(address, value, index); + + /// + /// A64: ST4 { Vt.2D, Vt+1.2D, Vt+2.2D, Vt+3.2D }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(long* address, (Vector128 value1, Vector128 value2, Vector128 value3, Vector128 value4) value, [ConstantExpected(Max = (byte)(1))] byte index) => StoreSelectedScalar(address, value, index); + + /// + /// A64: ST4 { Vt.2D, Vt+1.2D, Vt+2.2D, Vt+3.2D }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(ulong* address, (Vector128 value1, Vector128 value2, Vector128 value3, Vector128 value4) value, [ConstantExpected(Max = (byte)(1))] byte index) => StoreSelectedScalar(address, value, index); + + /// + /// void vst4_lane_f32 (float32_t * ptr, float32x2x4_t val, const int lane) + /// A64: ST4 { Vt.4S, Vt+1.4S, Vt+2.4S, Vt+3.4S }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(float* address, (Vector128 value1, Vector128 value2, Vector128 value3, Vector128 value4) value, [ConstantExpected(Max = (byte)(3))] byte index) => StoreSelectedScalar(address, value, index); + + /// + /// A64: ST3 { Vt.2D, Vt+1.2D, Vt+2.2D, Vt+3.2D }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(double* address, (Vector128 value1, Vector128 value2, Vector128 value3, Vector128 value4) value, [ConstantExpected(Max = (byte)(1))] byte index) => StoreSelectedScalar(address, value, index); + /// /// A64: ST2 { Vn.16B, Vn+1.16B }, [Xn] /// @@ -15754,6 +15925,111 @@ internal Arm64() { } /// public static unsafe void StoreSelectedScalar(ulong* address, Vector128 value, [ConstantExpected(Max = (byte)(1))] byte index) => StoreSelectedScalar(address, value, index); + /// + /// A64: ST2 { Vt.8B, Vt+1.8B }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(byte* address, (Vector64 value1, Vector64 value2) value, [ConstantExpected(Max = (byte)(7))] byte index) => StoreSelectedScalar(address, value, index); + + /// + /// A64: ST2 { Vt.8B, Vt+1.8B }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(sbyte* address, (Vector64 value1, Vector64 value2) value, [ConstantExpected(Max = (byte)(7))] byte index) => StoreSelectedScalar(address, value, index); + + /// + /// A64: ST2 { Vt.4H, Vt+1.4H }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(short* address, (Vector64 value1, Vector64 value2) value, [ConstantExpected(Max = (byte)(3))] byte index) => StoreSelectedScalar(address, value, index); + + /// + /// A64: ST2 { Vt.4H, Vt+1.4H }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(ushort* address, (Vector64 value1, Vector64 value2) value, [ConstantExpected(Max = (byte)(3))] byte index) => StoreSelectedScalar(address, value, index); + + /// + /// A64: ST2 { Vt.2S, Vt+1.2S }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(int* address, (Vector64 value1, Vector64 value2) value, [ConstantExpected(Max = (byte)(1))] byte index) => StoreSelectedScalar(address, value, index); + + /// + /// A64: ST2 { Vt.2S, Vt+1.2S }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(uint* address, (Vector64 value1, Vector64 value2) value, [ConstantExpected(Max = (byte)(1))] byte index) => StoreSelectedScalar(address, value, index); + + /// + /// A64: ST2 { Vt.2S, Vt+1.2S }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(float* address, (Vector64 value1, Vector64 value2) value, [ConstantExpected(Max = (byte)(1))] byte index) => StoreSelectedScalar(address, value, index); + + /// + /// A64: ST3 { Vt.8B, Vt+1.8B, Vt+2.8B }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(byte* address, (Vector64 value1, Vector64 value2, Vector64 value3) value, [ConstantExpected(Max = (byte)(7))] byte index) => StoreSelectedScalar(address, value, index); + + /// + /// A64: ST3 { Vt.8B, Vt+1.8B, Vt+2.8B }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(sbyte* address, (Vector64 value1, Vector64 value2, Vector64 value3) value, [ConstantExpected(Max = (byte)(7))] byte index) => StoreSelectedScalar(address, value, index); + + /// + /// A64: ST3 { Vt.4H, Vt+1.4H, Vt+2.4H }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(short* address, (Vector64 value1, Vector64 value2, Vector64 value3) value, [ConstantExpected(Max = (byte)(3))] byte index) => StoreSelectedScalar(address, value, index); + + /// + /// A64: ST3 { Vt.4H, Vt+1.4H, Vt+2.4H }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(ushort* address, (Vector64 value1, Vector64 value2, Vector64 value3) value, [ConstantExpected(Max = (byte)(3))] byte index) => StoreSelectedScalar(address, value, index); + + /// + /// A64: ST3 { Vt.2S, Vt+1.2S, Vt+2.2S }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(int* address, (Vector64 value1, Vector64 value2, Vector64 value3) value, [ConstantExpected(Max = (byte)(1))] byte index) => StoreSelectedScalar(address, value, index); + + /// + /// A64: ST3 { Vt.2S, Vt+1.2S, Vt+2.2S }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(uint* address, (Vector64 value1, Vector64 value2, Vector64 value3) value, [ConstantExpected(Max = (byte)(1))] byte index) => StoreSelectedScalar(address, value, index); + + /// + /// A64: ST2 { Vt.2S, Vt+1.2S, Vt+2.2S }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(float* address, (Vector64 value1, Vector64 value2, Vector64 value3) value, [ConstantExpected(Max = (byte)(1))] byte index) => StoreSelectedScalar(address, value, index); + + /// + /// A64: ST4 { Vt.8B, Vt+1.8B, Vt+2.8B, Vt+3.8B }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(byte* address, (Vector64 value1, Vector64 value2, Vector64 value3, Vector64 value4) value, [ConstantExpected(Max = (byte)(7))] byte index) => StoreSelectedScalar(address, value, index); + + /// + /// A64: ST4 { Vt.8B, Vt+1.8B, Vt+2.8B, Vt+3.8B }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(sbyte* address, (Vector64 value1, Vector64 value2, Vector64 value3, Vector64 value4) value, [ConstantExpected(Max = (byte)(7))] byte index) => StoreSelectedScalar(address, value, index); + + /// + /// A64: ST4 { Vt.4H, Vt+1.4H, Vt+2.4H, Vt+3.4H }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(short* address, (Vector64 value1, Vector64 value2, Vector64 value3, Vector64 value4) value, [ConstantExpected(Max = (byte)(3))] byte index) => StoreSelectedScalar(address, value, index); + + /// + /// A64: ST4 { Vt.4H, Vt+1.4H, Vt+2.4H, Vt+3.4H }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(ushort* address, (Vector64 value1, Vector64 value2, Vector64 value3, Vector64 value4) value, [ConstantExpected(Max = (byte)(3))] byte index) => StoreSelectedScalar(address, value, index); + + /// + /// A64: ST4 { Vt.2S, Vt+1.2S, Vt+2.2S, Vt+3.2S }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(int* address, (Vector64 value1, Vector64 value2, Vector64 value3, Vector64 value4) value, [ConstantExpected(Max = (byte)(1))] byte index) => StoreSelectedScalar(address, value, index); + + /// + /// A64: ST4 { Vt.2S, Vt+1.2S, Vt+2.2S, Vt+3.2S }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(uint* address, (Vector64 value1, Vector64 value2, Vector64 value3, Vector64 value4) value, [ConstantExpected(Max = (byte)(1))] byte index) => StoreSelectedScalar(address, value, index); + + /// + /// A64: ST4 { Vt.2S, Vt+1.2S, Vt+2.2S, Vt+3.2S }[index], [Xn] + /// + public static unsafe void StoreSelectedScalar(float* address, (Vector64 value1, Vector64 value2, Vector64 value3, Vector64 value4) value, [ConstantExpected(Max = (byte)(1))] byte index) => StoreSelectedScalar(address, value, index); + /// /// A64: ST2 { Vn.8B, Vn+1.8B }, [Xn] /// diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/MemoryFailPoint.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/MemoryFailPoint.cs index 3b2c6b93a7cd7..1a669dafc98ed 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/MemoryFailPoint.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/MemoryFailPoint.cs @@ -12,9 +12,9 @@ ** ===========================================================*/ -using System.Threading; -using System.Runtime.ConstrainedExecution; using System.Diagnostics; +using System.Runtime.ConstrainedExecution; +using System.Threading; /* This class allows an application to fail before starting certain diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/Serialization/SerializationInfo.SerializationGuard.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/Serialization/SerializationInfo.SerializationGuard.cs index bef1d6b0240e5..13e55ac6c8b42 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/Serialization/SerializationInfo.SerializationGuard.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/Serialization/SerializationInfo.SerializationGuard.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Diagnostics; using System.Security; using System.Threading; -using System.Diagnostics; namespace System.Runtime.Serialization { diff --git a/src/libraries/System.Private.CoreLib/src/System/SearchValues/Strings/Helpers/AhoCorasickNode.cs b/src/libraries/System.Private.CoreLib/src/System/SearchValues/Strings/Helpers/AhoCorasickNode.cs index d5d0c03c67c86..9f408d2a8ee21 100644 --- a/src/libraries/System.Private.CoreLib/src/System/SearchValues/Strings/Helpers/AhoCorasickNode.cs +++ b/src/libraries/System.Private.CoreLib/src/System/SearchValues/Strings/Helpers/AhoCorasickNode.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; namespace System.Buffers diff --git a/src/libraries/System.Private.CoreLib/src/System/Security/PermissionSet.cs b/src/libraries/System.Private.CoreLib/src/System/Security/PermissionSet.cs index 48b906c60cfff..d97024ae147f3 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Security/PermissionSet.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Security/PermissionSet.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Security.Permissions; using System.Collections; using System.Runtime.Serialization; +using System.Security.Permissions; namespace System.Security { diff --git a/src/libraries/System.Private.CoreLib/src/System/StartupHookProvider.cs b/src/libraries/System.Private.CoreLib/src/System/StartupHookProvider.cs index 8ac1864e1140e..ed2269d99f669 100644 --- a/src/libraries/System.Private.CoreLib/src/System/StartupHookProvider.cs +++ b/src/libraries/System.Private.CoreLib/src/System/StartupHookProvider.cs @@ -4,8 +4,8 @@ using System; using System.Collections.Generic; using System.Diagnostics; -using System.Diagnostics.Tracing; using System.Diagnostics.CodeAnalysis; +using System.Diagnostics.Tracing; using System.IO; using System.Reflection; using System.Runtime.Loader; diff --git a/src/libraries/System.Private.CoreLib/src/System/Text/Encoding.cs b/src/libraries/System.Private.CoreLib/src/System/Text/Encoding.cs index 9935024ae8fc3..5e4e6c696739e 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Text/Encoding.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Text/Encoding.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Diagnostics; using System.Collections.Generic; +using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.IO; diff --git a/src/libraries/System.Private.CoreLib/src/System/Text/Unicode/Utf16Utility.Validation.cs b/src/libraries/System.Private.CoreLib/src/System/Text/Unicode/Utf16Utility.Validation.cs index 01ad421b91586..4843b66101fe2 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Text/Unicode/Utf16Utility.Validation.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Text/Unicode/Utf16Utility.Validation.cs @@ -1,13 +1,13 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Buffers.Text; using System.Diagnostics; +using System.Numerics; using System.Runtime.CompilerServices; using System.Runtime.Intrinsics; using System.Runtime.Intrinsics.Arm; using System.Runtime.Intrinsics.X86; -using System.Numerics; -using System.Buffers.Text; namespace System.Text.Unicode { diff --git a/src/libraries/System.Private.CoreLib/src/System/Text/Unicode/Utf16Utility.cs b/src/libraries/System.Private.CoreLib/src/System/Text/Unicode/Utf16Utility.cs index 2057d02c1570f..8961529dfed83 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Text/Unicode/Utf16Utility.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Text/Unicode/Utf16Utility.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Runtime.CompilerServices; using System.Diagnostics; +using System.Runtime.CompilerServices; using System.Runtime.Intrinsics; namespace System.Text.Unicode diff --git a/src/libraries/System.Private.CoreLib/src/System/Threading/EventWaitHandle.Unix.cs b/src/libraries/System.Private.CoreLib/src/System/Threading/EventWaitHandle.Unix.cs index bb7db725084c8..cf87d680dd62f 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Threading/EventWaitHandle.Unix.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Threading/EventWaitHandle.Unix.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Diagnostics; using System.IO; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; namespace System.Threading { diff --git a/src/libraries/System.Private.CoreLib/src/System/Threading/Mutex.Unix.cs b/src/libraries/System.Private.CoreLib/src/System/Threading/Mutex.Unix.cs index 2f6e63aacec79..12bce9b1aa44e 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Threading/Mutex.Unix.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Threading/Mutex.Unix.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Diagnostics; using System.IO; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; namespace System.Threading { diff --git a/src/libraries/System.Private.CoreLib/src/System/Threading/Mutex.Windows.cs b/src/libraries/System.Private.CoreLib/src/System/Threading/Mutex.Windows.cs index 07eb21b084980..6c5a6a38da21e 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Threading/Mutex.Windows.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Threading/Mutex.Windows.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.IO; -using Microsoft.Win32.SafeHandles; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; namespace System.Threading { diff --git a/src/libraries/System.Private.CoreLib/src/System/Threading/Mutex.cs b/src/libraries/System.Private.CoreLib/src/System/Threading/Mutex.cs index a0ee43673bc9c..d2a945fd37eba 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Threading/Mutex.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Threading/Mutex.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.IO; +using Microsoft.Win32.SafeHandles; namespace System.Threading { diff --git a/src/libraries/System.Private.CoreLib/src/System/Threading/RegisteredWaitHandle.Windows.cs b/src/libraries/System.Private.CoreLib/src/System/Threading/RegisteredWaitHandle.Windows.cs index 7f1d1309f1056..73cd2b614c921 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Threading/RegisteredWaitHandle.Windows.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Threading/RegisteredWaitHandle.Windows.cs @@ -1,12 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Diagnostics; using System.Runtime; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; +using Microsoft.Win32.SafeHandles; namespace System.Threading { diff --git a/src/libraries/System.Private.CoreLib/src/System/Threading/RegisteredWaitHandle.WindowsThreadPool.cs b/src/libraries/System.Private.CoreLib/src/System/Threading/RegisteredWaitHandle.WindowsThreadPool.cs index 0c40f7545c1ab..3b7047849b438 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Threading/RegisteredWaitHandle.WindowsThreadPool.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Threading/RegisteredWaitHandle.WindowsThreadPool.cs @@ -1,13 +1,13 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Diagnostics; using System.Diagnostics.Tracing; using System.Runtime; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; +using Microsoft.Win32.SafeHandles; namespace System.Threading { diff --git a/src/libraries/System.Private.CoreLib/src/System/Threading/Semaphore.Unix.cs b/src/libraries/System.Private.CoreLib/src/System/Threading/Semaphore.Unix.cs index bb2a1d6441645..df219a8ca7d80 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Threading/Semaphore.Unix.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Threading/Semaphore.Unix.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Diagnostics; using System.IO; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; namespace System.Threading { diff --git a/src/libraries/System.Private.CoreLib/src/System/Threading/Semaphore.Windows.cs b/src/libraries/System.Private.CoreLib/src/System/Threading/Semaphore.Windows.cs index 027e9fe93f468..adf4b94ec5c31 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Threading/Semaphore.Windows.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Threading/Semaphore.Windows.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Diagnostics; using System.IO; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; namespace System.Threading { diff --git a/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/TplEventSource.cs b/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/TplEventSource.cs index 8239fcd57e5cc..c80e3f300e5d8 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/TplEventSource.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/TplEventSource.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Diagnostics.Tracing; using System.Diagnostics.CodeAnalysis; +using System.Diagnostics.Tracing; using System.Runtime.CompilerServices; namespace System.Threading.Tasks diff --git a/src/libraries/System.Private.CoreLib/src/System/Threading/Thread.Unix.cs b/src/libraries/System.Private.CoreLib/src/System/Threading/Thread.Unix.cs index 9606b7a3bb66c..895cbac36a3f9 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Threading/Thread.Unix.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Threading/Thread.Unix.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Diagnostics; using System.Runtime; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; namespace System.Threading { diff --git a/src/libraries/System.Private.CoreLib/src/System/Threading/Thread.Windows.cs b/src/libraries/System.Private.CoreLib/src/System/Threading/Thread.Windows.cs index 0c0b53441d808..e4cb87cc89404 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Threading/Thread.Windows.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Threading/Thread.Windows.cs @@ -1,11 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Diagnostics; using System.Runtime; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; namespace System.Threading { diff --git a/src/libraries/System.Private.CoreLib/src/System/Threading/Thread.cs b/src/libraries/System.Private.CoreLib/src/System/Threading/Thread.cs index 5cc867a9e02c8..0d1ad38269a28 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Threading/Thread.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Threading/Thread.cs @@ -7,8 +7,8 @@ using System.Globalization; using System.Runtime.CompilerServices; using System.Runtime.ConstrainedExecution; -using System.Security.Principal; using System.Runtime.Versioning; +using System.Security.Principal; namespace System.Threading { diff --git a/src/libraries/System.Private.CoreLib/src/System/Threading/ThreadPoolBoundHandle.WindowsThreadPool.cs b/src/libraries/System.Private.CoreLib/src/System/Threading/ThreadPoolBoundHandle.WindowsThreadPool.cs index cff6943f5837e..a25aeddc9dd38 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Threading/ThreadPoolBoundHandle.WindowsThreadPool.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Threading/ThreadPoolBoundHandle.WindowsThreadPool.cs @@ -1,13 +1,13 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Diagnostics; using System.Diagnostics.Tracing; +using System.IO; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Threading; -using System.IO; +using Microsoft.Win32.SafeHandles; namespace System.Threading { diff --git a/src/libraries/System.Private.CoreLib/src/System/Threading/WindowsThreadPool.cs b/src/libraries/System.Private.CoreLib/src/System/Threading/WindowsThreadPool.cs index cc2b534aded78..6b3ae288e37af 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Threading/WindowsThreadPool.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Threading/WindowsThreadPool.cs @@ -1,13 +1,13 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Diagnostics; using System.Diagnostics.Tracing; using System.Runtime; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; +using Microsoft.Win32.SafeHandles; namespace System.Threading { diff --git a/src/libraries/System.Private.CoreLib/src/System/ThrowHelper.cs b/src/libraries/System.Private.CoreLib/src/System/ThrowHelper.cs index 79f12c11feb40..100222ef29deb 100644 --- a/src/libraries/System.Private.CoreLib/src/System/ThrowHelper.cs +++ b/src/libraries/System.Private.CoreLib/src/System/ThrowHelper.cs @@ -976,8 +976,6 @@ private static string GetArgumentName(ExceptionArgument argument) return "other"; case ExceptionArgument.newSize: return "newSize"; - case ExceptionArgument.lowerBounds: - return "lowerBounds"; case ExceptionArgument.lengths: return "lengths"; case ExceptionArgument.len: @@ -992,12 +990,6 @@ private static string GetArgumentName(ExceptionArgument argument) return "index2"; case ExceptionArgument.index3: return "index3"; - case ExceptionArgument.length1: - return "length1"; - case ExceptionArgument.length2: - return "length2"; - case ExceptionArgument.length3: - return "length3"; case ExceptionArgument.endIndex: return "endIndex"; case ExceptionArgument.elementType: @@ -1030,6 +1022,8 @@ private static string GetArgumentName(ExceptionArgument argument) return "overlapped"; case ExceptionArgument.minimumBytes: return "minimumBytes"; + case ExceptionArgument.arrayType: + return "arrayType"; case ExceptionArgument.divisor: return "divisor"; case ExceptionArgument.factor: @@ -1212,6 +1206,8 @@ private static string GetResourceString(ExceptionResource resource) return SR.Format_UnclosedFormatItem; case ExceptionResource.Format_ExpectedAsciiDigit: return SR.Format_ExpectedAsciiDigit; + case ExceptionResource.Argument_HasToBeArrayClass: + return SR.Argument_HasToBeArrayClass; default: Debug.Fail("The enum value is not defined, please check the ExceptionResource Enum."); return ""; @@ -1296,7 +1292,6 @@ internal enum ExceptionArgument handle, other, newSize, - lowerBounds, lengths, len, keys, @@ -1304,9 +1299,6 @@ internal enum ExceptionArgument index1, index2, index3, - length1, - length2, - length3, endIndex, elementType, arrayIndex, @@ -1323,6 +1315,7 @@ internal enum ExceptionArgument anyOf, overlapped, minimumBytes, + arrayType, divisor, factor, } @@ -1410,5 +1403,6 @@ internal enum ExceptionResource Format_UnexpectedClosingBrace, Format_UnclosedFormatItem, Format_ExpectedAsciiDigit, + Argument_HasToBeArrayClass, } } diff --git a/src/libraries/System.Private.CoreLib/src/System/TimeOnly.cs b/src/libraries/System.Private.CoreLib/src/System/TimeOnly.cs index 65d80ce153450..19cd8d65a0173 100644 --- a/src/libraries/System.Private.CoreLib/src/System/TimeOnly.cs +++ b/src/libraries/System.Private.CoreLib/src/System/TimeOnly.cs @@ -1,11 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.ComponentModel; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; -using System.Numerics; using System.Globalization; -using System.ComponentModel; +using System.Numerics; namespace System { diff --git a/src/libraries/System.Private.CoreLib/src/System/TimeZone.cs b/src/libraries/System.Private.CoreLib/src/System/TimeZone.cs index c2f519c31a570..f8796313cc1cf 100644 --- a/src/libraries/System.Private.CoreLib/src/System/TimeZone.cs +++ b/src/libraries/System.Private.CoreLib/src/System/TimeZone.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Threading; using System.Globalization; +using System.Threading; namespace System { diff --git a/src/libraries/System.Private.CoreLib/src/System/TimeZoneInfo.FullGlobalizationData.Unix.cs b/src/libraries/System.Private.CoreLib/src/System/TimeZoneInfo.FullGlobalizationData.Unix.cs index 1703114fabea3..9eb98e97f134e 100644 --- a/src/libraries/System.Private.CoreLib/src/System/TimeZoneInfo.FullGlobalizationData.Unix.cs +++ b/src/libraries/System.Private.CoreLib/src/System/TimeZoneInfo.FullGlobalizationData.Unix.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Diagnostics; using System.Globalization; using System.Threading; -using System.Diagnostics; namespace System { diff --git a/src/libraries/System.Private.CoreLib/src/System/TimeZoneInfo.Unix.cs b/src/libraries/System.Private.CoreLib/src/System/TimeZoneInfo.Unix.cs index d6b370b7210a6..28d3c23a69efc 100644 --- a/src/libraries/System.Private.CoreLib/src/System/TimeZoneInfo.Unix.cs +++ b/src/libraries/System.Private.CoreLib/src/System/TimeZoneInfo.Unix.cs @@ -7,9 +7,9 @@ using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.IO; +using System.Security; using System.Text; using System.Threading; -using System.Security; using Microsoft.Win32.SafeHandles; namespace System diff --git a/src/libraries/System.Private.CoreLib/src/System/TimeZoneInfo.Win32.cs b/src/libraries/System.Private.CoreLib/src/System/TimeZoneInfo.Win32.cs index 1bee4bd2127b0..20e22312d8677 100644 --- a/src/libraries/System.Private.CoreLib/src/System/TimeZoneInfo.Win32.cs +++ b/src/libraries/System.Private.CoreLib/src/System/TimeZoneInfo.Win32.cs @@ -8,12 +8,10 @@ using System.Runtime.InteropServices; using System.Security; using System.Threading; - using Internal.Win32; - using REG_TZI_FORMAT = Interop.Kernel32.REG_TZI_FORMAT; -using TIME_ZONE_INFORMATION = Interop.Kernel32.TIME_ZONE_INFORMATION; using TIME_DYNAMIC_ZONE_INFORMATION = Interop.Kernel32.TIME_DYNAMIC_ZONE_INFORMATION; +using TIME_ZONE_INFORMATION = Interop.Kernel32.TIME_ZONE_INFORMATION; namespace System { diff --git a/src/libraries/System.Private.CoreLib/src/System/Type.Enum.cs b/src/libraries/System.Private.CoreLib/src/System/Type.Enum.cs index 7793d2c50539c..97d1a397d0dea 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Type.Enum.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Type.Enum.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Diagnostics.CodeAnalysis; -using System.Reflection; using System.Collections; using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; +using System.Reflection; namespace System { diff --git a/src/libraries/System.Private.CoreLib/src/System/ValueTuple.cs b/src/libraries/System.Private.CoreLib/src/System/ValueTuple.cs index aa919ea294f78..77f7dbe141f49 100644 --- a/src/libraries/System.Private.CoreLib/src/System/ValueTuple.cs +++ b/src/libraries/System.Private.CoreLib/src/System/ValueTuple.cs @@ -7,8 +7,8 @@ using System.Collections.Generic; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; -using System.Runtime.InteropServices; using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; namespace System { diff --git a/src/libraries/System.Private.CoreLib/src/System/WeakReference.T.cs b/src/libraries/System.Private.CoreLib/src/System/WeakReference.T.cs index 315f6b90c3e0d..07e854c4c7aa8 100644 --- a/src/libraries/System.Private.CoreLib/src/System/WeakReference.T.cs +++ b/src/libraries/System.Private.CoreLib/src/System/WeakReference.T.cs @@ -2,12 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.ComponentModel; -using System.Runtime.Serialization; +using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -using System.Diagnostics.CodeAnalysis; -using System.Diagnostics; - +using System.Runtime.Serialization; using static System.WeakReferenceHandleTags; namespace System diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/DateTimeOffsetAdapter.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/DateTimeOffsetAdapter.cs index 60a68c81f7074..1c759ae843e9c 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/DateTimeOffsetAdapter.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/DateTimeOffsetAdapter.cs @@ -2,9 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; +using System.Globalization; using System.Reflection; using System.Xml; -using System.Globalization; namespace System.Runtime.Serialization diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/ExtensionDataObject.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/ExtensionDataObject.cs index 6004b41c84e3c..1a2ac78ad0e16 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/ExtensionDataObject.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/ExtensionDataObject.cs @@ -2,9 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Xml; using System.Collections.Generic; using System.Globalization; +using System.Xml; namespace System.Runtime.Serialization { diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/HybridObjectCache.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/HybridObjectCache.cs index 043746400e5ef..df9db7bbc3efa 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/HybridObjectCache.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/HybridObjectCache.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Xml; using System.Collections.Generic; +using System.Xml; namespace System.Runtime.Serialization diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/IXmlJsonReaderInitializer.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/IXmlJsonReaderInitializer.cs index 6986ae6781f23..3df08c3859b11 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/IXmlJsonReaderInitializer.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/IXmlJsonReaderInitializer.cs @@ -2,9 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.IO; +using System.Runtime.CompilerServices; using System.Text; using System.Xml; -using System.Runtime.CompilerServices; namespace System.Runtime.Serialization.Json { diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/IXmlJsonWriterInitializer.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/IXmlJsonWriterInitializer.cs index 6a879f767d55c..1743055231c03 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/IXmlJsonWriterInitializer.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/IXmlJsonWriterInitializer.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.IO; -using System.Text; using System.Runtime.CompilerServices; +using System.Text; namespace System.Runtime.Serialization.Json { diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/JsonFormatGeneratorStatics.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/JsonFormatGeneratorStatics.cs index b094e6fcde688..ff78bb15130c6 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/JsonFormatGeneratorStatics.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/JsonFormatGeneratorStatics.cs @@ -3,12 +3,12 @@ using System; using System.Collections; -using System.Reflection; -using System.Xml; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; +using System.Reflection; using System.Runtime.Serialization.DataContracts; using System.Runtime.Serialization.Json; +using System.Xml; namespace System.Runtime.Serialization { diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/JsonGlobals.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/JsonGlobals.cs index f82749032851b..c80d82f653f26 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/JsonGlobals.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/JsonGlobals.cs @@ -1,11 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Reflection; using System.Runtime.Serialization; -using System.Xml; using System.Security; -using System.Reflection; using System.Text; +using System.Xml; namespace System.Runtime.Serialization.Json diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/JsonReaderDelegator.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/JsonReaderDelegator.cs index 177463c0b9297..039e865343bc1 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/JsonReaderDelegator.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/JsonReaderDelegator.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Xml; -using System.Runtime.Serialization; -using System.Globalization; using System.Diagnostics.CodeAnalysis; +using System.Globalization; +using System.Runtime.Serialization; +using System.Xml; namespace System.Runtime.Serialization.Json { diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/JsonReaderWriterFactory.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/JsonReaderWriterFactory.cs index 5e3ca3318d68d..55e9bd4ecda7e 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/JsonReaderWriterFactory.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/JsonReaderWriterFactory.cs @@ -3,10 +3,10 @@ using System; using System.Collections.Generic; -using System.Text; -using System.Xml; using System.IO; using System.Runtime.CompilerServices; +using System.Text; +using System.Xml; namespace System.Runtime.Serialization.Json { diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/JsonStringDataContract.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/JsonStringDataContract.cs index 7ac07918f4971..12546a09709fb 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/JsonStringDataContract.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/JsonStringDataContract.cs @@ -6,8 +6,8 @@ using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Runtime.Serialization.DataContracts; -using System.Xml; using System.Text; +using System.Xml; namespace System.Runtime.Serialization.Json { diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/JsonWriterDelegator.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/JsonWriterDelegator.cs index 60433c1382d79..0216d0f42bf06 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/JsonWriterDelegator.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/JsonWriterDelegator.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Xml; using System.Globalization; +using System.Xml; namespace System.Runtime.Serialization.Json { diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/XmlJsonReader.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/XmlJsonReader.cs index 8753a3d24e62f..fff213ea3b356 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/XmlJsonReader.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/XmlJsonReader.cs @@ -1,14 +1,14 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Collections.Generic; +using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.IO; -using System.Text; using System.Runtime.Serialization; -using System.Collections.Generic; +using System.Text; using System.Xml; -using System.Diagnostics.CodeAnalysis; -using System.Diagnostics; namespace System.Runtime.Serialization.Json { diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/ObjectReferenceStack.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/ObjectReferenceStack.cs index 3f3414750e96b..f47e13aaa2a54 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/ObjectReferenceStack.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/ObjectReferenceStack.cs @@ -2,9 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Xml; using System.Collections.Generic; using System.Diagnostics; +using System.Xml; namespace System.Runtime.Serialization { diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/SchemaHelper.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/SchemaHelper.cs index 431bd3263e2d0..e42b4287766ef 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/SchemaHelper.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/SchemaHelper.cs @@ -2,11 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Xml; -using System.Xml.Schema; using System.Collections; using System.Collections.Generic; - +using System.Xml; +using System.Xml.Schema; using SchemaObjectDictionary = System.Collections.Generic.Dictionary; namespace System.Runtime.Serialization diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlFormatReaderGenerator.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlFormatReaderGenerator.cs index d0ed28154d61b..1a43e90aef2a4 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlFormatReaderGenerator.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlFormatReaderGenerator.cs @@ -2,11 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Diagnostics; -using System.Diagnostics.CodeAnalysis; using System.Collections; using System.Collections.Concurrent; using System.Collections.Generic; +using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Reflection; using System.Reflection.Emit; using System.Runtime.CompilerServices; diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlSerializableReader.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlSerializableReader.cs index 397156a7f4b1c..e4d1515a9f37b 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlSerializableReader.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlSerializableReader.cs @@ -1,11 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Diagnostics; using System.IO; using System.Xml; using System.Xml.Schema; using System.Xml.Serialization; -using System.Diagnostics; namespace System.Runtime.Serialization diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlWriterDelegator.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlWriterDelegator.cs index 0832b664f65fb..8ace7ae6187f0 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlWriterDelegator.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlWriterDelegator.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Xml; -using System.Runtime.Serialization.DataContracts; using System.Globalization; +using System.Runtime.Serialization.DataContracts; +using System.Xml; namespace System.Runtime.Serialization diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Text/Base64Encoding.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Text/Base64Encoding.cs index 33932c32d3d50..9cbc0682ce80d 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Text/Base64Encoding.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Text/Base64Encoding.cs @@ -1,11 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Text; using System.Diagnostics; -using System.Runtime.Serialization; //For SR using System.Globalization; using System.Reflection; +using System.Runtime.Serialization; //For SR +using System.Text; namespace System.Text { diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Xml/StringHandle.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Xml/StringHandle.cs index 889a39588d383..3c07aed5356a9 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Xml/StringHandle.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Xml/StringHandle.cs @@ -2,9 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Runtime.Serialization; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; +using System.Runtime.Serialization; namespace System.Xml { diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Xml/ValueHandle.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Xml/ValueHandle.cs index b05aca7ae58c1..2ae593f159154 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Xml/ValueHandle.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Xml/ValueHandle.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Runtime.Serialization; using System.Text; -using System.Diagnostics.CodeAnalysis; -using System.Diagnostics; namespace System.Xml { diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Xml/XmlBaseReader.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Xml/XmlBaseReader.cs index d3f75f8d482d3..53318bf57c228 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Xml/XmlBaseReader.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Xml/XmlBaseReader.cs @@ -2,18 +2,18 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.IO; -using System.Xml; using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; +using System.Globalization; +using System.IO; using System.Runtime.InteropServices; +using System.Runtime.Serialization; using System.Security; using System.Text; -using System.Globalization; -using System.Runtime.Serialization; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Diagnostics.CodeAnalysis; +using System.Xml; namespace System.Xml { diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Xml/XmlBaseWriter.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Xml/XmlBaseWriter.cs index 751a2605b2b74..a5536358e3724 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Xml/XmlBaseWriter.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Xml/XmlBaseWriter.cs @@ -1,15 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.IO; using System.Collections; -using System.Text; +using System.Collections.Generic; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Globalization; +using System.IO; using System.Runtime.Serialization; -using System.Collections.Generic; +using System.Text; using System.Threading.Tasks; -using System.Diagnostics.CodeAnalysis; namespace System.Xml { diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Xml/XmlBinaryReaderSession.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Xml/XmlBinaryReaderSession.cs index a940cb6f35d30..aad7286478926 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Xml/XmlBinaryReaderSession.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Xml/XmlBinaryReaderSession.cs @@ -1,11 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using StringHandle = System.Int64; -using System.Xml; using System.Collections.Generic; -using System.Runtime.Serialization; using System.Diagnostics.CodeAnalysis; +using System.Runtime.Serialization; +using System.Xml; +using StringHandle = System.Int64; namespace System.Xml { diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Xml/XmlBinaryWriterSession.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Xml/XmlBinaryWriterSession.cs index ebe151d77b387..636700a829840 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Xml/XmlBinaryWriterSession.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Xml/XmlBinaryWriterSession.cs @@ -2,13 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Xml; using System.Collections; -using System.Diagnostics; -using System.Runtime.Serialization; using System.Collections.Generic; using System.Collections.ObjectModel; +using System.Diagnostics; using System.Diagnostics.CodeAnalysis; +using System.Runtime.Serialization; +using System.Xml; namespace System.Xml { diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Xml/XmlBufferReader.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Xml/XmlBufferReader.cs index 4b35d96758190..ef1983fa5ccd4 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Xml/XmlBufferReader.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Xml/XmlBufferReader.cs @@ -2,18 +2,18 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.IO; -using System.Xml; +using System.Buffers.Binary; using System.Collections; -using System.Diagnostics; -using System.Runtime.InteropServices; -using System.Text; -using System.Globalization; -using System.Runtime.Serialization; using System.Collections.Generic; using System.Collections.ObjectModel; +using System.Diagnostics; +using System.Globalization; +using System.IO; using System.Runtime.CompilerServices; -using System.Buffers.Binary; +using System.Runtime.InteropServices; +using System.Runtime.Serialization; +using System.Text; +using System.Xml; namespace System.Xml { diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Xml/XmlConverter.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Xml/XmlConverter.cs index 6f57e42585cd2..c8a1dc03515db 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Xml/XmlConverter.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Xml/XmlConverter.cs @@ -2,19 +2,19 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.IO; -using System.Xml; -using System.Xml.Schema; +using System.Buffers; using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Diagnostics; +using System.Globalization; +using System.IO; using System.Runtime.InteropServices; +using System.Runtime.Serialization; using System.Security; using System.Text; -using System.Globalization; -using System.Runtime.Serialization; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Buffers; +using System.Xml; +using System.Xml.Schema; namespace System.Xml { diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Xml/XmlDictionary.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Xml/XmlDictionary.cs index e07bd767a102f..00d058c678e45 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Xml/XmlDictionary.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Xml/XmlDictionary.cs @@ -2,14 +2,14 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.IO; -using System.Xml; using System.Collections; using System.Collections.Generic; using System.Diagnostics; -using System.Text; -using System.Runtime.Serialization; using System.Diagnostics.CodeAnalysis; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Xml; namespace System.Xml { diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Xml/XmlDictionaryReader.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Xml/XmlDictionaryReader.cs index 25b550a44906a..489c4dc4a6cf9 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Xml/XmlDictionaryReader.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Xml/XmlDictionaryReader.cs @@ -3,13 +3,13 @@ using System; using System.Collections; -using System.IO; -using System.Xml; using System.Diagnostics; -using System.Text; -using System.Runtime.Serialization; -using System.Globalization; using System.Diagnostics.CodeAnalysis; +using System.Globalization; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Xml; namespace System.Xml { diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Xml/XmlDictionaryReaderQuotas.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Xml/XmlDictionaryReaderQuotas.cs index dc662b3922977..75a630f807488 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Xml/XmlDictionaryReaderQuotas.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Xml/XmlDictionaryReaderQuotas.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Runtime.Serialization; using System.ComponentModel; +using System.Runtime.Serialization; namespace System.Xml diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Xml/XmlDictionaryString.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Xml/XmlDictionaryString.cs index 6b858e16e62a5..1e6108542e83d 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Xml/XmlDictionaryString.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Xml/XmlDictionaryString.cs @@ -2,11 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Xml; -using System.Text; using System.Diagnostics; -using System.Runtime.Serialization; using System.Diagnostics.CodeAnalysis; +using System.Runtime.Serialization; +using System.Text; +using System.Xml; namespace System.Xml { diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Xml/XmlDictionaryWriter.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Xml/XmlDictionaryWriter.cs index 668f7b8bb2bfe..41f6940a8760e 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Xml/XmlDictionaryWriter.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Xml/XmlDictionaryWriter.cs @@ -2,16 +2,16 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.IO; -using System.Xml; using System.Collections; using System.Collections.Generic; using System.Diagnostics; +using System.IO; using System.Runtime.InteropServices; using System.Runtime.Serialization; using System.Security; using System.Text; using System.Threading.Tasks; +using System.Xml; namespace System.Xml { diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Xml/XmlExceptionHelper.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Xml/XmlExceptionHelper.cs index 5b1462eda97c2..0c24139547e9a 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Xml/XmlExceptionHelper.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Xml/XmlExceptionHelper.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Runtime.Serialization; -using System.Globalization; using System.Diagnostics.CodeAnalysis; +using System.Globalization; +using System.Runtime.Serialization; namespace System.Xml { diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Xml/XmlNodeWriter.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Xml/XmlNodeWriter.cs index 9014d83109af8..8d4042a9a719e 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Xml/XmlNodeWriter.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Xml/XmlNodeWriter.cs @@ -1,13 +1,13 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.IO; using System.Collections; -using System.Text; +using System.Collections.Generic; using System.Diagnostics; using System.Globalization; +using System.IO; using System.Runtime.Serialization; -using System.Collections.Generic; +using System.Text; using System.Threading.Tasks; namespace System.Xml diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Xml/XmlStreamNodeWriter.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Xml/XmlStreamNodeWriter.cs index f596f4cf71c22..27c28505f81cd 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Xml/XmlStreamNodeWriter.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Xml/XmlStreamNodeWriter.cs @@ -2,13 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Buffers.Binary; +using System.Diagnostics; using System.IO; -using System.Text; using System.Runtime.InteropServices; using System.Runtime.Intrinsics; using System.Runtime.Serialization; +using System.Text; using System.Threading.Tasks; -using System.Diagnostics; namespace System.Xml { diff --git a/src/libraries/System.Private.DataContractSerialization/src/System/Xml/XmlUTF8TextReader.cs b/src/libraries/System.Private.DataContractSerialization/src/System/Xml/XmlUTF8TextReader.cs index 86fac2721533a..fd3c4f3baaddc 100644 --- a/src/libraries/System.Private.DataContractSerialization/src/System/Xml/XmlUTF8TextReader.cs +++ b/src/libraries/System.Private.DataContractSerialization/src/System/Xml/XmlUTF8TextReader.cs @@ -2,15 +2,15 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.IO; -using System.Xml; using System.Collections; using System.Diagnostics; +using System.Globalization; +using System.IO; using System.Runtime.InteropServices; using System.Runtime.Serialization; // For SR using System.Security; using System.Text; -using System.Globalization; +using System.Xml; namespace System.Xml diff --git a/src/libraries/System.Private.Uri/src/System/UriExt.cs b/src/libraries/System.Private.Uri/src/System/UriExt.cs index 4eea4d2b8b0a9..1aedf02d9299d 100644 --- a/src/libraries/System.Private.Uri/src/System/UriExt.cs +++ b/src/libraries/System.Private.Uri/src/System/UriExt.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Globalization; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; +using System.Globalization; using System.Text; namespace System diff --git a/src/libraries/System.Private.Uri/src/System/UriHelper.cs b/src/libraries/System.Private.Uri/src/System/UriHelper.cs index e4edf02e86ab3..5fd4f680f2fe0 100644 --- a/src/libraries/System.Private.Uri/src/System/UriHelper.cs +++ b/src/libraries/System.Private.Uri/src/System/UriHelper.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Text; +using System.Buffers; using System.Diagnostics; using System.Runtime.InteropServices; -using System.Buffers; +using System.Text; namespace System { diff --git a/src/libraries/System.Private.Uri/src/System/UriScheme.cs b/src/libraries/System.Private.Uri/src/System/UriScheme.cs index c798b4f665b49..c8bf0ba314919 100644 --- a/src/libraries/System.Private.Uri/src/System/UriScheme.cs +++ b/src/libraries/System.Private.Uri/src/System/UriScheme.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Diagnostics; -using System.Threading; using System.Runtime.CompilerServices; +using System.Threading; namespace System { diff --git a/src/libraries/System.Private.Uri/src/System/UriSyntax.cs b/src/libraries/System.Private.Uri/src/System/UriSyntax.cs index eca4520966493..29b9b0dd2b3e8 100644 --- a/src/libraries/System.Private.Uri/src/System/UriSyntax.cs +++ b/src/libraries/System.Private.Uri/src/System/UriSyntax.cs @@ -6,8 +6,8 @@ using System.Collections; using System.Diagnostics; -using System.Threading; using System.Runtime.CompilerServices; +using System.Threading; namespace System { diff --git a/src/libraries/System.Private.Xml.Linq/src/System/Xml/Linq/XContainer.cs b/src/libraries/System.Private.Xml.Linq/src/System/Xml/Linq/XContainer.cs index 69bca92f5e904..7349bdd33104a 100644 --- a/src/libraries/System.Private.Xml.Linq/src/System/Xml/Linq/XContainer.cs +++ b/src/libraries/System.Private.Xml.Linq/src/System/Xml/Linq/XContainer.cs @@ -2,14 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; using System.Threading; using System.Threading.Tasks; - using Debug = System.Diagnostics.Debug; using IEnumerable = System.Collections.IEnumerable; -using StringBuilder = System.Text.StringBuilder; using Interlocked = System.Threading.Interlocked; -using System.Diagnostics.CodeAnalysis; +using StringBuilder = System.Text.StringBuilder; namespace System.Xml.Linq { diff --git a/src/libraries/System.Private.Xml.Linq/src/System/Xml/Linq/XDocument.cs b/src/libraries/System.Private.Xml.Linq/src/System/Xml/Linq/XDocument.cs index 47ab2e742a6b7..afe65d1853c8a 100644 --- a/src/libraries/System.Private.Xml.Linq/src/System/Xml/Linq/XDocument.cs +++ b/src/libraries/System.Private.Xml.Linq/src/System/Xml/Linq/XDocument.cs @@ -5,9 +5,8 @@ using System.IO; using System.Threading; using System.Threading.Tasks; - -using SuppressMessageAttribute = System.Diagnostics.CodeAnalysis.SuppressMessageAttribute; using Encoding = System.Text.Encoding; +using SuppressMessageAttribute = System.Diagnostics.CodeAnalysis.SuppressMessageAttribute; namespace System.Xml.Linq { diff --git a/src/libraries/System.Private.Xml.Linq/src/System/Xml/Linq/XElement.cs b/src/libraries/System.Private.Xml.Linq/src/System/Xml/Linq/XElement.cs index 77a11dfd63d52..a0e6d04aa2808 100644 --- a/src/libraries/System.Private.Xml.Linq/src/System/Xml/Linq/XElement.cs +++ b/src/libraries/System.Private.Xml.Linq/src/System/Xml/Linq/XElement.cs @@ -2,19 +2,18 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Collections.Generic; +using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.IO; using System.Text; using System.Threading; using System.Threading.Tasks; -using System.Xml.Serialization; using System.Xml.Schema; - +using System.Xml.Serialization; using CultureInfo = System.Globalization.CultureInfo; using IEnumerable = System.Collections.IEnumerable; -using SuppressMessageAttribute = System.Diagnostics.CodeAnalysis.SuppressMessageAttribute; using StringBuilder = System.Text.StringBuilder; -using System.Diagnostics; +using SuppressMessageAttribute = System.Diagnostics.CodeAnalysis.SuppressMessageAttribute; namespace System.Xml.Linq { diff --git a/src/libraries/System.Private.Xml.Linq/src/System/Xml/Linq/XHelper.cs b/src/libraries/System.Private.Xml.Linq/src/System/Xml/Linq/XHelper.cs index dd0b1947bf14d..f3fa9f370a04a 100644 --- a/src/libraries/System.Private.Xml.Linq/src/System/Xml/Linq/XHelper.cs +++ b/src/libraries/System.Private.Xml.Linq/src/System/Xml/Linq/XHelper.cs @@ -1,9 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Debug = System.Diagnostics.Debug; - using System.Reflection; +using Debug = System.Diagnostics.Debug; namespace System.Xml.Linq { diff --git a/src/libraries/System.Private.Xml.Linq/src/System/Xml/Linq/XName.cs b/src/libraries/System.Private.Xml.Linq/src/System/Xml/Linq/XName.cs index 36eafdd3c2622..3bd4f0b6599f3 100644 --- a/src/libraries/System.Private.Xml.Linq/src/System/Xml/Linq/XName.cs +++ b/src/libraries/System.Private.Xml.Linq/src/System/Xml/Linq/XName.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using SuppressMessageAttribute = System.Diagnostics.CodeAnalysis.SuppressMessageAttribute; -using System.Runtime.Serialization; using System.Diagnostics.CodeAnalysis; +using System.Runtime.Serialization; +using SuppressMessageAttribute = System.Diagnostics.CodeAnalysis.SuppressMessageAttribute; namespace System.Xml.Linq { diff --git a/src/libraries/System.Private.Xml.Linq/src/System/Xml/Linq/XNamespace.cs b/src/libraries/System.Private.Xml.Linq/src/System/Xml/Linq/XNamespace.cs index 411a42b8fb056..34ca0b49dd7ca 100644 --- a/src/libraries/System.Private.Xml.Linq/src/System/Xml/Linq/XNamespace.cs +++ b/src/libraries/System.Private.Xml.Linq/src/System/Xml/Linq/XNamespace.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Diagnostics.CodeAnalysis; using Debug = System.Diagnostics.Debug; -using SuppressMessageAttribute = System.Diagnostics.CodeAnalysis.SuppressMessageAttribute; using Interlocked = System.Threading.Interlocked; -using System.Diagnostics.CodeAnalysis; +using SuppressMessageAttribute = System.Diagnostics.CodeAnalysis.SuppressMessageAttribute; namespace System.Xml.Linq { diff --git a/src/libraries/System.Private.Xml.Linq/src/System/Xml/Linq/XNode.cs b/src/libraries/System.Private.Xml.Linq/src/System/Xml/Linq/XNode.cs index 88efc587cb218..4039b9bdcfc38 100644 --- a/src/libraries/System.Private.Xml.Linq/src/System/Xml/Linq/XNode.cs +++ b/src/libraries/System.Private.Xml.Linq/src/System/Xml/Linq/XNode.cs @@ -2,14 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Collections.Generic; +using System.Diagnostics; using System.IO; using System.Threading; using System.Threading.Tasks; - using CultureInfo = System.Globalization.CultureInfo; -using SuppressMessageAttribute = System.Diagnostics.CodeAnalysis.SuppressMessageAttribute; using StringBuilder = System.Text.StringBuilder; -using System.Diagnostics; +using SuppressMessageAttribute = System.Diagnostics.CodeAnalysis.SuppressMessageAttribute; namespace System.Xml.Linq { diff --git a/src/libraries/System.Private.Xml.Linq/src/System/Xml/Linq/XText.cs b/src/libraries/System.Private.Xml.Linq/src/System/Xml/Linq/XText.cs index 8737685eb7529..7871142cbd90c 100644 --- a/src/libraries/System.Private.Xml.Linq/src/System/Xml/Linq/XText.cs +++ b/src/libraries/System.Private.Xml.Linq/src/System/Xml/Linq/XText.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using StringBuilder = System.Text.StringBuilder; using System.Threading; using System.Threading.Tasks; +using StringBuilder = System.Text.StringBuilder; namespace System.Xml.Linq { diff --git a/src/libraries/System.Private.Xml.Linq/src/System/Xml/Schema/XNodeValidator.cs b/src/libraries/System.Private.Xml.Linq/src/System/Xml/Schema/XNodeValidator.cs index 94936ae9b2a3b..3adf1971542fa 100644 --- a/src/libraries/System.Private.Xml.Linq/src/System/Xml/Schema/XNodeValidator.cs +++ b/src/libraries/System.Private.Xml.Linq/src/System/Xml/Schema/XNodeValidator.cs @@ -4,11 +4,11 @@ using System; using System.Collections; using System.Collections.Generic; +using System.Diagnostics; using System.Diagnostics.CodeAnalysis; +using System.Runtime.Versioning; using System.Xml; using System.Xml.Linq; -using System.Runtime.Versioning; -using System.Diagnostics; namespace System.Xml.Schema { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Base64Encoder.cs b/src/libraries/System.Private.Xml/src/System/Xml/Base64Encoder.cs index 5405e91d99ed8..eef0a5e4d1081 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Base64Encoder.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Base64Encoder.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Text; using System.Diagnostics; +using System.Text; namespace System.Xml { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Base64EncoderAsync.cs b/src/libraries/System.Private.Xml/src/System/Xml/Base64EncoderAsync.cs index 3eb3a87d81934..d2c16e695ba42 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Base64EncoderAsync.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Base64EncoderAsync.cs @@ -1,9 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Text; using System.Diagnostics; - +using System.Text; using System.Threading.Tasks; namespace System.Xml diff --git a/src/libraries/System.Private.Xml/src/System/Xml/BinaryXml/BinXmlToken.cs b/src/libraries/System.Private.Xml/src/System/Xml/BinaryXml/BinXmlToken.cs index be6227c511ff1..737470b74f439 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/BinaryXml/BinXmlToken.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/BinaryXml/BinXmlToken.cs @@ -3,10 +3,10 @@ using System; using System.Collections; -using System.IO; -using System.Text; using System.Diagnostics; using System.Globalization; +using System.IO; +using System.Text; namespace System.Xml { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/BinaryXml/SqlUtils.cs b/src/libraries/System.Private.Xml/src/System/Xml/BinaryXml/SqlUtils.cs index 0e388b0d0772f..e8ff61ffb83a2 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/BinaryXml/SqlUtils.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/BinaryXml/SqlUtils.cs @@ -4,10 +4,10 @@ using System; using System.Buffers.Binary; using System.Collections; -using System.IO; -using System.Text; using System.Diagnostics; using System.Globalization; +using System.IO; +using System.Text; namespace System.Xml { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Cache/XPathDocumentBuilder.cs b/src/libraries/System.Private.Xml/src/System/Xml/Cache/XPathDocumentBuilder.cs index 51cc772773848..102dde8f7b94c 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Cache/XPathDocumentBuilder.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Cache/XPathDocumentBuilder.cs @@ -2,16 +2,16 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; +using System.Collections; +using System.Collections.Generic; +using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.IO; using System.Threading; using System.Xml; -using System.Xml.XPath; using System.Xml.Schema; -using System.Diagnostics; -using System.Collections; -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; +using System.Xml.XPath; namespace MS.Internal.Xml.Cache { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Core/CharEntityEncoderFallback.cs b/src/libraries/System.Private.Xml/src/System/Xml/Core/CharEntityEncoderFallback.cs index 5723638ee067d..926d5ac06cbaf 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Core/CharEntityEncoderFallback.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Core/CharEntityEncoderFallback.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Text; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; +using System.Text; namespace System.Xml { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Core/HtmlEncodedRawTextWriter.cs b/src/libraries/System.Private.Xml/src/System/Xml/Core/HtmlEncodedRawTextWriter.cs index 3bc875e90bb3a..caa25edaa79c8 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Core/HtmlEncodedRawTextWriter.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Core/HtmlEncodedRawTextWriter.cs @@ -4,9 +4,9 @@ // WARNING: This file is generated and should not be modified directly. // Instead, modify HtmlRawTextWriterGenerator.ttinclude -using System.IO; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; +using System.IO; namespace System.Xml { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Core/HtmlUtf8RawTextWriter.cs b/src/libraries/System.Private.Xml/src/System/Xml/Core/HtmlUtf8RawTextWriter.cs index 23f48e562368e..b83de93cd2525 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Core/HtmlUtf8RawTextWriter.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Core/HtmlUtf8RawTextWriter.cs @@ -4,9 +4,9 @@ // WARNING: This file is generated and should not be modified directly. // Instead, modify HtmlRawTextWriterGenerator.ttinclude -using System.IO; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; +using System.IO; namespace System.Xml { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Core/IDtdParserAdapterAsync.cs b/src/libraries/System.Private.Xml/src/System/Xml/Core/IDtdParserAdapterAsync.cs index 40932548a9ae3..796ac0e51d477 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Core/IDtdParserAdapterAsync.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Core/IDtdParserAdapterAsync.cs @@ -3,9 +3,8 @@ using System; using System.Text; -using System.Xml.Schema; - using System.Threading.Tasks; +using System.Xml.Schema; namespace System.Xml { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Core/IDtdParserAsync.cs b/src/libraries/System.Private.Xml/src/System/Xml/Core/IDtdParserAsync.cs index 261c37daa248c..10f3bd87966bb 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Core/IDtdParserAsync.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Core/IDtdParserAsync.cs @@ -2,9 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Xml; - using System.Threading.Tasks; +using System.Xml; namespace System.Xml { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Core/QueryOutputWriterV1.cs b/src/libraries/System.Private.Xml/src/System/Xml/Core/QueryOutputWriterV1.cs index a3a61833b406c..3191427b16818 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Core/QueryOutputWriterV1.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Core/QueryOutputWriterV1.cs @@ -2,9 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.IO; -using System.Diagnostics; using System.Collections.Generic; +using System.Diagnostics; +using System.IO; namespace System.Xml { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Core/TextEncodedRawTextWriter.cs b/src/libraries/System.Private.Xml/src/System/Xml/Core/TextEncodedRawTextWriter.cs index e587074f4140e..a63d4324a330c 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Core/TextEncodedRawTextWriter.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Core/TextEncodedRawTextWriter.cs @@ -5,11 +5,11 @@ // Instead, modify TextRawTextWriterGenerator.ttinclude using System; +using System.Diagnostics; +using System.Globalization; using System.IO; using System.Text; using System.Xml.Schema; -using System.Diagnostics; -using System.Globalization; namespace System.Xml { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Core/TextUtf8RawTextWriter.cs b/src/libraries/System.Private.Xml/src/System/Xml/Core/TextUtf8RawTextWriter.cs index 415f125abb946..5e1a51dc5a8e2 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Core/TextUtf8RawTextWriter.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Core/TextUtf8RawTextWriter.cs @@ -5,11 +5,11 @@ // Instead, modify TextRawTextWriterGenerator.ttinclude using System; +using System.Diagnostics; +using System.Globalization; using System.IO; using System.Text; using System.Xml.Schema; -using System.Diagnostics; -using System.Globalization; namespace System.Xml { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Core/ValidatingReaderNodeData.cs b/src/libraries/System.Private.Xml/src/System/Xml/Core/ValidatingReaderNodeData.cs index 9106c536541e3..2f2fa6b8d55be 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Core/ValidatingReaderNodeData.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Core/ValidatingReaderNodeData.cs @@ -2,13 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.IO; -using System.Text; using System.Collections; -using System.Xml.Schema; using System.Diagnostics; -using System.Globalization; using System.Diagnostics.CodeAnalysis; +using System.Globalization; +using System.IO; +using System.Text; +using System.Xml.Schema; namespace System.Xml { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlCharCheckingReader.cs b/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlCharCheckingReader.cs index 0d3b9bb88eef3..050d675ac4911 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlCharCheckingReader.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlCharCheckingReader.cs @@ -2,10 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Xml; -using System.Diagnostics; using System.Collections; using System.Collections.Generic; +using System.Diagnostics; +using System.Xml; namespace System.Xml { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlCharCheckingReaderAsync.cs b/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlCharCheckingReaderAsync.cs index 92ec02ad6ec31..0e2dde0cdd64f 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlCharCheckingReaderAsync.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlCharCheckingReaderAsync.cs @@ -2,12 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Xml; -using System.Diagnostics; using System.Collections; using System.Collections.Generic; - +using System.Diagnostics; using System.Threading.Tasks; +using System.Xml; namespace System.Xml { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlCharCheckingWriter.cs b/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlCharCheckingWriter.cs index f015e77cc4ebb..448313ce42935 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlCharCheckingWriter.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlCharCheckingWriter.cs @@ -2,12 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.IO; -using System.Text; -using System.Xml.Schema; using System.Collections; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; +using System.IO; +using System.Text; +using System.Xml.Schema; namespace System.Xml { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlCharCheckingWriterAsync.cs b/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlCharCheckingWriterAsync.cs index 35a3bca99b09f..0b9569539f05d 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlCharCheckingWriterAsync.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlCharCheckingWriterAsync.cs @@ -2,13 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.IO; -using System.Text; -using System.Xml.Schema; using System.Collections; using System.Diagnostics; - +using System.IO; +using System.Text; using System.Threading.Tasks; +using System.Xml.Schema; namespace System.Xml { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlEncodedRawTextWriter.cs b/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlEncodedRawTextWriter.cs index f4126fcf9407e..d583927b3f86b 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlEncodedRawTextWriter.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlEncodedRawTextWriter.cs @@ -4,11 +4,11 @@ // WARNING: This file is generated and should not be modified directly. // Instead, modify XmlRawTextWriterGenerator.ttinclude -using System.IO; -using System.Text; using System.Diagnostics; -using System.Globalization; using System.Diagnostics.CodeAnalysis; +using System.Globalization; +using System.IO; +using System.Text; namespace System.Xml { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlEncodedRawTextWriterAsync.cs b/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlEncodedRawTextWriterAsync.cs index d15b7680b248a..8e1969ee57351 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlEncodedRawTextWriterAsync.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlEncodedRawTextWriterAsync.cs @@ -5,13 +5,13 @@ // Instead, modify XmlRawTextWriterGeneratorAsync.ttinclude using System; -using System.IO; -using System.Xml; -using System.Text; using System.Diagnostics; using System.Globalization; +using System.IO; using System.Security; +using System.Text; using System.Threading.Tasks; +using System.Xml; namespace System.Xml { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlParserContext.cs b/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlParserContext.cs index 620eedb67d889..7c55806422476 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlParserContext.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlParserContext.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Xml; -using System.Text; using System; using System.Diagnostics.CodeAnalysis; +using System.Text; +using System.Xml; namespace System.Xml { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlRawWriter.cs b/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlRawWriter.cs index 46bec1e58925f..5f53bb2dd75f3 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlRawWriter.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlRawWriter.cs @@ -2,11 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.IO; +using System.Collections; using System.Diagnostics; -using System.Xml.XPath; +using System.IO; using System.Xml.Schema; -using System.Collections; +using System.Xml.XPath; namespace System.Xml { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlRawWriterAsync.cs b/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlRawWriterAsync.cs index fd2fe806d74c7..66467b9d8a589 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlRawWriterAsync.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlRawWriterAsync.cs @@ -2,13 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.IO; -using System.Diagnostics; -using System.Xml.XPath; -using System.Xml.Schema; using System.Collections; - +using System.Diagnostics; +using System.IO; using System.Threading.Tasks; +using System.Xml.Schema; +using System.Xml.XPath; namespace System.Xml { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlReaderAsync.cs b/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlReaderAsync.cs index 82f448f0133b3..f4eae45cba12e 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlReaderAsync.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlReaderAsync.cs @@ -1,12 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.IO; -using System.Text; using System.Diagnostics; using System.Globalization; -using System.Xml.Schema; +using System.IO; +using System.Text; using System.Threading.Tasks; +using System.Xml.Schema; namespace System.Xml { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlReaderSettings.cs b/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlReaderSettings.cs index f4d873161c1f2..3edd268d2630c 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlReaderSettings.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlReaderSettings.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.IO; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; +using System.IO; using System.Runtime.CompilerServices; using System.Xml.Schema; diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlSubtreeReader.cs b/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlSubtreeReader.cs index 7994545eea712..a5973bb6ba610 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlSubtreeReader.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlSubtreeReader.cs @@ -2,11 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Xml; -using System.Diagnostics; using System.Collections; -using System.Globalization; using System.Collections.Generic; +using System.Diagnostics; +using System.Globalization; +using System.Xml; namespace System.Xml { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlSubtreeReaderAsync.cs b/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlSubtreeReaderAsync.cs index c10ddc917e61d..d613775364c61 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlSubtreeReaderAsync.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlSubtreeReaderAsync.cs @@ -2,13 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Xml; -using System.Diagnostics; using System.Collections; -using System.Globalization; using System.Collections.Generic; - +using System.Diagnostics; +using System.Globalization; using System.Threading.Tasks; +using System.Xml; namespace System.Xml { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlTextEncoder.cs b/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlTextEncoder.cs index 76ad973526d99..00e0795b4b556 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlTextEncoder.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlTextEncoder.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.IO; -using System.Text; using System.Diagnostics; using System.Globalization; +using System.IO; +using System.Text; namespace System.Xml { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlTextReader.cs b/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlTextReader.cs index 0da996eca8259..51198bfb5647f 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlTextReader.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlTextReader.cs @@ -2,13 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; +using System.Collections; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.IO; +using System.Runtime.Versioning; using System.Text; using System.Xml.Schema; -using System.Collections; -using System.Collections.Generic; -using System.Runtime.Versioning; namespace System.Xml { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlTextReaderImpl.cs b/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlTextReaderImpl.cs index 1c118faafb865..14246f4e8b83c 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlTextReaderImpl.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlTextReaderImpl.cs @@ -1,16 +1,16 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.IO; -using System.Text; -using System.Xml.Schema; +using System.Collections.Generic; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Globalization; -using System.Collections.Generic; +using System.IO; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; +using System.Text; using System.Threading.Tasks; -using System.Diagnostics.CodeAnalysis; +using System.Xml.Schema; namespace System.Xml { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlTextReaderImplAsync.cs b/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlTextReaderImplAsync.cs index 79ea7cb0feea7..8edafd8e7ef40 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlTextReaderImplAsync.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlTextReaderImplAsync.cs @@ -2,18 +2,18 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.IO; -using System.Text; -using System.Security; -using System.Threading; -using System.Xml.Schema; using System.Collections; +using System.Collections.Generic; using System.Diagnostics; using System.Globalization; -using System.Collections.Generic; +using System.IO; using System.Runtime.CompilerServices; using System.Runtime.Versioning; +using System.Security; +using System.Text; +using System.Threading; using System.Threading.Tasks; +using System.Xml.Schema; namespace System.Xml { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlTextReaderImplHelpers.cs b/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlTextReaderImplHelpers.cs index a4df7befa1bad..f56655fdd92cd 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlTextReaderImplHelpers.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlTextReaderImplHelpers.cs @@ -2,16 +2,16 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.IO; -using System.Text; -using System.Security; -using System.Xml.Schema; using System.Collections; +using System.Collections.Generic; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Globalization; -using System.Collections.Generic; +using System.IO; using System.Runtime.Versioning; -using System.Diagnostics.CodeAnalysis; +using System.Security; +using System.Text; +using System.Xml.Schema; namespace System.Xml { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlTextReaderImplHelpersAsync.cs b/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlTextReaderImplHelpersAsync.cs index f6f2d8c60e2f5..3fbea66f5d9a0 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlTextReaderImplHelpersAsync.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlTextReaderImplHelpersAsync.cs @@ -2,17 +2,16 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.IO; -using System.Text; -using System.Security; -using System.Xml.Schema; using System.Collections; +using System.Collections.Generic; using System.Diagnostics; using System.Globalization; -using System.Collections.Generic; +using System.IO; using System.Runtime.Versioning; - +using System.Security; +using System.Text; using System.Threading.Tasks; +using System.Xml.Schema; namespace System.Xml { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlTextWriter.cs b/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlTextWriter.cs index 1ed5742fa5722..d45397bb634f1 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlTextWriter.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlTextWriter.cs @@ -4,11 +4,11 @@ using System; using System.Collections; using System.Collections.Generic; -using System.IO; -using System.Text; using System.Diagnostics; using System.Globalization; +using System.IO; using System.Runtime.Versioning; +using System.Text; using System.Threading; namespace System.Xml diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlUtf8RawTextWriter.cs b/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlUtf8RawTextWriter.cs index be109c7ce0d48..d5d3c300c99f1 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlUtf8RawTextWriter.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlUtf8RawTextWriter.cs @@ -5,12 +5,12 @@ // Instead, modify XmlRawTextWriterGenerator.ttinclude using System; -using System.IO; -using System.Xml; -using System.Text; using System.Diagnostics; -using System.Globalization; using System.Diagnostics.CodeAnalysis; +using System.Globalization; +using System.IO; +using System.Text; +using System.Xml; namespace System.Xml { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlUtf8RawTextWriterAsync.cs b/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlUtf8RawTextWriterAsync.cs index b12404bfb9988..be35b7cb43a65 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlUtf8RawTextWriterAsync.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlUtf8RawTextWriterAsync.cs @@ -5,13 +5,13 @@ // Instead, modify XmlRawTextWriterGeneratorAsync.ttinclude using System; -using System.IO; -using System.Xml; -using System.Text; using System.Diagnostics; using System.Globalization; +using System.IO; using System.Security; +using System.Text; using System.Threading.Tasks; +using System.Xml; namespace System.Xml { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlValidatingReaderImpl.cs b/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlValidatingReaderImpl.cs index f2c8caf707a1c..4d09d4d2d0eb4 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlValidatingReaderImpl.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlValidatingReaderImpl.cs @@ -2,15 +2,15 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.IO; -using System.Text; -using System.Xml.Schema; using System.Collections; +using System.Collections.Generic; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Globalization; -using System.Collections.Generic; +using System.IO; using System.Runtime.Versioning; -using System.Diagnostics.CodeAnalysis; +using System.Text; +using System.Xml.Schema; namespace System.Xml { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlValidatingReaderImplAsync.cs b/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlValidatingReaderImplAsync.cs index f30ffd5b3da0b..bcd26ed48a435 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlValidatingReaderImplAsync.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlValidatingReaderImplAsync.cs @@ -2,16 +2,15 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.IO; -using System.Text; -using System.Xml.Schema; using System.Collections; +using System.Collections.Generic; using System.Diagnostics; using System.Globalization; -using System.Collections.Generic; +using System.IO; using System.Runtime.Versioning; - +using System.Text; using System.Threading.Tasks; +using System.Xml.Schema; namespace System.Xml { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlWellFormedWriter.cs b/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlWellFormedWriter.cs index d47ed8d3a9aac..da153709c854b 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlWellFormedWriter.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlWellFormedWriter.cs @@ -2,13 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; +using System.Collections; +using System.Collections.Generic; +using System.Diagnostics; +using System.Globalization; using System.IO; using System.Text; using System.Xml; -using System.Diagnostics; -using System.Collections; -using System.Globalization; -using System.Collections.Generic; namespace System.Xml { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlWellFormedWriterAsync.cs b/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlWellFormedWriterAsync.cs index 1c506e61ec4e9..664a2a947589f 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlWellFormedWriterAsync.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlWellFormedWriterAsync.cs @@ -1,16 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Threading.Tasks; - using System; +using System.Collections; +using System.Collections.Generic; +using System.Diagnostics; +using System.Globalization; using System.IO; using System.Text; +using System.Threading.Tasks; using System.Xml; -using System.Diagnostics; -using System.Collections; -using System.Globalization; -using System.Collections.Generic; // OpenIssue : is it better to cache the current namespace decls for each elem // as the current code does, or should it just always walk the namespace stack? diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlWellFormedWriterHelpers.cs b/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlWellFormedWriterHelpers.cs index 9652a0b348953..da75ab3e0eba2 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlWellFormedWriterHelpers.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlWellFormedWriterHelpers.cs @@ -2,10 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Text; -using System.Diagnostics; using System.Collections.Generic; +using System.Diagnostics; using System.Diagnostics.CodeAnalysis; +using System.Text; namespace System.Xml { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlWellFormedWriterHelpersAsync.cs b/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlWellFormedWriterHelpersAsync.cs index fb81eb472358c..5ff3b5a7cb98b 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlWellFormedWriterHelpersAsync.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlWellFormedWriterHelpersAsync.cs @@ -2,10 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Text; -using System.Diagnostics; using System.Collections.Generic; - +using System.Diagnostics; +using System.Text; using System.Threading.Tasks; namespace System.Xml diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlWrappingReader.cs b/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlWrappingReader.cs index c0c4187aa1a0f..846a2f583ed96 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlWrappingReader.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlWrappingReader.cs @@ -2,10 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; +using System.Collections; +using System.Diagnostics; using System.Xml; using System.Xml.Schema; -using System.Diagnostics; -using System.Collections; namespace System.Xml { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlWrappingReaderAsync.cs b/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlWrappingReaderAsync.cs index e2e8267041774..892764989c0d2 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlWrappingReaderAsync.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlWrappingReaderAsync.cs @@ -2,12 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Xml; -using System.Xml.Schema; -using System.Diagnostics; using System.Collections; - +using System.Diagnostics; using System.Threading.Tasks; +using System.Xml; +using System.Xml.Schema; namespace System.Xml { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlWrappingWriter.cs b/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlWrappingWriter.cs index 60bdc9b446a69..a04e03d9ca833 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlWrappingWriter.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlWrappingWriter.cs @@ -2,9 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Xml.Schema; using System.Collections; using System.Diagnostics; +using System.Xml.Schema; namespace System.Xml { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlWrappingWriterAsync.cs b/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlWrappingWriterAsync.cs index 6edd2b7e956a0..3d7652d5d0a82 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlWrappingWriterAsync.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlWrappingWriterAsync.cs @@ -2,12 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.IO; -using System.Xml.Schema; using System.Collections; using System.Diagnostics; - +using System.IO; using System.Threading.Tasks; +using System.Xml.Schema; namespace System.Xml { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlWriter.cs b/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlWriter.cs index 4c57c78423af0..994b5d0a82688 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlWriter.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlWriter.cs @@ -1,12 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Diagnostics; +using System.Globalization; using System.IO; using System.Text; -using System.Xml.XPath; using System.Xml.Schema; -using System.Diagnostics; -using System.Globalization; +using System.Xml.XPath; namespace System.Xml { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlWriterAsync.cs b/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlWriterAsync.cs index 990a7e8b3df4e..6bb887db392dc 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlWriterAsync.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlWriterAsync.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Diagnostics; using System.Threading.Tasks; -using System.Xml.XPath; using System.Xml.Schema; -using System.Diagnostics; +using System.Xml.XPath; namespace System.Xml { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlWriterSettings.cs b/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlWriterSettings.cs index 451ae867d9c73..390db35780f44 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlWriterSettings.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Core/XmlWriterSettings.cs @@ -3,10 +3,10 @@ using System.Collections.Generic; using System.Diagnostics; -using System.IO; -using System.Text; using System.Diagnostics.CodeAnalysis; +using System.IO; using System.Runtime.CompilerServices; +using System.Text; using System.Xml.Xsl.Runtime; namespace System.Xml diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Core/XsdCachingReader.cs b/src/libraries/System.Private.Xml/src/System/Xml/Core/XsdCachingReader.cs index acec9e2393007..dfc5311a0a765 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Core/XsdCachingReader.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Core/XsdCachingReader.cs @@ -1,14 +1,14 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Collections; +using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; +using System.Globalization; using System.IO; using System.Text; using System.Xml.Schema; using System.Xml.XPath; -using System.Diagnostics; -using System.Globalization; -using System.Collections; -using System.Diagnostics.CodeAnalysis; namespace System.Xml { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Core/XsdCachingReaderAsync.cs b/src/libraries/System.Private.Xml/src/System/Xml/Core/XsdCachingReaderAsync.cs index 211b27d067995..9a83b5e1ad8e7 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Core/XsdCachingReaderAsync.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Core/XsdCachingReaderAsync.cs @@ -1,15 +1,14 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Collections; +using System.Diagnostics; +using System.Globalization; using System.IO; using System.Text; +using System.Threading.Tasks; using System.Xml.Schema; using System.Xml.XPath; -using System.Diagnostics; -using System.Globalization; -using System.Collections; - -using System.Threading.Tasks; namespace System.Xml { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Core/XsdValidatingReader.cs b/src/libraries/System.Private.Xml/src/System/Xml/Core/XsdValidatingReader.cs index 37d4da6bb103f..eedaac07a2539 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Core/XsdValidatingReader.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Core/XsdValidatingReader.cs @@ -1,16 +1,16 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Collections; +using System.Collections.Generic; +using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; +using System.Globalization; using System.IO; +using System.Runtime.Versioning; using System.Text; using System.Xml.Schema; using System.Xml.XPath; -using System.Diagnostics; -using System.Globalization; -using System.Collections; -using System.Collections.Generic; -using System.Runtime.Versioning; -using System.Diagnostics.CodeAnalysis; namespace System.Xml { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Core/XsdValidatingReaderAsync.cs b/src/libraries/System.Private.Xml/src/System/Xml/Core/XsdValidatingReaderAsync.cs index 995c60e9dade4..1900d484a133e 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Core/XsdValidatingReaderAsync.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Core/XsdValidatingReaderAsync.cs @@ -1,17 +1,16 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.IO; -using System.Text; -using System.Xml.Schema; -using System.Xml.XPath; -using System.Diagnostics; -using System.Globalization; using System.Collections; using System.Collections.Generic; +using System.Diagnostics; +using System.Globalization; +using System.IO; using System.Runtime.Versioning; - +using System.Text; using System.Threading.Tasks; +using System.Xml.Schema; +using System.Xml.XPath; namespace System.Xml { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Dom/DocumentSchemaValidator.cs b/src/libraries/System.Private.Xml/src/System/Xml/Dom/DocumentSchemaValidator.cs index c167773889538..30526d18f5538 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Dom/DocumentSchemaValidator.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Dom/DocumentSchemaValidator.cs @@ -2,17 +2,17 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Text; using System.Collections; using System.Collections.Generic; using System.Diagnostics; -using System.Xml; -using System.Xml.Schema; -using System.Xml.XPath; using System.Globalization; -using System.Security; using System.Reflection; using System.Runtime.Versioning; +using System.Security; +using System.Text; +using System.Xml; +using System.Xml.Schema; +using System.Xml.XPath; namespace System.Xml { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Dom/DocumentXPathNavigator.cs b/src/libraries/System.Private.Xml/src/System/Xml/Dom/DocumentXPathNavigator.cs index 1484ff0a60996..2480cd58cbce7 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Dom/DocumentXPathNavigator.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Dom/DocumentXPathNavigator.cs @@ -4,11 +4,11 @@ using System; using System.Collections; using System.Collections.Generic; +using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Text; using System.Xml.Schema; using System.Xml.XPath; -using System.Diagnostics; -using System.Diagnostics.CodeAnalysis; namespace System.Xml { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Dom/XPathNodeList.cs b/src/libraries/System.Private.Xml/src/System/Xml/Dom/XPathNodeList.cs index 706e5d0a24478..aa3f9c7982994 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Dom/XPathNodeList.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Dom/XPathNodeList.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Diagnostics; using System.Collections; using System.Collections.Generic; +using System.Diagnostics; using System.Xml.XPath; namespace System.Xml diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Dom/XmlAttribute.cs b/src/libraries/System.Private.Xml/src/System/Xml/Dom/XmlAttribute.cs index db2f88015a006..fde115815800e 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Dom/XmlAttribute.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Dom/XmlAttribute.cs @@ -2,10 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Xml.Schema; -using System.Xml.XPath; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; +using System.Xml.Schema; +using System.Xml.XPath; namespace System.Xml { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Dom/XmlDocument.cs b/src/libraries/System.Private.Xml/src/System/Xml/Dom/XmlDocument.cs index 243528e76d3cf..42f275027562a 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Dom/XmlDocument.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Dom/XmlDocument.cs @@ -6,13 +6,13 @@ using System.Collections.Generic; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; +using System.Globalization; using System.IO; +using System.Runtime.Versioning; +using System.Security; using System.Text; using System.Xml.Schema; using System.Xml.XPath; -using System.Security; -using System.Globalization; -using System.Runtime.Versioning; namespace System.Xml { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Dom/XmlElement.cs b/src/libraries/System.Private.Xml/src/System/Xml/Dom/XmlElement.cs index 50ae829ffd617..7ec03f090c163 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Dom/XmlElement.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Dom/XmlElement.cs @@ -2,12 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Xml.Schema; -using System.Xml.XPath; using System.Collections; using System.Diagnostics; -using System.Globalization; using System.Diagnostics.CodeAnalysis; +using System.Globalization; +using System.Xml.Schema; +using System.Xml.XPath; namespace System.Xml { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Dom/XmlLoader.cs b/src/libraries/System.Private.Xml/src/System/Xml/Dom/XmlLoader.cs index cfa576bc0df1d..ece0c3aa94e24 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Dom/XmlLoader.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Dom/XmlLoader.cs @@ -1,11 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.IO; -using System.Diagnostics; -using System.Globalization; using System.Collections; using System.Collections.Generic; +using System.Diagnostics; +using System.Globalization; +using System.IO; using System.Xml.Schema; namespace System.Xml diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Dom/XmlNode.cs b/src/libraries/System.Private.Xml/src/System/Xml/Dom/XmlNode.cs index 32e77bc9cff3a..52ba2fc9075fa 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Dom/XmlNode.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Dom/XmlNode.cs @@ -2,15 +2,15 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.IO; using System.Collections; -using System.Text; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; +using System.Globalization; +using System.IO; +using System.Text; using System.Xml.Schema; using System.Xml.XPath; using MS.Internal.Xml.XPath; -using System.Globalization; -using System.Diagnostics.CodeAnalysis; namespace System.Xml { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/IApplicationResourceStreamResolver.cs b/src/libraries/System.Private.Xml/src/System/Xml/IApplicationResourceStreamResolver.cs index 0ba7d831c76c1..d3605965818aa 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/IApplicationResourceStreamResolver.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/IApplicationResourceStreamResolver.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.IO; using System.ComponentModel; +using System.IO; namespace System.Xml { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Resolvers/XmlPreloadedResolver.cs b/src/libraries/System.Private.Xml/src/System/Xml/Resolvers/XmlPreloadedResolver.cs index a746ab4e52b55..6dc4f5e00dff4 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Resolvers/XmlPreloadedResolver.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Resolvers/XmlPreloadedResolver.cs @@ -1,14 +1,14 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Collections.Generic; +using System.Diagnostics; using System.IO; -using System.Xml; using System.Net; -using System.Text; using System.Reflection; -using System.Diagnostics; -using System.Collections.Generic; using System.Runtime.Versioning; +using System.Text; +using System.Xml; namespace System.Xml.Resolvers { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Resolvers/XmlPreloadedResolverAsync.cs b/src/libraries/System.Private.Xml/src/System/Xml/Resolvers/XmlPreloadedResolverAsync.cs index 296a39d9e7016..09f53c552b539 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Resolvers/XmlPreloadedResolverAsync.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Resolvers/XmlPreloadedResolverAsync.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.IO; -using System.Xml; using System.Threading.Tasks; +using System.Xml; namespace System.Xml.Resolvers { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Schema/Asttree.cs b/src/libraries/System.Private.Xml/src/System/Xml/Schema/Asttree.cs index 46a430b230e69..09c98d1dcd2ea 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Schema/Asttree.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Schema/Asttree.cs @@ -1,14 +1,14 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Xml.XPath; +using System.Collections; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.IO; -using System.Collections; using System.Xml.Schema; +using System.Xml.XPath; using MS.Internal.Xml.XPath; -using System.Diagnostics.CodeAnalysis; namespace System.Xml.Schema { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Schema/BaseProcessor.cs b/src/libraries/System.Private.Xml/src/System/Xml/Schema/BaseProcessor.cs index 10fa6f13b4ae5..4d04460c2085d 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Schema/BaseProcessor.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Schema/BaseProcessor.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Collections; -using System.Text; using System.Diagnostics; +using System.Text; namespace System.Xml.Schema { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Schema/BaseValidator.cs b/src/libraries/System.Private.Xml/src/System/Xml/Schema/BaseValidator.cs index 0708e6af3604e..09c0b5a368cb6 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Schema/BaseValidator.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Schema/BaseValidator.cs @@ -1,12 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.IO; -using System.Diagnostics; -using System.Xml; -using System.Text; using System.Collections; +using System.Diagnostics; using System.Diagnostics.CodeAnalysis; +using System.IO; +using System.Text; +using System.Xml; namespace System.Xml.Schema { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Schema/CompiledidEntityConstraint.cs b/src/libraries/System.Private.Xml/src/System/Xml/Schema/CompiledidEntityConstraint.cs index e85269b80bc88..f7d0024235073 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Schema/CompiledidEntityConstraint.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Schema/CompiledidEntityConstraint.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Text; using System.Collections; using System.Diagnostics; +using System.Text; using System.Xml.XPath; using MS.Internal.Xml.XPath; diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Schema/DataTypeImplementation.cs b/src/libraries/System.Private.Xml/src/System/Xml/Schema/DataTypeImplementation.cs index d24b86f64e303..05f8bdc0bcbbc 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Schema/DataTypeImplementation.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Schema/DataTypeImplementation.cs @@ -2,17 +2,17 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.IO; using System.Collections; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Globalization; +using System.IO; +using System.Reflection; using System.Text; using System.Text.RegularExpressions; using System.Xml; -using System.Xml.XPath; using System.Xml.Serialization; -using System.Reflection; +using System.Xml.XPath; namespace System.Xml.Schema { @@ -1097,7 +1097,7 @@ internal override RestrictionFlags ValidRestrictionFlags if (exception != null) goto Error; ArrayList values = new ArrayList(); - object array; + Type arrayType; if (_itemType.Variety == XmlSchemaDatatypeVariety.Union) { object? unionTypedValue; @@ -1113,7 +1113,7 @@ internal override RestrictionFlags ValidRestrictionFlags XsdSimpleValue simpleValue = (XsdSimpleValue)unionTypedValue; values.Add(new XmlAtomicValue(simpleValue.XmlType, simpleValue.TypedValue, nsmgr)); } - array = ToArray(values, typeof(XmlAtomicValue[])); + arrayType = typeof(XmlAtomicValue[]); } else { //Variety == List or Atomic @@ -1126,13 +1126,17 @@ internal override RestrictionFlags ValidRestrictionFlags values.Add(typedValue); } Debug.Assert(_itemType.ListValueType.GetElementType() == _itemType.ValueType); - array = ToArray(values, _itemType.ListValueType); + arrayType = _itemType.ListValueType; } + if (values.Count < _minListSize) { return new XmlSchemaException(SR.Sch_EmptyAttributeValue, string.Empty); } + Array array = Array.CreateInstanceFromArrayType(arrayType, values.Count); + values.CopyTo(array); + exception = listFacetsChecker.CheckValueFacets(array, this); if (exception != null) goto Error; @@ -1142,12 +1146,6 @@ internal override RestrictionFlags ValidRestrictionFlags Error: return exception; - - // TODO: Replace with https://github.com/dotnet/runtime/issues/76478 once available - [UnconditionalSuppressMessage("AotAnalysis", "IL3050:AotUnfriendlyApi", - Justification = "Array type is always present as it is passed in as a parameter.")] - static Array ToArray(ArrayList values, Type arrayType) - => values.ToArray(arrayType.GetElementType()!); } } diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Schema/DtdParser.cs b/src/libraries/System.Private.Xml/src/System/Xml/Schema/DtdParser.cs index 96cd5df6ac1c9..ef6e00ce56613 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Schema/DtdParser.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Schema/DtdParser.cs @@ -2,14 +2,14 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.IO; -using System.Text; -using System.Xml.Schema; -using System.Diagnostics; using System.Collections; using System.Collections.Generic; -using System.Globalization; +using System.Diagnostics; using System.Diagnostics.CodeAnalysis; +using System.Globalization; +using System.IO; +using System.Text; +using System.Xml.Schema; namespace System.Xml { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Schema/DtdParserAsync.cs b/src/libraries/System.Private.Xml/src/System/Xml/Schema/DtdParserAsync.cs index fb13f2f8fce68..3b7a710d73b4b 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Schema/DtdParserAsync.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Schema/DtdParserAsync.cs @@ -2,15 +2,14 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.IO; -using System.Text; -using System.Xml.Schema; -using System.Diagnostics; using System.Collections; using System.Collections.Generic; +using System.Diagnostics; using System.Globalization; - +using System.IO; +using System.Text; using System.Threading.Tasks; +using System.Xml.Schema; namespace System.Xml { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Schema/DtdValidator.cs b/src/libraries/System.Private.Xml/src/System/Xml/Schema/DtdValidator.cs index fefc1fd013c06..6c64fd51423b9 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Schema/DtdValidator.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Schema/DtdValidator.cs @@ -3,13 +3,13 @@ using System; using System.Collections; -using System.Text; +using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.IO; using System.Net; -using System.Diagnostics; +using System.Text; using System.Xml.Schema; using System.Xml.XPath; -using System.Diagnostics.CodeAnalysis; namespace System.Xml.Schema { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Schema/FacetChecker.cs b/src/libraries/System.Private.Xml/src/System/Xml/Schema/FacetChecker.cs index 36cf113ab0957..3c1c57254bc59 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Schema/FacetChecker.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Schema/FacetChecker.cs @@ -2,16 +2,16 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; +using System.Collections; using System.ComponentModel; -using System.Xml.Serialization; -using System.Xml.Schema; -using System.Xml.XPath; using System.Diagnostics; -using System.Collections; +using System.Globalization; using System.Text; using System.Text.RegularExpressions; using System.Threading; -using System.Globalization; +using System.Xml.Schema; +using System.Xml.Serialization; +using System.Xml.XPath; namespace System.Xml.Schema { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Schema/IXmlSchemaInfo.cs b/src/libraries/System.Private.Xml/src/System/Xml/Schema/IXmlSchemaInfo.cs index 6f4cab4807611..f9127729777ff 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Schema/IXmlSchemaInfo.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Schema/IXmlSchemaInfo.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Xml; using System.Collections; +using System.Xml; namespace System.Xml.Schema { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Schema/Inference/Infer.cs b/src/libraries/System.Private.Xml/src/System/Xml/Schema/Inference/Infer.cs index f519d6468b22f..9c7e3c6e4f87b 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Schema/Inference/Infer.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Schema/Inference/Infer.cs @@ -2,11 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.IO; -using System.Xml; using System.Collections; using System.Diagnostics; using System.Globalization; +using System.IO; +using System.Xml; namespace System.Xml.Schema { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Schema/Inference/XmlSchemaInferenceException.cs b/src/libraries/System.Private.Xml/src/System/Xml/Schema/Inference/XmlSchemaInferenceException.cs index a94063d84e260..b86d1a9083164 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Schema/Inference/XmlSchemaInferenceException.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Schema/Inference/XmlSchemaInferenceException.cs @@ -3,12 +3,12 @@ using System; using System.ComponentModel; +using System.Diagnostics; +using System.Globalization; using System.IO; using System.Resources; using System.Runtime.Serialization; using System.Text; -using System.Diagnostics; -using System.Globalization; namespace System.Xml.Schema { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Schema/NamespaceList.cs b/src/libraries/System.Private.Xml/src/System/Xml/Schema/NamespaceList.cs index e66f1f82aa574..430fc76c6ab62 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Schema/NamespaceList.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Schema/NamespaceList.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Collections; -using System.Text; using System.Diagnostics; +using System.Text; namespace System.Xml.Schema { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Schema/Parser.cs b/src/libraries/System.Private.Xml/src/System/Xml/Schema/Parser.cs index 32668940ff178..6497a9f2e3356 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Schema/Parser.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Schema/Parser.cs @@ -3,11 +3,11 @@ using System; using System.Collections; -using System.Globalization; -using System.Text; -using System.IO; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; +using System.Globalization; +using System.IO; +using System.Text; namespace System.Xml.Schema { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Schema/ParserAsync.cs b/src/libraries/System.Private.Xml/src/System/Xml/Schema/ParserAsync.cs index fc5411781b4aa..1bf51edc3c480 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Schema/ParserAsync.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Schema/ParserAsync.cs @@ -3,11 +3,10 @@ using System; using System.Collections; +using System.Diagnostics; using System.Globalization; -using System.Text; using System.IO; -using System.Diagnostics; - +using System.Text; using System.Threading.Tasks; namespace System.Xml.Schema diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Schema/Preprocessor.cs b/src/libraries/System.Private.Xml/src/System/Xml/Schema/Preprocessor.cs index 51b691633268b..ece91ebee076c 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Schema/Preprocessor.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Schema/Preprocessor.cs @@ -2,12 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Collections; -using System.IO; -using System.Threading; -using System.Diagnostics; using System.Collections.Generic; -using System.Runtime.Versioning; +using System.Diagnostics; +using System.IO; using System.Reflection; +using System.Runtime.Versioning; +using System.Threading; namespace System.Xml.Schema { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Schema/SchemaAttDef.cs b/src/libraries/System.Private.Xml/src/System/Xml/Schema/SchemaAttDef.cs index f53134719d3ed..05cbda26d169e 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Schema/SchemaAttDef.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Schema/SchemaAttDef.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Diagnostics; using System.Collections.Generic; +using System.Diagnostics; using System.Diagnostics.CodeAnalysis; namespace System.Xml.Schema diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Schema/SchemaCollectionpreProcessor.cs b/src/libraries/System.Private.Xml/src/System/Xml/Schema/SchemaCollectionpreProcessor.cs index b3c670fe617d1..971f7b5280633 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Schema/SchemaCollectionpreProcessor.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Schema/SchemaCollectionpreProcessor.cs @@ -3,8 +3,8 @@ using System.Collections; using System.Collections.Generic; -using System.IO; using System.Diagnostics; +using System.IO; using System.Runtime.Versioning; namespace System.Xml.Schema diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Schema/SchemaElementDecl.cs b/src/libraries/System.Private.Xml/src/System/Xml/Schema/SchemaElementDecl.cs index 72b3645ef9c71..71b67f49da800 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Schema/SchemaElementDecl.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Schema/SchemaElementDecl.cs @@ -3,8 +3,8 @@ using System; using System.Collections; -using System.Diagnostics; using System.Collections.Generic; +using System.Diagnostics; namespace System.Xml.Schema { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Schema/SchemaInfo.cs b/src/libraries/System.Private.Xml/src/System/Xml/Schema/SchemaInfo.cs index df934c1157617..ac41336bb4408 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Schema/SchemaInfo.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Schema/SchemaInfo.cs @@ -2,9 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Xml; -using System.Diagnostics; using System.Collections.Generic; +using System.Diagnostics; +using System.Xml; namespace System.Xml.Schema { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Schema/SchemaNamespacemanager.cs b/src/libraries/System.Private.Xml/src/System/Xml/Schema/SchemaNamespacemanager.cs index 600d7c0f357a7..5b87c86b54f8f 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Schema/SchemaNamespacemanager.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Schema/SchemaNamespacemanager.cs @@ -2,9 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Diagnostics; using System.Collections; using System.Collections.Generic; +using System.Diagnostics; namespace System.Xml.Schema { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Schema/SchemaSetCompiler.cs b/src/libraries/System.Private.Xml/src/System/Xml/Schema/SchemaSetCompiler.cs index 6fe5a25c62c9e..c73bab3e9dbae 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Schema/SchemaSetCompiler.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Schema/SchemaSetCompiler.cs @@ -4,10 +4,10 @@ using System; using System.Collections; using System.Collections.Generic; -using System.Globalization; -using System.Text; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; +using System.Globalization; +using System.Text; namespace System.Xml.Schema { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Schema/XdrBuilder.cs b/src/libraries/System.Private.Xml/src/System/Xml/Schema/XdrBuilder.cs index 2c26833736760..e950d74aaccce 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Schema/XdrBuilder.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Schema/XdrBuilder.cs @@ -1,14 +1,14 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.IO; using System.Collections; using System.Collections.Generic; -using System.Diagnostics; using System.ComponentModel; +using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Globalization; +using System.IO; using System.Runtime.Versioning; -using System.Diagnostics.CodeAnalysis; namespace System.Xml.Schema { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Schema/XdrValidator.cs b/src/libraries/System.Private.Xml/src/System/Xml/Schema/XdrValidator.cs index e201be1218a49..0632e4a5792a3 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Schema/XdrValidator.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Schema/XdrValidator.cs @@ -1,13 +1,13 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.IO; -using System.Text; using System.Collections; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Globalization; +using System.IO; using System.Runtime.Versioning; -using System.Diagnostics.CodeAnalysis; +using System.Text; namespace System.Xml.Schema { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Schema/XmlAtomicValue.cs b/src/libraries/System.Private.Xml/src/System/Xml/Schema/XmlAtomicValue.cs index a4a213dd865cf..8513cf8da2e25 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Schema/XmlAtomicValue.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Schema/XmlAtomicValue.cs @@ -4,9 +4,9 @@ using System; using System.Collections; using System.Collections.Generic; +using System.Diagnostics; using System.Runtime.InteropServices; using System.Xml.XPath; -using System.Diagnostics; namespace System.Xml.Schema { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Schema/XmlSchema.cs b/src/libraries/System.Private.Xml/src/System/Xml/Schema/XmlSchema.cs index 03fe5bc2c8729..94ac61bcb9c65 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Schema/XmlSchema.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Schema/XmlSchema.cs @@ -1,14 +1,14 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.IO; using System.Collections; +using System.Collections.Generic; using System.ComponentModel; -using System.Xml.Serialization; -using System.Threading; using System.Diagnostics; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; +using System.IO; +using System.Threading; +using System.Xml.Serialization; namespace System.Xml.Schema { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Schema/XmlSchemaAny.cs b/src/libraries/System.Private.Xml/src/System/Xml/Schema/XmlSchemaAny.cs index 8eb642d5e6f5b..caefe3a67a65d 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Schema/XmlSchemaAny.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Schema/XmlSchemaAny.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.ComponentModel; -using System.Xml.Serialization; using System.Text; +using System.Xml.Serialization; namespace System.Xml.Schema { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Schema/XmlSchemaCollection.cs b/src/libraries/System.Private.Xml/src/System/Xml/Schema/XmlSchemaCollection.cs index e817e1965362e..956711af9736e 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Schema/XmlSchemaCollection.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Schema/XmlSchemaCollection.cs @@ -2,11 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; +using System.Collections; using System.Diagnostics.CodeAnalysis; +using System.Runtime.Versioning; using System.Threading; -using System.Collections; using System.Xml.Schema; -using System.Runtime.Versioning; namespace System.Xml.Schema { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Schema/XmlSchemaDataType.cs b/src/libraries/System.Private.Xml/src/System/Xml/Schema/XmlSchemaDataType.cs index 5cd0d5b9d35a7..2ac345672a40d 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Schema/XmlSchemaDataType.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Schema/XmlSchemaDataType.cs @@ -2,12 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Collections; -using System.Diagnostics; using System.ComponentModel; -using System.Xml; -using System.IO; +using System.Diagnostics; using System.Globalization; +using System.IO; using System.Text; +using System.Xml; namespace System.Xml.Schema { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Schema/XmlSchemaElement.cs b/src/libraries/System.Private.Xml/src/System/Xml/Schema/XmlSchemaElement.cs index 896bffc2a4f9b..b4e3e8e9f701a 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Schema/XmlSchemaElement.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Schema/XmlSchemaElement.cs @@ -2,9 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.ComponentModel; -using System.Xml.Serialization; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; +using System.Xml.Serialization; namespace System.Xml.Schema { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Schema/XmlSchemaException.cs b/src/libraries/System.Private.Xml/src/System/Xml/Schema/XmlSchemaException.cs index a6e1e567fd48a..330f1487d3ed4 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Schema/XmlSchemaException.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Schema/XmlSchemaException.cs @@ -3,12 +3,12 @@ using System; using System.ComponentModel; +using System.Diagnostics; +using System.Globalization; using System.IO; -using System.Text; using System.Resources; using System.Runtime.Serialization; -using System.Globalization; -using System.Diagnostics; +using System.Text; namespace System.Xml.Schema { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Schema/XmlSchemaInfo.cs b/src/libraries/System.Private.Xml/src/System/Xml/Schema/XmlSchemaInfo.cs index b4f7290a57c8a..7b7a9ae624968 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Schema/XmlSchemaInfo.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Schema/XmlSchemaInfo.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Xml; using System.Collections; +using System.Xml; namespace System.Xml.Schema { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Schema/XmlSchemaSet.cs b/src/libraries/System.Private.Xml/src/System/Xml/Schema/XmlSchemaSet.cs index f8292c5e70a12..db8d7a7396296 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Schema/XmlSchemaSet.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Schema/XmlSchemaSet.cs @@ -1,12 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Diagnostics; using System.Collections; -using System.Threading; using System.Collections.Generic; -using System.Runtime.Versioning; +using System.Diagnostics; using System.Diagnostics.CodeAnalysis; +using System.Runtime.Versioning; +using System.Threading; namespace System.Xml.Schema { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Schema/XmlSchemaSimpleType.cs b/src/libraries/System.Private.Xml/src/System/Xml/Schema/XmlSchemaSimpleType.cs index 9c8078cf630b0..8bb6d41419ea6 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Schema/XmlSchemaSimpleType.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Schema/XmlSchemaSimpleType.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Xml.Serialization; using System.Diagnostics; +using System.Xml.Serialization; namespace System.Xml.Schema { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Schema/XmlSchemaValidationException.cs b/src/libraries/System.Private.Xml/src/System/Xml/Schema/XmlSchemaValidationException.cs index b542720a2f6d4..a0187e69c6126 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Schema/XmlSchemaValidationException.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Schema/XmlSchemaValidationException.cs @@ -3,11 +3,11 @@ using System; using System.ComponentModel; +using System.Diagnostics; using System.IO; -using System.Text; using System.Resources; using System.Runtime.Serialization; -using System.Diagnostics; +using System.Text; namespace System.Xml.Schema { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Schema/XmlSchemaValidator.cs b/src/libraries/System.Private.Xml/src/System/Xml/Schema/XmlSchemaValidator.cs index 913c2e9237621..cd7b1d6a288d1 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Schema/XmlSchemaValidator.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Schema/XmlSchemaValidator.cs @@ -4,15 +4,15 @@ using System; using System.Collections; using System.Collections.Generic; -using System.Text; -using System.IO; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; +using System.IO; +using System.Runtime.Versioning; +using System.Text; +using System.Threading; using System.Xml; using System.Xml.Schema; using System.Xml.XPath; -using System.Threading; -using System.Runtime.Versioning; -using System.Diagnostics.CodeAnalysis; namespace System.Xml.Schema { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Schema/XmlValueConverter.cs b/src/libraries/System.Private.Xml/src/System/Xml/Schema/XmlValueConverter.cs index d29b355c889e1..2a73f6dd24cc4 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Schema/XmlValueConverter.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Schema/XmlValueConverter.cs @@ -2,18 +2,18 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Xml; -using System.Xml.XPath; -using System.Globalization; -using System.Diagnostics; -using System.Diagnostics.CodeAnalysis; using System.Collections; using System.Collections.Generic; -using System.Xml.Schema; +using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; +using System.Globalization; using System.IO; -using System.Text; -using System.Runtime.InteropServices; using System.Reflection; +using System.Runtime.InteropServices; +using System.Text; +using System.Xml; +using System.Xml.Schema; +using System.Xml.XPath; namespace System.Xml.Schema { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Schema/XsdBuilder.cs b/src/libraries/System.Private.Xml/src/System/Xml/Schema/XsdBuilder.cs index bc4c33a59e72d..b692fac96ea57 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Schema/XsdBuilder.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Schema/XsdBuilder.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.IO; using System.Collections.Generic; using System.Diagnostics; +using System.IO; using System.Xml; using System.Xml.Serialization; diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Schema/XsdDuration.cs b/src/libraries/System.Private.Xml/src/System/Xml/Schema/XsdDuration.cs index f4612b2c541f4..7640d76bd6406 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Schema/XsdDuration.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Schema/XsdDuration.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Globalization; using System; using System.Diagnostics; +using System.Globalization; using System.Text; namespace System.Xml.Schema diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Schema/XsdValidator.cs b/src/libraries/System.Private.Xml/src/System/Xml/Schema/XsdValidator.cs index 4025b2c9c0429..a9d42e366b7ba 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Schema/XsdValidator.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Schema/XsdValidator.cs @@ -3,13 +3,13 @@ using System.Collections; using System.Collections.Specialized; -using System.Text; -using System.IO; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; +using System.IO; +using System.Runtime.Versioning; +using System.Text; using System.Xml.Schema; using System.Xml.XPath; -using System.Runtime.Versioning; -using System.Diagnostics.CodeAnalysis; namespace System.Xml.Schema { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/CodeGenerator.cs b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/CodeGenerator.cs index a39da73d5832e..05baeff345b78 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/CodeGenerator.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/CodeGenerator.cs @@ -13,10 +13,10 @@ using System.Reflection.Emit; using System.Resources; using System.Runtime.CompilerServices; -using System.Xml; -using System.Xml.Serialization.Configuration; using System.Security; using System.Text.RegularExpressions; +using System.Xml; +using System.Xml.Serialization.Configuration; namespace System.Xml.Serialization { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/CodeIdentifiers.cs b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/CodeIdentifiers.cs index 01123c8240cf6..b6ba559df0aff 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/CodeIdentifiers.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/CodeIdentifiers.cs @@ -3,8 +3,8 @@ using System; using System.Collections; -using System.IO; using System.Globalization; +using System.IO; namespace System.Xml.Serialization { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/Compilation.cs b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/Compilation.cs index 8b87f1ce77756..75d5da305a228 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/Compilation.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/Compilation.cs @@ -1,18 +1,18 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Reflection; -using System.Reflection.Emit; using System.Collections; -using System.IO; -using System.Text; -using System.Threading; -using System.Security; -using System.Globalization; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; +using System.Globalization; +using System.IO; +using System.Reflection; +using System.Reflection.Emit; using System.Runtime.CompilerServices; using System.Runtime.Loader; +using System.Security; +using System.Text; +using System.Threading; namespace System.Xml.Serialization { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/Configuration/DateTimeSerializationSection.cs b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/Configuration/DateTimeSerializationSection.cs index baa740ecbcc9e..0063499f67e35 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/Configuration/DateTimeSerializationSection.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/Configuration/DateTimeSerializationSection.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Configuration; using System.ComponentModel; +using System.Configuration; using System.Globalization; using System.Reflection; diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/Globals.cs b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/Globals.cs index 1a83cd547d992..2801ea8016d65 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/Globals.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/Globals.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System; using System.Diagnostics.CodeAnalysis; -using System.Security; using System.Reflection; -using System; +using System.Security; namespace System.Xml.Serialization diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/ImportContext.cs b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/ImportContext.cs index d6d93c540041d..8531d3f2b3659 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/ImportContext.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/ImportContext.cs @@ -2,14 +2,14 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; +using System.Collections; +using System.Collections.Specialized; +using System.Diagnostics.CodeAnalysis; using System.IO; +using System.Reflection; using System.Xml; using System.Xml.Schema; using System.Xml.Serialization; -using System.Collections; -using System.Collections.Specialized; -using System.Reflection; -using System.Diagnostics.CodeAnalysis; namespace System.Xml.Serialization { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/Mappings.cs b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/Mappings.cs index 2daa8020dc598..08f4819eacdc2 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/Mappings.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/Mappings.cs @@ -1,17 +1,17 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Reflection; +using System; using System.Collections; using System.Collections.Generic; +using System.ComponentModel; using System.Diagnostics; -using System.Xml.Schema; -using System; +using System.Diagnostics.CodeAnalysis; +using System.Reflection; using System.Text; -using System.ComponentModel; using System.Xml; +using System.Xml.Schema; using System.Xml.Serialization; -using System.Diagnostics.CodeAnalysis; namespace System.Xml.Serialization { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/Models.cs b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/Models.cs index a9cd3d1d0ed31..2f3d20c19f463 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/Models.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/Models.cs @@ -2,11 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Reflection; using System.Collections; -using System.Diagnostics; using System.Collections.Generic; +using System.Diagnostics; using System.Diagnostics.CodeAnalysis; +using System.Reflection; namespace System.Xml.Serialization { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/NameTable.cs b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/NameTable.cs index 769f329d6d0d9..d2a30b6d2f753 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/NameTable.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/NameTable.cs @@ -1,11 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Diagnostics.CodeAnalysis; -using System.Xml; using System; using System.Collections; using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; +using System.Xml; namespace System.Xml.Serialization { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/ReflectionXmlSerializationReader.cs b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/ReflectionXmlSerializationReader.cs index 56ea3f55674a6..e9e2fdfe39bca 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/ReflectionXmlSerializationReader.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/ReflectionXmlSerializationReader.cs @@ -572,8 +572,7 @@ private static void SetCollectionObjectWithCollectionMember([NotNull] ref object } else { - Type elementType = collectionType.GetElementType()!; - a = Array.CreateInstance(elementType, collectionMember.Count); + a = Array.CreateInstanceFromArrayType(collectionType, collectionMember.Count); } for (int i = 0; i < collectionMember.Count; i++) diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/SchemaObjectWriter.cs b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/SchemaObjectWriter.cs index 5d2d6175ebd35..6ede76395540a 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/SchemaObjectWriter.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/SchemaObjectWriter.cs @@ -2,14 +2,14 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Text; +using System.Collections; +using System.Collections.Specialized; +using System.Diagnostics.CodeAnalysis; using System.IO; +using System.Text; using System.Xml; using System.Xml.Schema; using System.Xml.Serialization; -using System.Collections; -using System.Collections.Specialized; -using System.Diagnostics.CodeAnalysis; namespace System.Xml.Serialization { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/SoapAttributeOverrides.cs b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/SoapAttributeOverrides.cs index 664c70f52ffb5..0fdbc7efcddf1 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/SoapAttributeOverrides.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/SoapAttributeOverrides.cs @@ -1,12 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Reflection; +using System; using System.Collections; +using System.ComponentModel; using System.IO; +using System.Reflection; using System.Xml.Schema; -using System; -using System.ComponentModel; namespace System.Xml.Serialization { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/SoapAttributes.cs b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/SoapAttributes.cs index b3c9409becd08..70f3af4bc5ae7 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/SoapAttributes.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/SoapAttributes.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Reflection; using System.ComponentModel; +using System.Reflection; namespace System.Xml.Serialization { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/SoapReflectionImporter.cs b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/SoapReflectionImporter.cs index eb22438a6d8cc..54798764fe12e 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/SoapReflectionImporter.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/SoapReflectionImporter.cs @@ -1,16 +1,16 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Reflection; using System; -using System.Globalization; -using System.Xml.Schema; using System.Collections.Generic; using System.ComponentModel; +using System.Diagnostics.CodeAnalysis; +using System.Globalization; +using System.Reflection; using System.Threading; using System.Xml; +using System.Xml.Schema; using System.Xml.Serialization; -using System.Diagnostics.CodeAnalysis; namespace System.Xml.Serialization { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlAnyElementAttributes.cs b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlAnyElementAttributes.cs index 00b1d398e57f7..0fed9999f9600 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlAnyElementAttributes.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlAnyElementAttributes.cs @@ -2,9 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Reflection; using System.Collections; using System.ComponentModel; +using System.Reflection; namespace System.Xml.Serialization { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlArrayItemAttributes.cs b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlArrayItemAttributes.cs index 81251219246f3..8a0c69c97adff 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlArrayItemAttributes.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlArrayItemAttributes.cs @@ -2,9 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Reflection; using System.Collections; using System.ComponentModel; +using System.Reflection; namespace System.Xml.Serialization { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlAttributeOverrides.cs b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlAttributeOverrides.cs index 0786062cf8255..3c5c9fcde3110 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlAttributeOverrides.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlAttributeOverrides.cs @@ -1,13 +1,13 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Reflection; +using System; using System.Collections; +using System.Collections.Generic; +using System.ComponentModel; using System.IO; +using System.Reflection; using System.Xml.Schema; -using System; -using System.ComponentModel; -using System.Collections.Generic; namespace System.Xml.Serialization { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlAttributes.cs b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlAttributes.cs index c6925ffce5483..cb9426bfff985 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlAttributes.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlAttributes.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Reflection; using System.ComponentModel; +using System.Reflection; namespace System.Xml.Serialization { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlChoiceIdentifierAttribute.cs b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlChoiceIdentifierAttribute.cs index f8d7695be09b8..b4feb676d10c3 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlChoiceIdentifierAttribute.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlChoiceIdentifierAttribute.cs @@ -2,9 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Xml.Schema; -using System.Reflection; using System.Diagnostics.CodeAnalysis; +using System.Reflection; +using System.Xml.Schema; namespace System.Xml.Serialization { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlElementAttributes.cs b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlElementAttributes.cs index 1fb46e9def76e..bbeeb8ff27594 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlElementAttributes.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlElementAttributes.cs @@ -2,9 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Reflection; using System.Collections; using System.ComponentModel; +using System.Reflection; namespace System.Xml.Serialization { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlMemberMapping.cs b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlMemberMapping.cs index 7445e73f71189..8a895c3faad91 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlMemberMapping.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlMemberMapping.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Reflection; using System; +using System.Reflection; namespace System.Xml.Serialization { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlMembersMapping.cs b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlMembersMapping.cs index c10126b35f606..88a8f0f9e53ef 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlMembersMapping.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlMembersMapping.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Reflection; using System; +using System.Reflection; using System.Text; namespace System.Xml.Serialization diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlReflectionImporter.cs b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlReflectionImporter.cs index b0a635014cb6f..ace8df06bfbf3 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlReflectionImporter.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlReflectionImporter.cs @@ -1,19 +1,19 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Reflection; using System; -using System.Xml.Schema; using System.Collections; using System.Collections.Generic; using System.ComponentModel; +using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Globalization; +using System.Reflection; +using System.Runtime.CompilerServices; using System.Threading; -using System.Diagnostics; using System.Xml; +using System.Xml.Schema; using System.Xml.Serialization; -using System.Diagnostics.CodeAnalysis; -using System.Runtime.CompilerServices; namespace System.Xml.Serialization { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSchemaExporter.cs b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSchemaExporter.cs index 5d885f37accda..05f91cbce20e1 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSchemaExporter.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSchemaExporter.cs @@ -3,11 +3,11 @@ using System; using System.Collections; -using System.Xml.Schema; using System.ComponentModel; using System.Diagnostics; using System.Globalization; using System.Reflection; +using System.Xml.Schema; namespace System.Xml.Serialization { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSchemas.cs b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSchemas.cs index 90e3dd8fd712d..7311bc7b4175b 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSchemas.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSchemas.cs @@ -1,20 +1,20 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System; using System.Collections; using System.Collections.Generic; -using System.IO; -using System; -using System.Globalization; using System.ComponentModel; -using System.Xml.Serialization; -using System.Xml.Schema; using System.Diagnostics; -using System.Threading; -using System.Security; +using System.Diagnostics.CodeAnalysis; +using System.Globalization; +using System.IO; using System.Net; using System.Reflection; -using System.Diagnostics.CodeAnalysis; +using System.Security; +using System.Threading; +using System.Xml.Schema; +using System.Xml.Serialization; namespace System.Xml.Serialization { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSerializationGeneratedCode.cs b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSerializationGeneratedCode.cs index 94c7afa80f00e..56f8a56b1fbf4 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSerializationGeneratedCode.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSerializationGeneratedCode.cs @@ -2,14 +2,14 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.IO; using System.Collections; using System.ComponentModel; -using System.Threading; +using System.Diagnostics.CodeAnalysis; +using System.Globalization; +using System.IO; using System.Reflection; using System.Security; -using System.Globalization; -using System.Diagnostics.CodeAnalysis; +using System.Threading; namespace System.Xml.Serialization { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSerializationReaderILGen.cs b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSerializationReaderILGen.cs index 6db572452ea0b..625092e293674 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSerializationReaderILGen.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSerializationReaderILGen.cs @@ -5,6 +5,7 @@ using System.Collections; using System.Collections.Generic; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Reflection; using System.Reflection.Emit; @@ -12,7 +13,6 @@ using System.Text.RegularExpressions; using System.Xml; using System.Xml.Schema; -using System.Diagnostics.CodeAnalysis; namespace System.Xml.Serialization { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSerializationWriter.cs b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSerializationWriter.cs index 10ad5f886a476..b61dfb3829c61 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSerializationWriter.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSerializationWriter.cs @@ -2,22 +2,22 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.IO; using System.Collections; -using System.Reflection; -using System.Reflection.Emit; -using System.Xml.Schema; +using System.Collections.Generic; using System.ComponentModel; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Globalization; +using System.IO; +using System.Reflection; +using System.Reflection.Emit; +using System.Runtime.CompilerServices; +using System.Runtime.Versioning; using System.Text; using System.Threading; -using System.Runtime.Versioning; -using System.Collections.Generic; -using System.Xml.Serialization; using System.Xml; -using System.Diagnostics.CodeAnalysis; -using System.Runtime.CompilerServices; +using System.Xml.Schema; +using System.Xml.Serialization; namespace System.Xml.Serialization { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSerializationWriterILGen.cs b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSerializationWriterILGen.cs index 81f9462a26a7a..a4b02f95a5c7b 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSerializationWriterILGen.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSerializationWriterILGen.cs @@ -5,12 +5,12 @@ using System.Collections; using System.Collections.Generic; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Reflection; using System.Reflection.Emit; using System.Text; using System.Xml.Schema; -using System.Diagnostics.CodeAnalysis; namespace System.Xml.Serialization { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSerializerFactory.cs b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSerializerFactory.cs index f73d5e52a264e..0257ff33c30a6 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSerializerFactory.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSerializerFactory.cs @@ -1,18 +1,18 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Reflection; +using System; using System.Collections; +using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; +using System.Globalization; using System.IO; -using System.Xml.Schema; -using System; +using System.Reflection; using System.Text; using System.Threading; -using System.Globalization; -using System.Xml.Serialization.Configuration; -using System.Diagnostics; +using System.Xml.Schema; using System.Xml.Serialization; -using System.Diagnostics.CodeAnalysis; +using System.Xml.Serialization.Configuration; namespace System.Xml.Serialization { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSerializerNamespaces.cs b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSerializerNamespaces.cs index 79bc2c673658c..4ffa23ee822fe 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSerializerNamespaces.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSerializerNamespaces.cs @@ -1,14 +1,14 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Reflection; -using System.Collections; -using System.IO; -using System.Xml.Schema; using System; +using System.Collections; using System.Collections.Generic; -using System.Xml; using System.Diagnostics.CodeAnalysis; +using System.IO; +using System.Reflection; +using System.Xml; +using System.Xml.Schema; namespace System.Xml.Serialization { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlTypeMapping.cs b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlTypeMapping.cs index 87c003d729f32..540099ea804e3 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlTypeMapping.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlTypeMapping.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Reflection; using System; +using System.Reflection; namespace System.Xml.Serialization { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/Xmlcustomformatter.cs b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/Xmlcustomformatter.cs index 77a2bb1863992..95c2b5741eefb 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/Xmlcustomformatter.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/Xmlcustomformatter.cs @@ -2,14 +2,14 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Xml; -using System.Globalization; +using System.Collections; using System.ComponentModel; +using System.Configuration; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; +using System.Globalization; using System.Text; -using System.Collections; -using System.Configuration; +using System.Xml; using System.Xml.Serialization.Configuration; namespace System.Xml.Serialization diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/_Events.cs b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/_Events.cs index 0e07a3923b997..95729cf6001a8 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Serialization/_Events.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Serialization/_Events.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.IO; using System; using System.Collections; using System.ComponentModel; +using System.IO; using System.Xml; namespace System.Xml.Serialization diff --git a/src/libraries/System.Private.Xml/src/System/Xml/ValidateNames.cs b/src/libraries/System.Private.Xml/src/System/Xml/ValidateNames.cs index ff7bb5ae478e5..29271d0985192 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/ValidateNames.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/ValidateNames.cs @@ -2,9 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Xml.XPath; using System.Diagnostics; using System.Globalization; +using System.Xml.XPath; namespace System.Xml { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/XPath/Internal/XPathMultyIterator.cs b/src/libraries/System.Private.Xml/src/System/Xml/XPath/Internal/XPathMultyIterator.cs index c047cc44329b2..63dc27adc0de1 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/XPath/Internal/XPathMultyIterator.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/XPath/Internal/XPathMultyIterator.cs @@ -2,11 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Xml; -using System.Xml.XPath; +using System.Collections; using System.Diagnostics; using System.Globalization; -using System.Collections; +using System.Xml; +using System.Xml.XPath; namespace MS.Internal.Xml.XPath { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/XPath/XPathDocument.cs b/src/libraries/System.Private.Xml/src/System/Xml/XPath/XPathDocument.cs index f6f5b5448904c..67016bd7e9b76 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/XPath/XPathDocument.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/XPath/XPathDocument.cs @@ -1,11 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using MS.Internal.Xml.Cache; using System.Collections.Generic; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.IO; +using MS.Internal.Xml.Cache; namespace System.Xml.XPath { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/XPath/XPathException.cs b/src/libraries/System.Private.Xml/src/System/Xml/XPath/XPathException.cs index 420e0150a87fe..c7f5f26b68ff0 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/XPath/XPathException.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/XPath/XPathException.cs @@ -3,9 +3,9 @@ using System; using System.ComponentModel; +using System.Diagnostics; using System.Resources; using System.Runtime.Serialization; -using System.Diagnostics; namespace System.Xml.XPath { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/XPath/XPathExpr.cs b/src/libraries/System.Private.Xml/src/System/Xml/XPath/XPathExpr.cs index 447610c51f7dd..e6755908928b2 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/XPath/XPathExpr.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/XPath/XPathExpr.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using MS.Internal.Xml.XPath; using System.Collections; +using MS.Internal.Xml.XPath; namespace System.Xml.XPath { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/XPath/XPathNavigator.cs b/src/libraries/System.Private.Xml/src/System/Xml/XPath/XPathNavigator.cs index 6f96b802e36e3..ce2afa27c433d 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/XPath/XPathNavigator.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/XPath/XPathNavigator.cs @@ -1,19 +1,19 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.ComponentModel; -using System.IO; using System.Collections; using System.Collections.Generic; -using System.Globalization; -using System.Xml.Schema; +using System.ComponentModel; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; +using System.Globalization; +using System.IO; using System.Security; using System.Text; using System.Xml; +using System.Xml.Schema; using MS.Internal.Xml.Cache; using MS.Internal.Xml.XPath; -using System.Diagnostics.CodeAnalysis; namespace System.Xml.XPath { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/XPath/XPathNavigatorKeyComparer.cs b/src/libraries/System.Private.Xml/src/System/Xml/XPath/XPathNavigatorKeyComparer.cs index 5fcd79f696dd0..ca51814629286 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/XPath/XPathNavigatorKeyComparer.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/XPath/XPathNavigatorKeyComparer.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using MS.Internal.Xml.Cache; using System.Collections; +using MS.Internal.Xml.Cache; namespace System.Xml.XPath { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/XPath/XPathNavigatorReader.cs b/src/libraries/System.Private.Xml/src/System/Xml/XPath/XPathNavigatorReader.cs index 2d721747ace1b..54cebcf1f396f 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/XPath/XPathNavigatorReader.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/XPath/XPathNavigatorReader.cs @@ -1,11 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.IO; -using System.Xml.Schema; using System.Collections; -using System.Diagnostics; using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Xml.Schema; namespace System.Xml.XPath { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/XmlConvert.cs b/src/libraries/System.Private.Xml/src/System/Xml/XmlConvert.cs index ea3f14ce2402a..55535c3b8cdb9 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/XmlConvert.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/XmlConvert.cs @@ -1,13 +1,13 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Text; -using System.Globalization; -using System.Xml.Schema; -using System.Diagnostics; using System.Collections; -using System.Text.RegularExpressions; +using System.Diagnostics; using System.Diagnostics.CodeAnalysis; +using System.Globalization; +using System.Text; +using System.Text.RegularExpressions; +using System.Xml.Schema; namespace System.Xml { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/XmlEncoding.cs b/src/libraries/System.Private.Xml/src/System/Xml/XmlEncoding.cs index 123d3b607d522..2c6d151449832 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/XmlEncoding.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/XmlEncoding.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Buffers.Binary; -using System.Text; using System.Diagnostics; +using System.Text; namespace System.Xml { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/XmlException.cs b/src/libraries/System.Private.Xml/src/System/Xml/XmlException.cs index c7a6ce2e0dcba..de50afabaafb9 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/XmlException.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/XmlException.cs @@ -3,12 +3,12 @@ using System; using System.ComponentModel; -using System.Resources; -using System.Text; using System.Diagnostics; using System.Globalization; -using System.Threading; +using System.Resources; using System.Runtime.Serialization; +using System.Text; +using System.Threading; namespace System.Xml { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/XmlResolver.cs b/src/libraries/System.Private.Xml/src/System/Xml/XmlResolver.cs index 384b8dc56d619..4a827ccd34753 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/XmlResolver.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/XmlResolver.cs @@ -2,13 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; +using System.Diagnostics; using System.IO; -using System.Text; -using System.Security; using System.Net; -using System.Threading.Tasks; using System.Runtime.Versioning; -using System.Diagnostics; +using System.Security; +using System.Text; +using System.Threading.Tasks; namespace System.Xml { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/XmlUrlResolver.cs b/src/libraries/System.Private.Xml/src/System/Xml/XmlUrlResolver.cs index d915266db483b..453fd40abe381 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/XmlUrlResolver.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/XmlUrlResolver.cs @@ -1,12 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Threading; +using System.IO; using System.Net; using System.Net.Cache; using System.Runtime.Versioning; +using System.Threading; using System.Threading.Tasks; -using System.IO; namespace System.Xml { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/IlGen/GenerateHelper.cs b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/IlGen/GenerateHelper.cs index 4ccfebdcb7ac6..964ede51d0622 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/IlGen/GenerateHelper.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/IlGen/GenerateHelper.cs @@ -2,22 +2,22 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Globalization; -using System.Xml; -using System.Xml.XPath; -using System.Xml.Schema; -using System.Text; -using System.IO; using System.Collections; using System.Collections.Generic; +using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; +using System.Globalization; +using System.IO; using System.Reflection; using System.Reflection.Emit; +using System.Runtime.Versioning; using System.Security; -using System.Diagnostics; +using System.Text; +using System.Xml; +using System.Xml.Schema; +using System.Xml.XPath; using System.Xml.Xsl.Qil; using System.Xml.Xsl.Runtime; -using System.Runtime.Versioning; -using System.Diagnostics.CodeAnalysis; namespace System.Xml.Xsl.IlGen { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/IlGen/IteratorDescriptor.cs b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/IlGen/IteratorDescriptor.cs index 0491ad228a2e7..dfc7b62f63e91 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/IlGen/IteratorDescriptor.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/IlGen/IteratorDescriptor.cs @@ -4,15 +4,15 @@ using System; using System.Collections; using System.Collections.Generic; -using System.Xml; -using System.Xml.XPath; -using System.Xml.Schema; -using System.Globalization; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; +using System.Globalization; using System.Reflection; using System.Reflection.Emit; +using System.Xml; +using System.Xml.Schema; +using System.Xml.XPath; using System.Xml.Xsl.Runtime; -using System.Diagnostics.CodeAnalysis; namespace System.Xml.Xsl.IlGen { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/IlGen/XmlILConstructAnalyzer.cs b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/IlGen/XmlILConstructAnalyzer.cs index 65d93eac59430..7346cadcd902e 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/IlGen/XmlILConstructAnalyzer.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/IlGen/XmlILConstructAnalyzer.cs @@ -2,13 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Xml; -using System.Xml.Schema; -using System.Xml.XPath; -using System.Diagnostics; using System.Collections; using System.Collections.Generic; using System.Collections.Specialized; +using System.Diagnostics; +using System.Xml; +using System.Xml.Schema; +using System.Xml.XPath; using System.Xml.Xsl.Qil; namespace System.Xml.Xsl.IlGen diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/IlGen/XmlILModule.cs b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/IlGen/XmlILModule.cs index 88071e1c692c4..4e73593c24b80 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/IlGen/XmlILModule.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/IlGen/XmlILModule.cs @@ -6,9 +6,9 @@ using System.Diagnostics.CodeAnalysis; using System.Reflection; using System.Reflection.Emit; +using System.Runtime.Versioning; using System.Security; using System.Xml.Xsl.Runtime; -using System.Runtime.Versioning; using DebuggingModes = System.Diagnostics.DebuggableAttribute.DebuggingModes; namespace System.Xml.Xsl.IlGen diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/IlGen/XmlILTrace.cs b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/IlGen/XmlILTrace.cs index 45d0a004a2a5f..353376695877d 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/IlGen/XmlILTrace.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/IlGen/XmlILTrace.cs @@ -2,12 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; +using System.Globalization; using System.IO; +using System.Runtime.Versioning; using System.Security; using System.Xml; -using System.Globalization; using System.Xml.Xsl.Qil; -using System.Runtime.Versioning; // This class is only for debug purposes so there is no need to have it in Retail builds #if DEBUG diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/IlGen/XmlIlTypeHelper.cs b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/IlGen/XmlIlTypeHelper.cs index fc4253c4ebc40..2d34384612aad 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/IlGen/XmlIlTypeHelper.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/IlGen/XmlIlTypeHelper.cs @@ -3,12 +3,12 @@ using System; using System.Collections.Generic; +using System.Diagnostics; using System.IO; using System.Text; -using System.Diagnostics; using System.Xml; -using System.Xml.XPath; using System.Xml.Schema; +using System.Xml.XPath; using System.Xml.Xsl.Runtime; namespace System.Xml.Xsl.IlGen diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/ListBase.cs b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/ListBase.cs index d2996cf63f3df..78990c13523dc 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/ListBase.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/ListBase.cs @@ -2,13 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Xml; -using System.Xml.Schema; using System.Collections.Generic; using System.Diagnostics; -using System.Text; -using System.Reflection; using System.Diagnostics.CodeAnalysis; +using System.Reflection; +using System.Text; +using System.Xml; +using System.Xml.Schema; namespace System.Xml.Xsl { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/QIL/QilDataSource.cs b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/QIL/QilDataSource.cs index 006f770405342..7a10854a6008e 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/QIL/QilDataSource.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/QIL/QilDataSource.cs @@ -3,8 +3,8 @@ using System; using System.Collections.Generic; -using System.Xml.Schema; using System.Diagnostics; +using System.Xml.Schema; namespace System.Xml.Xsl.Qil { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/QIL/QilTargetType.cs b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/QIL/QilTargetType.cs index 2d0931291f624..5d79c9ebdbf58 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/QIL/QilTargetType.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/QIL/QilTargetType.cs @@ -3,8 +3,8 @@ using System; using System.Collections.Generic; -using System.Xml.Schema; using System.Diagnostics; +using System.Xml.Schema; namespace System.Xml.Xsl.Qil { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/ContentIterators.cs b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/ContentIterators.cs index e2650a445d63b..0ddf5366b0b8a 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/ContentIterators.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/ContentIterators.cs @@ -2,12 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Xml; -using System.Xml.XPath; -using System.Xml.Schema; -using System.Diagnostics; using System.Collections; using System.ComponentModel; +using System.Diagnostics; +using System.Xml; +using System.Xml.Schema; +using System.Xml.XPath; namespace System.Xml.Xsl.Runtime { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/DocumentOrderComparer.cs b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/DocumentOrderComparer.cs index 35c2771ca18b2..f901d4fc58d85 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/DocumentOrderComparer.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/DocumentOrderComparer.cs @@ -4,9 +4,9 @@ using System; using System.Collections; using System.Collections.Generic; +using System.Diagnostics; using System.Xml; using System.Xml.XPath; -using System.Diagnostics; namespace System.Xml.Xsl.Runtime { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/DodSequenceMerge.cs b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/DodSequenceMerge.cs index c966cd80ccd99..bed10ad593901 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/DodSequenceMerge.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/DodSequenceMerge.cs @@ -3,10 +3,10 @@ using System; using System.Collections.Generic; -using System.Xml.XPath; +using System.ComponentModel; using System.Diagnostics; using System.Globalization; -using System.ComponentModel; +using System.Xml.XPath; namespace System.Xml.Xsl.Runtime { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/RtfNavigator.cs b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/RtfNavigator.cs index 54a3c24d1534e..e70a64cedc2b0 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/RtfNavigator.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/RtfNavigator.cs @@ -2,15 +2,15 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Threading; -using System.IO; using System.Collections; +using System.Diagnostics; using System.Globalization; +using System.IO; using System.Text; -using System.Diagnostics; +using System.Threading; using System.Xml; -using System.Xml.XPath; using System.Xml.Schema; +using System.Xml.XPath; namespace System.Xml.Xsl.Runtime { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/SetIterators.cs b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/SetIterators.cs index 7e92b43627a22..e8bfc900eb5e9 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/SetIterators.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/SetIterators.cs @@ -2,12 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Xml; -using System.Xml.XPath; -using System.Xml.Schema; -using System.Diagnostics; using System.Collections; using System.ComponentModel; +using System.Diagnostics; +using System.Xml; +using System.Xml.Schema; +using System.Xml.XPath; namespace System.Xml.Xsl.Runtime { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/SiblingIterators.cs b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/SiblingIterators.cs index 16f0e8c68b2d6..78a6c3f13cb68 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/SiblingIterators.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/SiblingIterators.cs @@ -2,12 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Xml; -using System.Xml.XPath; -using System.Xml.Schema; -using System.Diagnostics; using System.Collections; using System.ComponentModel; +using System.Diagnostics; +using System.Xml; +using System.Xml.Schema; +using System.Xml.XPath; namespace System.Xml.Xsl.Runtime { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/StringConcat.cs b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/StringConcat.cs index f2f61ca05081e..4ea3aae1c9495 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/StringConcat.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/StringConcat.cs @@ -3,8 +3,8 @@ using System; using System.Collections.Generic; -using System.Diagnostics; using System.ComponentModel; +using System.Diagnostics; namespace System.Xml.Xsl.Runtime { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/WhitespaceRuleLookup.cs b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/WhitespaceRuleLookup.cs index 17626a996f177..ad1d2207872d9 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/WhitespaceRuleLookup.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/WhitespaceRuleLookup.cs @@ -2,13 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Xml; using System.Collections; using System.Collections.Generic; using System.Diagnostics; -using MS.Internal.Xml; -using System.Xml.Xsl.Qil; using System.Diagnostics.CodeAnalysis; +using System.Xml; +using System.Xml.Xsl.Qil; +using MS.Internal.Xml; namespace System.Xml.Xsl.Runtime { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/XmlAggregates.cs b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/XmlAggregates.cs index 6fb4a836fbcb4..31f8f4a99a1b8 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/XmlAggregates.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/XmlAggregates.cs @@ -2,9 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Xml; -using System.Diagnostics; using System.ComponentModel; +using System.Diagnostics; +using System.Xml; namespace System.Xml.Xsl.Runtime { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/XmlAttributeCache.cs b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/XmlAttributeCache.cs index e26f8377740ad..381e386ea73b8 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/XmlAttributeCache.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/XmlAttributeCache.cs @@ -4,8 +4,8 @@ using System; using System.Diagnostics; using System.Xml; -using System.Xml.XPath; using System.Xml.Schema; +using System.Xml.XPath; namespace System.Xml.Xsl.Runtime { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/XmlExtensionFunction.cs b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/XmlExtensionFunction.cs index 95ef4a5d2956f..6c97043c18a3b 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/XmlExtensionFunction.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/XmlExtensionFunction.cs @@ -3,12 +3,12 @@ using System; using System.Collections.Generic; -using System.Xml; -using System.Xml.Schema; -using System.Reflection; -using System.Globalization; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; +using System.Globalization; +using System.Reflection; +using System.Xml; +using System.Xml.Schema; namespace System.Xml.Xsl.Runtime { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/XmlILStorageConverter.cs b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/XmlILStorageConverter.cs index 9b15d32a9fc70..56fd5da233974 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/XmlILStorageConverter.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/XmlILStorageConverter.cs @@ -3,12 +3,12 @@ using System; using System.Collections.Generic; +using System.ComponentModel; using System.IO; using System.Xml; -using System.Xml.XPath; using System.Xml.Schema; +using System.Xml.XPath; using System.Xml.Xsl; -using System.ComponentModel; namespace System.Xml.Xsl.Runtime { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/XmlIterators.cs b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/XmlIterators.cs index 8c01f8f4f65c4..d03580eaa7745 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/XmlIterators.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/XmlIterators.cs @@ -2,9 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; +using System.ComponentModel; using System.Xml; using System.Xml.XPath; -using System.ComponentModel; namespace System.Xml.Xsl.Runtime { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/XmlNavigatorFilter.cs b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/XmlNavigatorFilter.cs index f057e72eec86e..6162879d4324c 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/XmlNavigatorFilter.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/XmlNavigatorFilter.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.ComponentModel; +using System.Diagnostics; using System.Xml; using System.Xml.XPath; -using System.Diagnostics; -using System.ComponentModel; namespace System.Xml.Xsl.Runtime { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/XmlNavigatorStack.cs b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/XmlNavigatorStack.cs index 477f626c87349..a5e874db696d6 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/XmlNavigatorStack.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/XmlNavigatorStack.cs @@ -2,9 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; +using System.Diagnostics; using System.Xml; using System.Xml.XPath; -using System.Diagnostics; namespace System.Xml.Xsl.Runtime { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/XmlQueryContext.cs b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/XmlQueryContext.cs index 80c3fa5c2d32a..b597011502924 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/XmlQueryContext.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/XmlQueryContext.cs @@ -6,14 +6,14 @@ using System.Collections.Generic; using System.ComponentModel; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.IO; +using System.Reflection; +using System.Runtime.Versioning; using System.Xml; using System.Xml.Schema; using System.Xml.XPath; -using System.Runtime.Versioning; -using System.Diagnostics.CodeAnalysis; using System.Xml.Xsl.Xslt; -using System.Reflection; namespace System.Xml.Xsl.Runtime { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/XmlQuerySequence.cs b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/XmlQuerySequence.cs index a887325887bd9..3c7e5b6ad25c3 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/XmlQuerySequence.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/XmlQuerySequence.cs @@ -4,14 +4,14 @@ using System; using System.Collections; using System.Collections.Generic; -using System.Xml; +using System.ComponentModel; +using System.Diagnostics; using System.IO; using System.Text; +using System.Xml; using System.Xml.Schema; -using System.Xml.Xsl; using System.Xml.XPath; -using System.Diagnostics; -using System.ComponentModel; +using System.Xml.Xsl; namespace System.Xml.Xsl.Runtime { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/XmlRawWriterWrapper.cs b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/XmlRawWriterWrapper.cs index 798699924d6f6..4131f5be5154b 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/XmlRawWriterWrapper.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/XmlRawWriterWrapper.cs @@ -4,8 +4,8 @@ using System; using System.IO; using System.Xml; -using System.Xml.XPath; using System.Xml.Schema; +using System.Xml.XPath; namespace System.Xml.Xsl.Runtime { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/XmlSequenceWriter.cs b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/XmlSequenceWriter.cs index 06606817b7bec..a6c033ba35ac6 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/XmlSequenceWriter.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/XmlSequenceWriter.cs @@ -5,8 +5,8 @@ using System.Collections.Generic; using System.Diagnostics; using System.Xml; -using System.Xml.XPath; using System.Xml.Schema; +using System.Xml.XPath; namespace System.Xml.Xsl.Runtime { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/XmlSortKeyAccumulator.cs b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/XmlSortKeyAccumulator.cs index 6b3825cb7f52c..c50d49e409d7f 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/XmlSortKeyAccumulator.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/XmlSortKeyAccumulator.cs @@ -2,9 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; +using System.ComponentModel; using System.Diagnostics; using System.Globalization; -using System.ComponentModel; namespace System.Xml.Xsl.Runtime { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/XsltFunctions.cs b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/XsltFunctions.cs index 81b9af43568fb..7d8613a4d7d3c 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/XsltFunctions.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/XsltFunctions.cs @@ -1,20 +1,20 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.IO; -using System.Text; -using System.Reflection; -using System.Diagnostics; -using System.ComponentModel; -using System.Globalization; using System.Collections; using System.Collections.Generic; using System.Collections.Specialized; +using System.ComponentModel; +using System.Diagnostics; +using System.Globalization; +using System.IO; +using System.Reflection; +using System.Runtime.InteropServices; +using System.Runtime.Versioning; +using System.Text; using System.Xml.Schema; using System.Xml.XPath; using System.Xml.Xsl.Xslt; -using System.Runtime.InteropServices; -using System.Runtime.Versioning; namespace System.Xml.Xsl.Runtime { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/XsltLibrary.cs b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/XsltLibrary.cs index 9cc3f5588a4c5..07e6f7585ff94 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/XsltLibrary.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Runtime/XsltLibrary.cs @@ -1,15 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Collections.Specialized; using System.Collections.Generic; +using System.Collections.Specialized; +using System.ComponentModel; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Reflection; using System.Xml.XPath; using System.Xml.Xsl.Xslt; -using System.ComponentModel; -using System.Diagnostics.CodeAnalysis; namespace System.Xml.Xsl.Runtime { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XmlILCommand.cs b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XmlILCommand.cs index 5d646eb6c6f52..84ecfeaa946a6 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XmlILCommand.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XmlILCommand.cs @@ -7,9 +7,9 @@ using System.Collections; using System.Diagnostics; using System.IO; +using System.Runtime.Versioning; using System.Xml.XPath; using System.Xml.Xsl.Runtime; -using System.Runtime.Versioning; namespace System.Xml.Xsl { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XmlIlGenerator.cs b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XmlIlGenerator.cs index ffc7f3769d756..442b49a9c0a7d 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XmlIlGenerator.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XmlIlGenerator.cs @@ -4,16 +4,16 @@ using System.Collections; using System.Collections.Generic; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.IO; using System.Reflection; using System.Reflection.Emit; +using System.Runtime.Versioning; using System.Security; using System.Xml.XPath; using System.Xml.Xsl.IlGen; using System.Xml.Xsl.Qil; using System.Xml.Xsl.Runtime; -using System.Runtime.Versioning; -using System.Diagnostics.CodeAnalysis; namespace System.Xml.Xsl { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XmlQualifiedNameTest.cs b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XmlQualifiedNameTest.cs index 27e31ec1805ef..bc1ab68b43ca6 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XmlQualifiedNameTest.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XmlQualifiedNameTest.cs @@ -2,11 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Xml; -using System.Xml.Schema; using System.Collections.Generic; using System.Diagnostics; using System.Text; +using System.Xml; +using System.Xml.Schema; namespace System.Xml.Xsl { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Xslt/Focus.cs b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Xslt/Focus.cs index 9818b1f27534a..86cb6d7ecd832 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Xslt/Focus.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Xslt/Focus.cs @@ -3,8 +3,8 @@ using System.Collections.Generic; using System.Diagnostics; -using System.Xml.Xsl.XPath; using System.Xml.Xsl.Qil; +using System.Xml.Xsl.XPath; using T = System.Xml.Xsl.XmlQueryTypeFactory; namespace System.Xml.Xsl.Xslt diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Xslt/KeyMatchBuilder.cs b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Xslt/KeyMatchBuilder.cs index a68401b7190d4..a4cc19abd7c5a 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Xslt/KeyMatchBuilder.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Xslt/KeyMatchBuilder.cs @@ -2,15 +2,15 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Diagnostics; using System.Collections; using System.Collections.Generic; +using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Xml; using System.Xml.XPath; -using MS.Internal.Xml; -using System.Xml.Xsl.XPath; using System.Xml.Xsl.Qil; -using System.Diagnostics.CodeAnalysis; +using System.Xml.Xsl.XPath; +using MS.Internal.Xml; namespace System.Xml.Xsl.Xslt { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Xslt/OutputScopeManager.cs b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Xslt/OutputScopeManager.cs index 3a2fa196302cc..1aeaeb040beb9 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Xslt/OutputScopeManager.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Xslt/OutputScopeManager.cs @@ -2,9 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; +using System.Collections; using System.Diagnostics; using System.Xml; -using System.Collections; namespace System.Xml.Xsl.Xslt { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Xslt/QilStrConcatenator.cs b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Xslt/QilStrConcatenator.cs index 0bcb516ee06e7..518653e67cb0c 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Xslt/QilStrConcatenator.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Xslt/QilStrConcatenator.cs @@ -2,11 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Diagnostics; -using System.Xml; using System.Text; +using System.Xml; using System.Xml.Schema; -using System.Xml.Xsl.XPath; using System.Xml.Xsl.Qil; +using System.Xml.Xsl.XPath; namespace System.Xml.Xsl.Xslt { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Xslt/XPathPatternBuilder.cs b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Xslt/XPathPatternBuilder.cs index 064c12b11ba3d..7df9189ec95f2 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Xslt/XPathPatternBuilder.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Xslt/XPathPatternBuilder.cs @@ -4,12 +4,12 @@ using System.Collections; using System.Collections.Generic; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Globalization; -using System.Xml.XPath; using System.Xml.Schema; +using System.Xml.XPath; using System.Xml.Xsl.Qil; using System.Xml.Xsl.XPath; -using System.Diagnostics.CodeAnalysis; using T = System.Xml.Xsl.XmlQueryTypeFactory; namespace System.Xml.Xsl.Xslt diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Xslt/XPathPatternParser.cs b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Xslt/XPathPatternParser.cs index 69033896607e0..bce9314e18fca 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Xslt/XPathPatternParser.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Xslt/XPathPatternParser.cs @@ -6,8 +6,8 @@ using System.Xml; using System.Xml.Xsl.Qil; using System.Xml.Xsl.XPath; -using XPathParser = System.Xml.Xsl.XPath.XPathParser; using XPathNodeType = System.Xml.XPath.XPathNodeType; +using XPathParser = System.Xml.Xsl.XPath.XPathParser; namespace System.Xml.Xsl.Xslt { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Xslt/XslAst.cs b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Xslt/XslAst.cs index 7009a42766775..96dd8c9ff46eb 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Xslt/XslAst.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Xslt/XslAst.cs @@ -1,11 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Text; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Diagnostics; using System.Globalization; +using System.Text; using System.Xml.Xsl.Qil; using ContextInfo = System.Xml.Xsl.Xslt.XsltInput.ContextInfo; using XPathQilFactory = System.Xml.Xsl.XPath.XPathQilFactory; diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Xslt/XsltLoader.cs b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Xslt/XsltLoader.cs index d2f2e2e707745..49c19730c53f3 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Xslt/XsltLoader.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/Xslt/XsltLoader.cs @@ -7,15 +7,15 @@ using System.Collections.Generic; using System.Collections.Specialized; using System.Diagnostics; +using System.IO; using System.Reflection; using System.Text; -using System.IO; using System.Xml.XPath; using System.Xml.Xsl.Qil; using ContextInfo = System.Xml.Xsl.Xslt.XsltInput.ContextInfo; using F = System.Xml.Xsl.Xslt.AstFactory; -using TypeFactory = System.Xml.Xsl.XmlQueryTypeFactory; using QName = System.Xml.Xsl.Xslt.XsltInput.DelayedQName; +using TypeFactory = System.Xml.Xsl.XmlQueryTypeFactory; using XsltAttribute = System.Xml.Xsl.Xslt.XsltInput.XsltAttribute; namespace System.Xml.Xsl.Xslt diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/ApplyTemplatesAction.cs b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/ApplyTemplatesAction.cs index b90a567228511..b0b4a522dad7d 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/ApplyTemplatesAction.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/ApplyTemplatesAction.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Diagnostics; using System.Collections; +using System.Diagnostics; using System.Xml; using System.Xml.XPath; diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/AttributeSetAction.cs b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/AttributeSetAction.cs index cea0912f2f8c9..873f6a7810a52 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/AttributeSetAction.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/AttributeSetAction.cs @@ -2,10 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; +using System.Collections; using System.Diagnostics; using System.Xml; using System.Xml.XPath; -using System.Collections; namespace System.Xml.Xsl.XsltOld { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/Avt.cs b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/Avt.cs index b17bb90fd914f..4f0b6bdf47d69 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/Avt.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/Avt.cs @@ -2,12 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Diagnostics; using System.Collections; +using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; +using System.Text; using System.Xml; using System.Xml.XPath; -using System.Text; -using System.Diagnostics.CodeAnalysis; namespace System.Xml.Xsl.XsltOld { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/AvtEvent.cs b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/AvtEvent.cs index e082dd954afa3..67c557a9ab66e 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/AvtEvent.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/AvtEvent.cs @@ -3,9 +3,9 @@ using System; using System.Diagnostics; +using System.Text; using System.Xml; using System.Xml.XPath; -using System.Text; namespace System.Xml.Xsl.XsltOld { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/BuilderInfo.cs b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/BuilderInfo.cs index f426d6dc57ec6..7bc243845fff7 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/BuilderInfo.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/BuilderInfo.cs @@ -2,12 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; +using System.Collections.Generic; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Text; -using System.Collections.Generic; using System.Xml; using System.Xml.XPath; -using System.Diagnostics.CodeAnalysis; namespace System.Xml.Xsl.XsltOld { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/ContainerAction.cs b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/ContainerAction.cs index 991f48894f74b..f9b17a6a1b1ba 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/ContainerAction.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/ContainerAction.cs @@ -2,16 +2,16 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; +using System.Collections; using System.Diagnostics; -using System.Text; +using System.Diagnostics.CodeAnalysis; using System.Globalization; +using System.Runtime.Versioning; +using System.Text; using System.Xml; using System.Xml.XPath; using System.Xml.Xsl.Runtime; using MS.Internal.Xml.XPath; -using System.Collections; -using System.Runtime.Versioning; -using System.Diagnostics.CodeAnalysis; namespace System.Xml.Xsl.XsltOld { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/CopyCodeAction.cs b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/CopyCodeAction.cs index 7be9536942543..02a9c65c9a69e 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/CopyCodeAction.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/CopyCodeAction.cs @@ -2,10 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; +using System.Collections; using System.Diagnostics; using System.Xml; using System.Xml.XPath; -using System.Collections; namespace System.Xml.Xsl.XsltOld { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/ForEachAction.cs b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/ForEachAction.cs index 5dd3007b853c4..63b0101245303 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/ForEachAction.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/ForEachAction.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Diagnostics; using System.Collections; +using System.Diagnostics; using System.Xml; using System.Xml.XPath; diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/HtmlProps.cs b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/HtmlProps.cs index e97594fbed719..4d3c532c28d9d 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/HtmlProps.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/HtmlProps.cs @@ -5,8 +5,8 @@ using System.Collections; using System.Collections.Specialized; using System.Diagnostics; -using System.Xml; using System.Globalization; +using System.Xml; namespace System.Xml.Xsl.XsltOld { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/InputScope.cs b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/InputScope.cs index 607bde8da379a..2a209e4d2f965 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/InputScope.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/InputScope.cs @@ -2,10 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; +using System.Collections; using System.Diagnostics; using System.Xml; using System.Xml.XPath; -using System.Collections; namespace System.Xml.Xsl.XsltOld { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/MessageAction.cs b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/MessageAction.cs index 37d9874e431bc..97dcfd5109f38 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/MessageAction.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/MessageAction.cs @@ -2,9 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.IO; -using System.Globalization; using System.Diagnostics; +using System.Globalization; +using System.IO; using System.Xml; using System.Xml.XPath; diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/NumberAction.cs b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/NumberAction.cs index be20a0549ac27..67fe7f2276ab0 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/NumberAction.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/NumberAction.cs @@ -1,14 +1,14 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Diagnostics; -using System.Text; -using System.Globalization; using System.Collections; using System.Collections.Generic; +using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; +using System.Globalization; +using System.Text; using System.Xml.XPath; using System.Xml.Xsl.Runtime; -using System.Diagnostics.CodeAnalysis; namespace System.Xml.Xsl.XsltOld { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/OutputScopeManager.cs b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/OutputScopeManager.cs index 6be5ce1ee5a7c..3eda1c04f608b 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/OutputScopeManager.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/OutputScopeManager.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Globalization; using System.Diagnostics; +using System.Globalization; using System.Xml; namespace System.Xml.Xsl.XsltOld diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/ReaderOutput.cs b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/ReaderOutput.cs index c653a69979857..bf4609e7b9874 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/ReaderOutput.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/ReaderOutput.cs @@ -1,12 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Globalization; +using System.Collections; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; +using System.Globalization; using System.IO; using System.Text; -using System.Collections; -using System.Diagnostics.CodeAnalysis; namespace System.Xml.Xsl.XsltOld { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/RecordBuilder.cs b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/RecordBuilder.cs index 9031e06b5077b..fa52721e1d90e 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/RecordBuilder.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/RecordBuilder.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Collections; using System.Diagnostics; using System.Text; using System.Xml.XPath; -using System.Collections; namespace System.Xml.Xsl.XsltOld { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/RootAction.cs b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/RootAction.cs index 8fbd58b22583a..338fc89fd409a 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/RootAction.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/RootAction.cs @@ -2,15 +2,15 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Diagnostics; using System.Collections; using System.Collections.Generic; +using System.Diagnostics; using System.Globalization; +using System.Security; using System.Xml; using System.Xml.XPath; using System.Xml.Xsl.Runtime; using MS.Internal.Xml.XPath; -using System.Security; namespace System.Xml.Xsl.XsltOld { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/SequentialOutput.cs b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/SequentialOutput.cs index 31f80209c3962..4ef6cd1fd24bd 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/SequentialOutput.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/SequentialOutput.cs @@ -1,11 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Diagnostics; -using System.Text; using System.Collections; -using System.Globalization; +using System.Diagnostics; using System.Diagnostics.CodeAnalysis; +using System.Globalization; +using System.Text; namespace System.Xml.Xsl.XsltOld { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/StringOutput.cs b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/StringOutput.cs index de452b13100b5..5940682a4b478 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/StringOutput.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/StringOutput.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Xml; using System.Text; +using System.Xml; namespace System.Xml.Xsl.XsltOld { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/Stylesheet.cs b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/Stylesheet.cs index 7fa0c4e4bb882..829ec3e24c90a 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/Stylesheet.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/Stylesheet.cs @@ -2,10 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; +using System.Collections; using System.Diagnostics; using System.Xml; using System.Xml.XPath; -using System.Collections; namespace System.Xml.Xsl.XsltOld { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/TemplateAction.cs b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/TemplateAction.cs index 6a20693d7218e..fb891888296dc 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/TemplateAction.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/TemplateAction.cs @@ -2,12 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Diagnostics; using System.Collections; +using System.Diagnostics; +using System.Globalization; using System.Xml; using System.Xml.XPath; using MS.Internal.Xml.XPath; -using System.Globalization; namespace System.Xml.Xsl.XsltOld { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/TemplateBaseAction.cs b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/TemplateBaseAction.cs index 7384ce5c5a0eb..9d4b96b5891a4 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/TemplateBaseAction.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/TemplateBaseAction.cs @@ -2,11 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Diagnostics; using System.Collections; +using System.Diagnostics; +using System.Globalization; using System.Xml; using System.Xml.XPath; -using System.Globalization; namespace System.Xml.Xsl.XsltOld { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/TemplateManager.cs b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/TemplateManager.cs index 40c2b332e3b90..f1ff9eb04fc72 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/TemplateManager.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/TemplateManager.cs @@ -2,10 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; +using System.Collections; using System.Diagnostics; using System.Xml; using System.Xml.XPath; -using System.Collections; namespace System.Xml.Xsl.XsltOld { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/TextOutput.cs b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/TextOutput.cs index cf50313c88a34..940f53d173db9 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/TextOutput.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/TextOutput.cs @@ -3,9 +3,9 @@ using System; using System.IO; +using System.Text; using System.Xml; using System.Xml.XPath; -using System.Text; namespace System.Xml.Xsl.XsltOld { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/UseAttributeSetsAction.cs b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/UseAttributeSetsAction.cs index 19e45819aafb5..1b77983905329 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/UseAttributeSetsAction.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/UseAttributeSetsAction.cs @@ -2,10 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; +using System.Collections; using System.Diagnostics; using System.Xml; using System.Xml.XPath; -using System.Collections; namespace System.Xml.Xsl.XsltOld { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/WithParamAction.cs b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/WithParamAction.cs index 7446f6a1370c7..dd0d5e5571aa2 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/WithParamAction.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/WithParamAction.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Diagnostics; using System.Collections; +using System.Diagnostics; using System.Xml; using System.Xml.XPath; diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/WriterOutput.cs b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/WriterOutput.cs index b274bf67d148b..31aeee51169c4 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/WriterOutput.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/WriterOutput.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Diagnostics; using System.Collections; +using System.Diagnostics; namespace System.Xml.Xsl.XsltOld { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/XsltCompileContext.cs b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/XsltCompileContext.cs index 8d4131627a578..bdd2e16bf285a 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/XsltCompileContext.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/XsltCompileContext.cs @@ -1,17 +1,17 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Collections; using System.Diagnostics; -using System.IO; +using System.Diagnostics.CodeAnalysis; using System.Globalization; -using System.Collections; +using System.IO; +using System.Reflection; +using System.Runtime.Versioning; +using System.Security; using System.Xml.XPath; using System.Xml.Xsl.Runtime; using MS.Internal.Xml.XPath; -using System.Reflection; -using System.Security; -using System.Runtime.Versioning; -using System.Diagnostics.CodeAnalysis; namespace System.Xml.Xsl.XsltOld { diff --git a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/XsltOutput.cs b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/XsltOutput.cs index fb9c7fbd62172..0520d53f21d48 100644 --- a/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/XsltOutput.cs +++ b/src/libraries/System.Private.Xml/src/System/Xml/Xsl/XsltOld/XsltOutput.cs @@ -2,11 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; +using System.Collections; using System.Diagnostics; using System.IO; -using System.Xml; using System.Text; -using System.Collections; +using System.Xml; namespace System.Xml.Xsl.XsltOld { diff --git a/src/libraries/System.Reflection.Context/src/System/Reflection/Context/Delegation/DelegatingMethodInfo.cs b/src/libraries/System.Reflection.Context/src/System/Reflection/Context/Delegation/DelegatingMethodInfo.cs index e41233dd4e170..bcc510e72dd81 100644 --- a/src/libraries/System.Reflection.Context/src/System/Reflection/Context/Delegation/DelegatingMethodInfo.cs +++ b/src/libraries/System.Reflection.Context/src/System/Reflection/Context/Delegation/DelegatingMethodInfo.cs @@ -2,9 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Collections.Generic; -using System.Globalization; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; +using System.Globalization; namespace System.Reflection.Context.Delegation { diff --git a/src/libraries/System.Reflection.Emit/src/System/Reflection/Emit/TypeBuilderImpl.cs b/src/libraries/System.Reflection.Emit/src/System/Reflection/Emit/TypeBuilderImpl.cs index 11caf56db6d0a..cd81dc793baa4 100644 --- a/src/libraries/System.Reflection.Emit/src/System/Reflection/Emit/TypeBuilderImpl.cs +++ b/src/libraries/System.Reflection.Emit/src/System/Reflection/Emit/TypeBuilderImpl.cs @@ -4,9 +4,9 @@ using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; -using System.Runtime.InteropServices; using System.Reflection.Metadata; using System.Reflection.Metadata.Ecma335; +using System.Runtime.InteropServices; namespace System.Reflection.Emit { diff --git a/src/libraries/System.Reflection.Metadata/src/System/Reflection/Metadata/BlobBuilder.Enumerators.cs b/src/libraries/System.Reflection.Metadata/src/System/Reflection/Metadata/BlobBuilder.Enumerators.cs index c74d2ed5f4a7a..dfaa9d1320a38 100644 --- a/src/libraries/System.Reflection.Metadata/src/System/Reflection/Metadata/BlobBuilder.Enumerators.cs +++ b/src/libraries/System.Reflection.Metadata/src/System/Reflection/Metadata/BlobBuilder.Enumerators.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Diagnostics; +using System; using System.Collections; using System.Collections.Generic; -using System; +using System.Diagnostics; namespace System.Reflection.Metadata { diff --git a/src/libraries/System.Reflection.Metadata/src/System/Reflection/Metadata/BlobContentId.cs b/src/libraries/System.Reflection.Metadata/src/System/Reflection/Metadata/BlobContentId.cs index db433de1e7594..e52996a4a9ada 100644 --- a/src/libraries/System.Reflection.Metadata/src/System/Reflection/Metadata/BlobContentId.cs +++ b/src/libraries/System.Reflection.Metadata/src/System/Reflection/Metadata/BlobContentId.cs @@ -3,8 +3,8 @@ using System.Collections.Generic; using System.Collections.Immutable; -using System.Reflection.Internal; using System.Diagnostics.CodeAnalysis; +using System.Reflection.Internal; namespace System.Reflection.Metadata { diff --git a/src/libraries/System.Reflection.Metadata/src/System/Reflection/Metadata/EntityHandle.cs b/src/libraries/System.Reflection.Metadata/src/System/Reflection/Metadata/EntityHandle.cs index 26757ed7cc535..5bceb97d7ebc8 100644 --- a/src/libraries/System.Reflection.Metadata/src/System/Reflection/Metadata/EntityHandle.cs +++ b/src/libraries/System.Reflection.Metadata/src/System/Reflection/Metadata/EntityHandle.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Diagnostics; -using System.Reflection.Metadata.Ecma335; using System.Diagnostics.CodeAnalysis; +using System.Reflection.Metadata.Ecma335; namespace System.Reflection.Metadata { diff --git a/src/libraries/System.Reflection.Metadata/src/System/Reflection/Metadata/Handle.cs b/src/libraries/System.Reflection.Metadata/src/System/Reflection/Metadata/Handle.cs index 931c7cef6e647..ce02eff0c6986 100644 --- a/src/libraries/System.Reflection.Metadata/src/System/Reflection/Metadata/Handle.cs +++ b/src/libraries/System.Reflection.Metadata/src/System/Reflection/Metadata/Handle.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Diagnostics; -using System.Reflection.Metadata.Ecma335; using System.Diagnostics.CodeAnalysis; +using System.Reflection.Metadata.Ecma335; namespace System.Reflection.Metadata { diff --git a/src/libraries/System.Reflection.Metadata/src/System/Reflection/Metadata/PortablePdb/DocumentNameBlobHandle.cs b/src/libraries/System.Reflection.Metadata/src/System/Reflection/Metadata/PortablePdb/DocumentNameBlobHandle.cs index 888467215e20d..cd5682b316990 100644 --- a/src/libraries/System.Reflection.Metadata/src/System/Reflection/Metadata/PortablePdb/DocumentNameBlobHandle.cs +++ b/src/libraries/System.Reflection.Metadata/src/System/Reflection/Metadata/PortablePdb/DocumentNameBlobHandle.cs @@ -2,9 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Reflection.Internal; using System.Reflection.Metadata.Ecma335; -using System.Diagnostics.CodeAnalysis; namespace System.Reflection.Metadata { diff --git a/src/libraries/System.Reflection.Metadata/src/System/Reflection/Metadata/PortablePdb/Handles.Debug.cs b/src/libraries/System.Reflection.Metadata/src/System/Reflection/Metadata/PortablePdb/Handles.Debug.cs index b6c00c78a2126..a8fb284ba753a 100644 --- a/src/libraries/System.Reflection.Metadata/src/System/Reflection/Metadata/PortablePdb/Handles.Debug.cs +++ b/src/libraries/System.Reflection.Metadata/src/System/Reflection/Metadata/PortablePdb/Handles.Debug.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Diagnostics; -using System.Reflection.Metadata.Ecma335; using System.Diagnostics.CodeAnalysis; +using System.Reflection.Metadata.Ecma335; namespace System.Reflection.Metadata { diff --git a/src/libraries/System.Reflection.Metadata/src/System/Reflection/Metadata/PortablePdb/SequencePoint.cs b/src/libraries/System.Reflection.Metadata/src/System/Reflection/Metadata/PortablePdb/SequencePoint.cs index 6038031fbd59c..6c03a8bca9144 100644 --- a/src/libraries/System.Reflection.Metadata/src/System/Reflection/Metadata/PortablePdb/SequencePoint.cs +++ b/src/libraries/System.Reflection.Metadata/src/System/Reflection/Metadata/PortablePdb/SequencePoint.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Diagnostics; -using System.Reflection.Internal; using System.Diagnostics.CodeAnalysis; +using System.Reflection.Internal; namespace System.Reflection.Metadata { diff --git a/src/libraries/System.Reflection.Metadata/src/System/Reflection/Metadata/Signatures/SignatureHeader.cs b/src/libraries/System.Reflection.Metadata/src/System/Reflection/Metadata/Signatures/SignatureHeader.cs index f8506bf7634e4..4d3ff6b39fc34 100644 --- a/src/libraries/System.Reflection.Metadata/src/System/Reflection/Metadata/Signatures/SignatureHeader.cs +++ b/src/libraries/System.Reflection.Metadata/src/System/Reflection/Metadata/Signatures/SignatureHeader.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Text; using System.Diagnostics.CodeAnalysis; +using System.Text; namespace System.Reflection.Metadata { diff --git a/src/libraries/System.Reflection.Metadata/src/System/Reflection/Metadata/TypeSystem/Handles.TypeSystem.cs b/src/libraries/System.Reflection.Metadata/src/System/Reflection/Metadata/TypeSystem/Handles.TypeSystem.cs index 0c89482e05c4f..5d610fed99e94 100644 --- a/src/libraries/System.Reflection.Metadata/src/System/Reflection/Metadata/TypeSystem/Handles.TypeSystem.cs +++ b/src/libraries/System.Reflection.Metadata/src/System/Reflection/Metadata/TypeSystem/Handles.TypeSystem.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Diagnostics; -using System.Reflection.Metadata.Ecma335; using System.Diagnostics.CodeAnalysis; +using System.Reflection.Metadata.Ecma335; namespace System.Reflection.Metadata { diff --git a/src/libraries/System.Reflection.Metadata/src/System/Reflection/PortableExecutable/DebugDirectory/DebugDirectoryBuilder.EmbeddedPortablePdb.cs b/src/libraries/System.Reflection.Metadata/src/System/Reflection/PortableExecutable/DebugDirectory/DebugDirectoryBuilder.EmbeddedPortablePdb.cs index f1bfd18c92147..266e3050f7728 100644 --- a/src/libraries/System.Reflection.Metadata/src/System/Reflection/PortableExecutable/DebugDirectory/DebugDirectoryBuilder.EmbeddedPortablePdb.cs +++ b/src/libraries/System.Reflection.Metadata/src/System/Reflection/PortableExecutable/DebugDirectory/DebugDirectoryBuilder.EmbeddedPortablePdb.cs @@ -3,9 +3,8 @@ using System.Collections.Generic; using System.IO; -using System.Reflection.Metadata; - using System.IO.Compression; +using System.Reflection.Metadata; namespace System.Reflection.PortableExecutable { diff --git a/src/libraries/System.Reflection.Metadata/src/System/Reflection/PortableExecutable/PEReader.EmbeddedPortablePdb.cs b/src/libraries/System.Reflection.Metadata/src/System/Reflection/PortableExecutable/PEReader.EmbeddedPortablePdb.cs index 763f2b72a5dcb..51eff57e43c03 100644 --- a/src/libraries/System.Reflection.Metadata/src/System/Reflection/PortableExecutable/PEReader.EmbeddedPortablePdb.cs +++ b/src/libraries/System.Reflection.Metadata/src/System/Reflection/PortableExecutable/PEReader.EmbeddedPortablePdb.cs @@ -4,13 +4,12 @@ using System.Collections.Immutable; using System.Diagnostics; using System.IO; +using System.IO.Compression; using System.Reflection.Internal; using System.Reflection.Metadata; using System.Runtime.ExceptionServices; using System.Threading; -using System.IO.Compression; - namespace System.Reflection.PortableExecutable { /// diff --git a/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/MetadataLoadContext.Apis.cs b/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/MetadataLoadContext.Apis.cs index a053378781e55..ad402f70be35d 100644 --- a/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/MetadataLoadContext.Apis.cs +++ b/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/MetadataLoadContext.Apis.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.IO; using System.Collections.Generic; +using System.IO; using System.Reflection.TypeLoading; namespace System.Reflection diff --git a/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/PathAssemblyResolver.cs b/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/PathAssemblyResolver.cs index 6366823a695ae..095f5ad958639 100644 --- a/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/PathAssemblyResolver.cs +++ b/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/PathAssemblyResolver.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Diagnostics; using System.Collections.Generic; +using System.Diagnostics; using System.IO; namespace System.Reflection diff --git a/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/Runtime/BindingFlagSupport/ConstructorPolicies.cs b/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/Runtime/BindingFlagSupport/ConstructorPolicies.cs index cc30911d2728b..502e090da1356 100644 --- a/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/Runtime/BindingFlagSupport/ConstructorPolicies.cs +++ b/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/Runtime/BindingFlagSupport/ConstructorPolicies.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Diagnostics; using System.Collections.Generic; +using System.Diagnostics; using RuntimeTypeInfo = System.Reflection.TypeLoading.RoType; namespace System.Reflection.Runtime.BindingFlagSupport diff --git a/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/Runtime/BindingFlagSupport/MemberPolicies.cs b/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/Runtime/BindingFlagSupport/MemberPolicies.cs index 9341a9a89684a..a8c3fea5be7a6 100644 --- a/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/Runtime/BindingFlagSupport/MemberPolicies.cs +++ b/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/Runtime/BindingFlagSupport/MemberPolicies.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Diagnostics; using System.Collections.Generic; +using System.Diagnostics; using System.Reflection.TypeLoading; using RuntimeTypeInfo = System.Reflection.TypeLoading.RoType; diff --git a/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/Runtime/BindingFlagSupport/NestedTypePolicies.cs b/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/Runtime/BindingFlagSupport/NestedTypePolicies.cs index 64b07698db436..855e7ef0138d7 100644 --- a/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/Runtime/BindingFlagSupport/NestedTypePolicies.cs +++ b/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/Runtime/BindingFlagSupport/NestedTypePolicies.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Diagnostics; using System.Collections.Generic; +using System.Diagnostics; using RuntimeTypeInfo = System.Reflection.TypeLoading.RoType; namespace System.Reflection.Runtime.BindingFlagSupport diff --git a/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/Runtime/BindingFlagSupport/QueriedMemberList.cs b/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/Runtime/BindingFlagSupport/QueriedMemberList.cs index 3b64819e7f328..63a248ba40dc4 100644 --- a/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/Runtime/BindingFlagSupport/QueriedMemberList.cs +++ b/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/Runtime/BindingFlagSupport/QueriedMemberList.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Internal.Reflection.Core.Execution; using System.Diagnostics; -using System.Runtime.CompilerServices; using System.Reflection.Runtime.TypeInfos; +using System.Runtime.CompilerServices; +using Internal.Reflection.Core.Execution; using RuntimeTypeInfo = System.Reflection.TypeLoading.RoType; namespace System.Reflection.Runtime.BindingFlagSupport diff --git a/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/Runtime/BindingFlagSupport/QueryResult.cs b/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/Runtime/BindingFlagSupport/QueryResult.cs index 74ace1ca538ac..ff123d551dcd8 100644 --- a/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/Runtime/BindingFlagSupport/QueryResult.cs +++ b/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/Runtime/BindingFlagSupport/QueryResult.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Diagnostics; using System.Collections.Generic; +using System.Diagnostics; namespace System.Reflection.Runtime.BindingFlagSupport { diff --git a/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/Assemblies/RoAssembly.GetForwardedTypes.cs b/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/Assemblies/RoAssembly.GetForwardedTypes.cs index 6a951b720f53b..9ff7c6cad8bf0 100644 --- a/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/Assemblies/RoAssembly.GetForwardedTypes.cs +++ b/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/Assemblies/RoAssembly.GetForwardedTypes.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Diagnostics; using System.Collections.Generic; +using System.Diagnostics; namespace System.Reflection.TypeLoading { diff --git a/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/Assemblies/RoAssembly.Modules.cs b/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/Assemblies/RoAssembly.Modules.cs index cc8fd4d563704..b6ad1c372e0f7 100644 --- a/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/Assemblies/RoAssembly.Modules.cs +++ b/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/Assemblies/RoAssembly.Modules.cs @@ -1,11 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.IO; -using System.Threading; +using System.Collections.Generic; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; -using System.Collections.Generic; +using System.IO; +using System.Threading; namespace System.Reflection.TypeLoading { diff --git a/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/Assemblies/RoStubAssembly.cs b/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/Assemblies/RoStubAssembly.cs index 315efba1b9849..75bbcf7895c2a 100644 --- a/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/Assemblies/RoStubAssembly.cs +++ b/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/Assemblies/RoStubAssembly.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.IO; using System.Collections.Generic; +using System.IO; namespace System.Reflection.TypeLoading { diff --git a/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/Constructors/RoDefinitionConstructor.cs b/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/Constructors/RoDefinitionConstructor.cs index 416d12bc08f70..db47928f2f4e4 100644 --- a/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/Constructors/RoDefinitionConstructor.cs +++ b/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/Constructors/RoDefinitionConstructor.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Diagnostics; using System.Collections.Generic; +using System.Diagnostics; using System.Diagnostics.CodeAnalysis; namespace System.Reflection.TypeLoading diff --git a/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/Constructors/RoSyntheticConstructor.cs b/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/Constructors/RoSyntheticConstructor.cs index 3f8ad100a6056..dc39103998404 100644 --- a/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/Constructors/RoSyntheticConstructor.cs +++ b/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/Constructors/RoSyntheticConstructor.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Diagnostics; -using System.Globalization; using System.Collections.Generic; +using System.Diagnostics; using System.Diagnostics.CodeAnalysis; +using System.Globalization; namespace System.Reflection.TypeLoading { diff --git a/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/CustomAttributes/Ecma/EcmaCustomAttributeHelpers.cs b/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/CustomAttributes/Ecma/EcmaCustomAttributeHelpers.cs index 23dbc98615c15..e8306c189e9c5 100644 --- a/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/CustomAttributes/Ecma/EcmaCustomAttributeHelpers.cs +++ b/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/CustomAttributes/Ecma/EcmaCustomAttributeHelpers.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Diagnostics; using System.Collections.Generic; using System.Collections.ObjectModel; +using System.Diagnostics; using System.Reflection.Metadata; using System.Runtime.InteropServices; diff --git a/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/Events/Ecma/EcmaEvent.cs b/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/Events/Ecma/EcmaEvent.cs index aa2aa4a7d3477..7e6291d884941 100644 --- a/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/Events/Ecma/EcmaEvent.cs +++ b/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/Events/Ecma/EcmaEvent.cs @@ -4,9 +4,9 @@ using System.Collections.Generic; using System.Collections.Immutable; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Reflection.Metadata; using System.Text; -using System.Diagnostics.CodeAnalysis; namespace System.Reflection.TypeLoading.Ecma { diff --git a/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/Events/RoEvent.cs b/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/Events/RoEvent.cs index 8d47a942fb997..9fd2eaeac5339 100644 --- a/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/Events/RoEvent.cs +++ b/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/Events/RoEvent.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Diagnostics; using System.Collections.Generic; +using System.Diagnostics; namespace System.Reflection.TypeLoading { diff --git a/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/Fields/Ecma/EcmaField.cs b/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/Fields/Ecma/EcmaField.cs index 1e8907b89dfbb..58b8bb3be9f33 100644 --- a/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/Fields/Ecma/EcmaField.cs +++ b/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/Fields/Ecma/EcmaField.cs @@ -3,9 +3,9 @@ using System.Collections.Generic; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Reflection.Metadata; using System.Runtime.InteropServices; -using System.Diagnostics.CodeAnalysis; namespace System.Reflection.TypeLoading.Ecma { diff --git a/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/MethodBase/Ecma/EcmaMethodBody.cs b/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/MethodBase/Ecma/EcmaMethodBody.cs index a78deaadf169e..a20d02d4caeb7 100644 --- a/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/MethodBase/Ecma/EcmaMethodBody.cs +++ b/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/MethodBase/Ecma/EcmaMethodBody.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Diagnostics; using System.Collections.Generic; -using System.Collections.ObjectModel; using System.Collections.Immutable; +using System.Collections.ObjectModel; +using System.Diagnostics; using System.Reflection.Metadata; namespace System.Reflection.TypeLoading.Ecma diff --git a/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/Properties/Ecma/EcmaProperty.cs b/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/Properties/Ecma/EcmaProperty.cs index b0786293c0c85..fbe98d6d574ae 100644 --- a/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/Properties/Ecma/EcmaProperty.cs +++ b/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/Properties/Ecma/EcmaProperty.cs @@ -3,9 +3,9 @@ using System.Collections.Generic; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Reflection.Metadata; using System.Text; -using System.Diagnostics.CodeAnalysis; namespace System.Reflection.TypeLoading.Ecma { diff --git a/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/Types/Ecma/EcmaDefinitionType.BindingFlags.cs b/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/Types/Ecma/EcmaDefinitionType.BindingFlags.cs index cf194198064c0..26dfc38ac0e23 100644 --- a/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/Types/Ecma/EcmaDefinitionType.BindingFlags.cs +++ b/src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/Types/Ecma/EcmaDefinitionType.BindingFlags.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Reflection.Metadata; using System.Collections.Generic; +using System.Reflection.Metadata; namespace System.Reflection.TypeLoading.Ecma { diff --git a/src/libraries/System.Resources.Writer/src/System/Resources/ResourceWriter.core.cs b/src/libraries/System.Resources.Writer/src/System/Resources/ResourceWriter.core.cs index ed95e2b3fc294..b135ab152ecf1 100644 --- a/src/libraries/System.Resources.Writer/src/System/Resources/ResourceWriter.core.cs +++ b/src/libraries/System.Resources.Writer/src/System/Resources/ResourceWriter.core.cs @@ -2,14 +2,14 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.IO; -using System.Text; using System.Collections; using System.Collections.Generic; +using System.Diagnostics; using System.Globalization; -using System.Runtime.Versioning; +using System.IO; using System.Runtime.Serialization; -using System.Diagnostics; +using System.Runtime.Versioning; +using System.Text; namespace System.Resources { diff --git a/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/CacheMemoryMonitor.cs b/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/CacheMemoryMonitor.cs index a0294251fc5ba..0b7835997171a 100644 --- a/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/CacheMemoryMonitor.cs +++ b/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/CacheMemoryMonitor.cs @@ -2,9 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; +using System.Diagnostics; using System.Runtime.Caching.Configuration; using System.Runtime.Caching.Hosting; -using System.Diagnostics; using System.Security; using System.Threading; diff --git a/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/ChangeMonitor.cs b/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/ChangeMonitor.cs index 06b4e12713988..28b3b38c0a930 100644 --- a/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/ChangeMonitor.cs +++ b/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/ChangeMonitor.cs @@ -2,10 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Runtime.Caching.Resources; +using System.Diagnostics; using System.Diagnostics.CodeAnalysis; +using System.Runtime.Caching.Resources; using System.Threading; -using System.Diagnostics; // Every member of this class is thread-safe. // diff --git a/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/Configuration/ConfigUtil.cs b/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/Configuration/ConfigUtil.cs index 6110d03c42ba0..a327ca3fd97c9 100644 --- a/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/Configuration/ConfigUtil.cs +++ b/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/Configuration/ConfigUtil.cs @@ -2,10 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Runtime.Caching.Resources; using System.Collections.Specialized; using System.ComponentModel; using System.Globalization; +using System.Runtime.Caching.Resources; namespace System.Runtime.Caching.Configuration { diff --git a/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/Counters.cs b/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/Counters.cs index 8d3f7237d27af..c7f82eb11304f 100644 --- a/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/Counters.cs +++ b/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/Counters.cs @@ -4,8 +4,8 @@ using System; using System.Collections.Generic; using System.Diagnostics.Tracing; -using System.Threading; using System.Runtime.Versioning; +using System.Threading; namespace System.Runtime.Caching { diff --git a/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/FileChangeNotificationSystem.cs b/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/FileChangeNotificationSystem.cs index 22595a4bd5845..76a6eabd0088a 100644 --- a/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/FileChangeNotificationSystem.cs +++ b/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/FileChangeNotificationSystem.cs @@ -2,12 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Runtime.Caching.Hosting; -using System.Runtime.Caching.Resources; using System.Collections; using System.IO; -using System.Security; +using System.Runtime.Caching.Hosting; +using System.Runtime.Caching.Resources; using System.Runtime.Versioning; +using System.Security; namespace System.Runtime.Caching { diff --git a/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/HostFileChangeMonitor.cs b/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/HostFileChangeMonitor.cs index 85730638cd743..fa5afafe37873 100644 --- a/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/HostFileChangeMonitor.cs +++ b/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/HostFileChangeMonitor.cs @@ -2,13 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Runtime.Caching.Hosting; using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Diagnostics.CodeAnalysis; -using System.Runtime.Caching.Resources; using System.Globalization; +using System.Runtime.Caching.Hosting; +using System.Runtime.Caching.Resources; using System.Security; using System.Text; using System.Threading; diff --git a/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/MemoryCache.cs b/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/MemoryCache.cs index e740eed69ed51..18a0cad6bce88 100644 --- a/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/MemoryCache.cs +++ b/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/MemoryCache.cs @@ -2,18 +2,18 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Runtime.Caching.Configuration; -using System.Runtime.Caching.Resources; using System.Collections; using System.Collections.Generic; -using System.Collections.Specialized; using System.Collections.ObjectModel; +using System.Collections.Specialized; using System.Configuration; +using System.Diagnostics; using System.Diagnostics.CodeAnalysis; +using System.Runtime.Caching.Configuration; +using System.Runtime.Caching.Resources; +using System.Runtime.Versioning; using System.Security; using System.Threading; -using System.Diagnostics; -using System.Runtime.Versioning; namespace System.Runtime.Caching { diff --git a/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/MemoryCacheEntryChangeMonitor.cs b/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/MemoryCacheEntryChangeMonitor.cs index 65c09fcc10d9d..f8ea3d729da27 100644 --- a/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/MemoryCacheEntryChangeMonitor.cs +++ b/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/MemoryCacheEntryChangeMonitor.cs @@ -2,13 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Runtime.Caching.Resources; using System.Collections.Generic; using System.Collections.ObjectModel; +using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Globalization; +using System.Runtime.Caching.Resources; using System.Text; -using System.Diagnostics; namespace System.Runtime.Caching { diff --git a/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/MemoryCacheStore.cs b/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/MemoryCacheStore.cs index 343f3beb4a845..1381b7043dd84 100644 --- a/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/MemoryCacheStore.cs +++ b/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/MemoryCacheStore.cs @@ -4,11 +4,11 @@ using System; using System.Collections; using System.Collections.Specialized; -using System.Threading; using System.Diagnostics; -using System.Security; using System.Diagnostics.CodeAnalysis; using System.Runtime.Versioning; +using System.Security; +using System.Threading; namespace System.Runtime.Caching { diff --git a/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/MemoryMonitor.Windows.cs b/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/MemoryMonitor.Windows.cs index acb8bb0f42290..5b7031b49e354 100644 --- a/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/MemoryMonitor.Windows.cs +++ b/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/MemoryMonitor.Windows.cs @@ -3,8 +3,8 @@ using System; using System.Collections.Specialized; -using System.Security; using System.Runtime.InteropServices; +using System.Security; namespace System.Runtime.Caching diff --git a/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/ObjectCache.cs b/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/ObjectCache.cs index b323a49167913..39c077570dd00 100644 --- a/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/ObjectCache.cs +++ b/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/ObjectCache.cs @@ -2,11 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Runtime.Caching.Resources; using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Diagnostics.CodeAnalysis; +using System.Runtime.Caching.Resources; using System.Security; using System.Security.Permissions; using System.Threading; diff --git a/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/SRef.cs b/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/SRef.cs index 9a09ba1d9781a..0b6f90c700557 100644 --- a/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/SRef.cs +++ b/src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/SRef.cs @@ -2,11 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; +using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Reflection; -using System.Security; -using System.Diagnostics.CodeAnalysis; using System.Runtime.InteropServices; +using System.Security; namespace System.Runtime.Caching { diff --git a/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Interop/JavaScriptExports.cs b/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Interop/JavaScriptExports.cs index 7c0a18dba1648..eab58b7db57a9 100644 --- a/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Interop/JavaScriptExports.cs +++ b/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Interop/JavaScriptExports.cs @@ -2,12 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; using System.IO; using System.Reflection; using System.Runtime.CompilerServices; -using System.Threading.Tasks; -using System.Diagnostics.CodeAnalysis; using System.Threading; +using System.Threading.Tasks; using static System.Runtime.InteropServices.JavaScript.JSHostImplementation; namespace System.Runtime.InteropServices.JavaScript diff --git a/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/JSHost.cs b/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/JSHost.cs index 16e33243536a0..69b91b88a5905 100644 --- a/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/JSHost.cs +++ b/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/JSHost.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Threading.Tasks; +using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Threading; -using System.Runtime.CompilerServices; +using System.Threading.Tasks; namespace System.Runtime.InteropServices.JavaScript { diff --git a/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Legacy/LegacyHostImplementation.cs b/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Legacy/LegacyHostImplementation.cs index 661b21690670a..f726c26262b28 100644 --- a/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Legacy/LegacyHostImplementation.cs +++ b/src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Legacy/LegacyHostImplementation.cs @@ -3,8 +3,8 @@ using System.Runtime.CompilerServices; using System.Runtime.Versioning; -using System.Threading.Tasks; using System.Threading; +using System.Threading.Tasks; namespace System.Runtime.InteropServices.JavaScript { diff --git a/src/libraries/System.Runtime.Intrinsics/ref/System.Runtime.Intrinsics.cs b/src/libraries/System.Runtime.Intrinsics/ref/System.Runtime.Intrinsics.cs index a4a86567f65ff..f58be580e073c 100644 --- a/src/libraries/System.Runtime.Intrinsics/ref/System.Runtime.Intrinsics.cs +++ b/src/libraries/System.Runtime.Intrinsics/ref/System.Runtime.Intrinsics.cs @@ -2872,6 +2872,27 @@ public static unsafe void StoreSelectedScalar(ushort* address, System.Runtime.In public static unsafe void StoreSelectedScalar(uint* address, System.Runtime.Intrinsics.Vector128 value, [System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute(Max = (byte)(3))] byte index) { } public static unsafe void StoreSelectedScalar(uint* address, System.Runtime.Intrinsics.Vector64 value, [System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute(Max = (byte)(1))] byte index) { } public static unsafe void StoreSelectedScalar(ulong* address, System.Runtime.Intrinsics.Vector128 value, [System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute(Max = (byte)(1))] byte index) { } + public static unsafe void StoreSelectedScalar(byte* address, (System.Runtime.Intrinsics.Vector64 value1, System.Runtime.Intrinsics.Vector64 value2) value, [System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute(Max = (byte)(7))] byte index) { throw null; } + public static unsafe void StoreSelectedScalar(sbyte* address, (System.Runtime.Intrinsics.Vector64 value1, System.Runtime.Intrinsics.Vector64 value2) value, [System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute(Max = (byte)(7))] byte index) { throw null; } + public static unsafe void StoreSelectedScalar(short* address, (System.Runtime.Intrinsics.Vector64 value1, System.Runtime.Intrinsics.Vector64 value2) value, [System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute(Max = (byte)(3))] byte index) { throw null; } + public static unsafe void StoreSelectedScalar(ushort* address, (System.Runtime.Intrinsics.Vector64 value1, System.Runtime.Intrinsics.Vector64 value2) value, [System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute(Max = (byte)(3))] byte index) { throw null; } + public static unsafe void StoreSelectedScalar(int* address, (System.Runtime.Intrinsics.Vector64 value1, System.Runtime.Intrinsics.Vector64 value2) value, [System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute(Max = (byte)(1))] byte index) { throw null; } + public static unsafe void StoreSelectedScalar(uint* address, (System.Runtime.Intrinsics.Vector64 value1, System.Runtime.Intrinsics.Vector64 value2) value, [System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute(Max = (byte)(1))] byte index) { throw null; } + public static unsafe void StoreSelectedScalar(float* address, (System.Runtime.Intrinsics.Vector64 value1, System.Runtime.Intrinsics.Vector64 value2) value, [System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute(Max = (byte)(1))] byte index) { throw null; } + public static unsafe void StoreSelectedScalar(byte* address, (System.Runtime.Intrinsics.Vector64 value1, System.Runtime.Intrinsics.Vector64 value2, System.Runtime.Intrinsics.Vector64 value3) value, [System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute(Max = (byte)(7))] byte index) { throw null; } + public static unsafe void StoreSelectedScalar(sbyte* address, (System.Runtime.Intrinsics.Vector64 value1, System.Runtime.Intrinsics.Vector64 value2, System.Runtime.Intrinsics.Vector64 value3) value, [System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute(Max = (byte)(7))] byte index) { throw null; } + public static unsafe void StoreSelectedScalar(short* address, (System.Runtime.Intrinsics.Vector64 value1, System.Runtime.Intrinsics.Vector64 value2, System.Runtime.Intrinsics.Vector64 value3) value, [System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute(Max = (byte)(3))] byte index) { throw null; } + public static unsafe void StoreSelectedScalar(ushort* address, (System.Runtime.Intrinsics.Vector64 value1, System.Runtime.Intrinsics.Vector64 value2, System.Runtime.Intrinsics.Vector64 value3) value, [System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute(Max = (byte)(3))] byte index) { throw null; } + public static unsafe void StoreSelectedScalar(int* address, (System.Runtime.Intrinsics.Vector64 value1, System.Runtime.Intrinsics.Vector64 value2, System.Runtime.Intrinsics.Vector64 value3) value, [System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute(Max = (byte)(1))] byte index) { throw null; } + public static unsafe void StoreSelectedScalar(uint* address, (System.Runtime.Intrinsics.Vector64 value1, System.Runtime.Intrinsics.Vector64 value2, System.Runtime.Intrinsics.Vector64 value3) value, [System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute(Max = (byte)(1))] byte index) { throw null; } + public static unsafe void StoreSelectedScalar(float* address, (System.Runtime.Intrinsics.Vector64 value1, System.Runtime.Intrinsics.Vector64 value2, System.Runtime.Intrinsics.Vector64 value3) value, [System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute(Max = (byte)(1))] byte index) { throw null; } + public static unsafe void StoreSelectedScalar(byte* address, (System.Runtime.Intrinsics.Vector64 value1, System.Runtime.Intrinsics.Vector64 value2, System.Runtime.Intrinsics.Vector64 value3, System.Runtime.Intrinsics.Vector64 value4) value, [System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute(Max = (byte)(7))] byte index) { throw new PlatformNotSupportedException(); } + public static unsafe void StoreSelectedScalar(sbyte* address, (System.Runtime.Intrinsics.Vector64 value1, System.Runtime.Intrinsics.Vector64 value2, System.Runtime.Intrinsics.Vector64 value3, System.Runtime.Intrinsics.Vector64 value4) value, [System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute(Max = (byte)(7))] byte index) { throw new PlatformNotSupportedException(); } + public static unsafe void StoreSelectedScalar(short* address, (System.Runtime.Intrinsics.Vector64 value1, System.Runtime.Intrinsics.Vector64 value2, System.Runtime.Intrinsics.Vector64 value3, System.Runtime.Intrinsics.Vector64 value4) value, [System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute(Max = (byte)(3))] byte index) { throw new PlatformNotSupportedException(); } + public static unsafe void StoreSelectedScalar(ushort* address, (System.Runtime.Intrinsics.Vector64 value1, System.Runtime.Intrinsics.Vector64 value2, System.Runtime.Intrinsics.Vector64 value3, System.Runtime.Intrinsics.Vector64 value4) value, [System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute(Max = (byte)(3))] byte index) { throw new PlatformNotSupportedException(); } + public static unsafe void StoreSelectedScalar(int* address, (System.Runtime.Intrinsics.Vector64 value1, System.Runtime.Intrinsics.Vector64 value2, System.Runtime.Intrinsics.Vector64 value3, System.Runtime.Intrinsics.Vector64 value4) value, [System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute(Max = (byte)(1))] byte index) { throw new PlatformNotSupportedException(); } + public static unsafe void StoreSelectedScalar(uint* address, (System.Runtime.Intrinsics.Vector64 value1, System.Runtime.Intrinsics.Vector64 value2, System.Runtime.Intrinsics.Vector64 value3, System.Runtime.Intrinsics.Vector64 value4) value, [System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute(Max = (byte)(1))] byte index) { throw new PlatformNotSupportedException(); } + public static unsafe void StoreSelectedScalar(float* address, (System.Runtime.Intrinsics.Vector64 value1, System.Runtime.Intrinsics.Vector64 value2, System.Runtime.Intrinsics.Vector64 value3, System.Runtime.Intrinsics.Vector64 value4) value, [System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute(Max = (byte)(1))] byte index) { throw new PlatformNotSupportedException(); } public unsafe static void StoreVector64x2AndZip(byte* address, (System.Runtime.Intrinsics.Vector64 Value1, System.Runtime.Intrinsics.Vector64 Value2) value) { throw null; } public unsafe static void StoreVector64x2AndZip(sbyte* address, (System.Runtime.Intrinsics.Vector64 Value1, System.Runtime.Intrinsics.Vector64 Value2) value) { throw null; } public unsafe static void StoreVector64x2AndZip(short* address, (System.Runtime.Intrinsics.Vector64 Value1, System.Runtime.Intrinsics.Vector64 Value2) value) { throw null; } @@ -3692,6 +3713,36 @@ public static unsafe void StorePairScalar(uint* address, System.Runtime.Intrinsi public static unsafe void StorePairScalarNonTemporal(int* address, System.Runtime.Intrinsics.Vector64 value1, System.Runtime.Intrinsics.Vector64 value2) { } public static unsafe void StorePairScalarNonTemporal(float* address, System.Runtime.Intrinsics.Vector64 value1, System.Runtime.Intrinsics.Vector64 value2) { } public static unsafe void StorePairScalarNonTemporal(uint* address, System.Runtime.Intrinsics.Vector64 value1, System.Runtime.Intrinsics.Vector64 value2) { } + public static unsafe void StoreSelectedScalar(byte* address, (System.Runtime.Intrinsics.Vector128 value1, System.Runtime.Intrinsics.Vector128 value2) value, [System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute(Max = (byte)(15))] byte index) { throw null; } + public static unsafe void StoreSelectedScalar(sbyte* address, (System.Runtime.Intrinsics.Vector128 value1, System.Runtime.Intrinsics.Vector128 value2) value, [System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute(Max = (byte)(15))] byte index) { throw null; } + public static unsafe void StoreSelectedScalar(short* address, (System.Runtime.Intrinsics.Vector128 value1, System.Runtime.Intrinsics.Vector128 value2) value, [System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute(Max = (byte)(7))] byte index) { throw null; } + public static unsafe void StoreSelectedScalar(ushort* address, (System.Runtime.Intrinsics.Vector128 value1, System.Runtime.Intrinsics.Vector128 value2) value, [System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute(Max = (byte)(7))] byte index) { throw null; } + public static unsafe void StoreSelectedScalar(int* address, (System.Runtime.Intrinsics.Vector128 value1, System.Runtime.Intrinsics.Vector128 value2) value, [System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute(Max = (byte)(3))] byte index) { throw null; } + public static unsafe void StoreSelectedScalar(uint* address, (System.Runtime.Intrinsics.Vector128 value1, System.Runtime.Intrinsics.Vector128 value2) value, [System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute(Max = (byte)(3))] byte index) { throw null; } + public static unsafe void StoreSelectedScalar(long* address, (System.Runtime.Intrinsics.Vector128 value1, System.Runtime.Intrinsics.Vector128 value2) value, [System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute(Max = (byte)(1))] byte index) { throw null; } + public static unsafe void StoreSelectedScalar(ulong* address, (System.Runtime.Intrinsics.Vector128 value1, System.Runtime.Intrinsics.Vector128 value2) value, [System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute(Max = (byte)(1))] byte index) { throw null; } + public static unsafe void StoreSelectedScalar(float* address, (System.Runtime.Intrinsics.Vector128 value1, System.Runtime.Intrinsics.Vector128 value2) value, [System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute(Max = (byte)(3))] byte index) { throw null; } + public static unsafe void StoreSelectedScalar(double* address, (System.Runtime.Intrinsics.Vector128 value1, System.Runtime.Intrinsics.Vector128 value2) value, [System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute(Max = (byte)(1))] byte index) { throw null; } + public static unsafe void StoreSelectedScalar(byte* address, (System.Runtime.Intrinsics.Vector128 value1, System.Runtime.Intrinsics.Vector128 value2, System.Runtime.Intrinsics.Vector128 value3) value, [System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute(Max = (byte)(15))] byte index) { throw null; } + public static unsafe void StoreSelectedScalar(sbyte* address, (System.Runtime.Intrinsics.Vector128 value1, System.Runtime.Intrinsics.Vector128 value2, System.Runtime.Intrinsics.Vector128 value3) value, [System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute(Max = (byte)(15))] byte index) { throw null; } + public static unsafe void StoreSelectedScalar(short* address, (System.Runtime.Intrinsics.Vector128 value1, System.Runtime.Intrinsics.Vector128 value2, System.Runtime.Intrinsics.Vector128 value3) value, [System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute(Max = (byte)(7))] byte index) { throw null; } + public static unsafe void StoreSelectedScalar(ushort* address, (System.Runtime.Intrinsics.Vector128 value1, System.Runtime.Intrinsics.Vector128 value2, System.Runtime.Intrinsics.Vector128 value3) value, [System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute(Max = (byte)(7))] byte index) { throw null; } + public static unsafe void StoreSelectedScalar(int* address, (System.Runtime.Intrinsics.Vector128 value1, System.Runtime.Intrinsics.Vector128 value2, System.Runtime.Intrinsics.Vector128 value3) value, [System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute(Max = (byte)(3))] byte index) { throw null; } + public static unsafe void StoreSelectedScalar(uint* address, (System.Runtime.Intrinsics.Vector128 value1, System.Runtime.Intrinsics.Vector128 value2, System.Runtime.Intrinsics.Vector128 value3) value, [System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute(Max = (byte)(3))] byte index) { throw null; } + public static unsafe void StoreSelectedScalar(long* address, (System.Runtime.Intrinsics.Vector128 value1, System.Runtime.Intrinsics.Vector128 value2, System.Runtime.Intrinsics.Vector128 value3) value, [System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute(Max = (byte)(1))] byte index) { throw null; } + public static unsafe void StoreSelectedScalar(ulong* address, (System.Runtime.Intrinsics.Vector128 value1, System.Runtime.Intrinsics.Vector128 value2, System.Runtime.Intrinsics.Vector128 value3) value, [System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute(Max = (byte)(1))] byte index) { throw null; } + public static unsafe void StoreSelectedScalar(float* address, (System.Runtime.Intrinsics.Vector128 value1, System.Runtime.Intrinsics.Vector128 value2, System.Runtime.Intrinsics.Vector128 value3) value, [System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute(Max = (byte)(3))] byte index) { throw null; } + public static unsafe void StoreSelectedScalar(double* address, (System.Runtime.Intrinsics.Vector128 value1, System.Runtime.Intrinsics.Vector128 value2, System.Runtime.Intrinsics.Vector128 value3) value, [System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute(Max = (byte)(1))] byte index) { throw null; } + public static unsafe void StoreSelectedScalar(byte* address, (System.Runtime.Intrinsics.Vector128 value1, System.Runtime.Intrinsics.Vector128 value2, System.Runtime.Intrinsics.Vector128 value3, System.Runtime.Intrinsics.Vector128 value4) value, [System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute(Max = (byte)(15))] byte index) { throw null; } + public static unsafe void StoreSelectedScalar(sbyte* address, (System.Runtime.Intrinsics.Vector128 value1, System.Runtime.Intrinsics.Vector128 value2, System.Runtime.Intrinsics.Vector128 value3, System.Runtime.Intrinsics.Vector128 value4) value, [System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute(Max = (byte)(15))] byte index) { throw null; } + public static unsafe void StoreSelectedScalar(short* address, (System.Runtime.Intrinsics.Vector128 value1, System.Runtime.Intrinsics.Vector128 value2, System.Runtime.Intrinsics.Vector128 value3, System.Runtime.Intrinsics.Vector128 value4) value, [System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute(Max = (byte)(7))] byte index) { throw null; } + public static unsafe void StoreSelectedScalar(ushort* address, (System.Runtime.Intrinsics.Vector128 value1, System.Runtime.Intrinsics.Vector128 value2, System.Runtime.Intrinsics.Vector128 value3, System.Runtime.Intrinsics.Vector128 value4) value, [System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute(Max = (byte)(7))] byte index) { throw null; } + public static unsafe void StoreSelectedScalar(int* address, (System.Runtime.Intrinsics.Vector128 value1, System.Runtime.Intrinsics.Vector128 value2, System.Runtime.Intrinsics.Vector128 value3, System.Runtime.Intrinsics.Vector128 value4) value, [System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute(Max = (byte)(3))] byte index) { throw null; } + public static unsafe void StoreSelectedScalar(uint* address, (System.Runtime.Intrinsics.Vector128 value1, System.Runtime.Intrinsics.Vector128 value2, System.Runtime.Intrinsics.Vector128 value3, System.Runtime.Intrinsics.Vector128 value4) value, [System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute(Max = (byte)(3))] byte index) { throw null; } + public static unsafe void StoreSelectedScalar(long* address, (System.Runtime.Intrinsics.Vector128 value1, System.Runtime.Intrinsics.Vector128 value2, System.Runtime.Intrinsics.Vector128 value3, System.Runtime.Intrinsics.Vector128 value4) value, [System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute(Max = (byte)(1))] byte index) { throw null; } + public static unsafe void StoreSelectedScalar(ulong* address, (System.Runtime.Intrinsics.Vector128 value1, System.Runtime.Intrinsics.Vector128 value2, System.Runtime.Intrinsics.Vector128 value3, System.Runtime.Intrinsics.Vector128 value4) value, [System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute(Max = (byte)(1))] byte index) { throw null; } + public static unsafe void StoreSelectedScalar(float* address, (System.Runtime.Intrinsics.Vector128 value1, System.Runtime.Intrinsics.Vector128 value2, System.Runtime.Intrinsics.Vector128 value3, System.Runtime.Intrinsics.Vector128 value4) value, [System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute(Max = (byte)(3))] byte index) { throw null; } + public static unsafe void StoreSelectedScalar(double* address, (System.Runtime.Intrinsics.Vector128 value1, System.Runtime.Intrinsics.Vector128 value2, System.Runtime.Intrinsics.Vector128 value3, System.Runtime.Intrinsics.Vector128 value4) value, [System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute(Max = (byte)(1))] byte index) { throw null; } public unsafe static void StoreVector128x2AndZip(byte* address, (System.Runtime.Intrinsics.Vector128 Value1, System.Runtime.Intrinsics.Vector128 Value2) value) { throw null; } public unsafe static void StoreVector128x2AndZip(sbyte* address, (System.Runtime.Intrinsics.Vector128 Value1, System.Runtime.Intrinsics.Vector128 Value2) value) { throw null; } public unsafe static void StoreVector128x2AndZip(short* address, (System.Runtime.Intrinsics.Vector128 Value1, System.Runtime.Intrinsics.Vector128 Value2) value) { throw null; } diff --git a/src/libraries/System.Runtime.Serialization.Formatters/src/System/Runtime/Serialization/Formatters/Binary/Converter.cs b/src/libraries/System.Runtime.Serialization.Formatters/src/System/Runtime/Serialization/Formatters/Binary/Converter.cs index 6afada7f23ce3..ca6cd85ba6b2a 100644 --- a/src/libraries/System.Runtime.Serialization.Formatters/src/System/Runtime/Serialization/Formatters/Binary/Converter.cs +++ b/src/libraries/System.Runtime.Serialization.Formatters/src/System/Runtime/Serialization/Formatters/Binary/Converter.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Reflection; -using System.Globalization; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; +using System.Globalization; +using System.Reflection; namespace System.Runtime.Serialization.Formatters.Binary { diff --git a/src/libraries/System.Runtime.Serialization.Formatters/src/System/Runtime/Serialization/SerializationFieldInfo.cs b/src/libraries/System.Runtime.Serialization.Formatters/src/System/Runtime/Serialization/SerializationFieldInfo.cs index 8df8c2836f17c..c44da13035515 100644 --- a/src/libraries/System.Runtime.Serialization.Formatters/src/System/Runtime/Serialization/SerializationFieldInfo.cs +++ b/src/libraries/System.Runtime.Serialization.Formatters/src/System/Runtime/Serialization/SerializationFieldInfo.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Reflection; -using System.Globalization; using System.Diagnostics; +using System.Globalization; +using System.Reflection; namespace System.Runtime.Serialization { diff --git a/src/libraries/System.Runtime/ref/System.Runtime.cs b/src/libraries/System.Runtime/ref/System.Runtime.cs index ef18f1c921742..f253ada5f48a4 100644 --- a/src/libraries/System.Runtime/ref/System.Runtime.cs +++ b/src/libraries/System.Runtime/ref/System.Runtime.cs @@ -384,6 +384,9 @@ public void CopyTo(System.Array array, long index) { } public static System.Array CreateInstance(System.Type elementType, int[] lengths, int[] lowerBounds) { throw null; } [System.Diagnostics.CodeAnalysis.RequiresDynamicCode("The code for an array of the specified type might not be available.")] public static System.Array CreateInstance(System.Type elementType, params long[] lengths) { throw null; } + public static System.Array CreateInstanceFromArrayType(System.Type arrayType, int length) { throw null; } + public static System.Array CreateInstanceFromArrayType(System.Type arrayType, params int[] lengths) { throw null; } + public static System.Array CreateInstanceFromArrayType(System.Type arrayType, int[] lengths, int[] lowerBounds) { throw null; } public static T[] Empty() { throw null; } public static bool Exists(T[] array, System.Predicate match) { throw null; } public static void Fill(T[] array, T value) { } @@ -12443,10 +12446,10 @@ public partial struct DependentHandle : System.IDisposable private object _dummy; private int _dummyPrimitive; public DependentHandle(object? target, object? dependent) { throw null; } - public object? Dependent { get { throw null; } set { } } - public bool IsAllocated { get { throw null; } } - public object? Target { get { throw null; } set { } } - public (object? Target, object? Dependent) TargetAndDependent { get { throw null; } } + public object? Dependent { readonly get { throw null; } set { } } + public readonly bool IsAllocated { get { throw null; } } + public object? Target { readonly get { throw null; } set { } } + public readonly (object? Target, object? Dependent) TargetAndDependent { get { throw null; } } public void Dispose() { } } public enum GCLargeObjectHeapCompactionMode @@ -13469,16 +13472,16 @@ public FieldOffsetAttribute(int offset) { } public partial struct GCHandle : System.IEquatable { private int _dummyPrimitive; - public bool IsAllocated { get { throw null; } } - public object? Target { get { throw null; } set { } } - public System.IntPtr AddrOfPinnedObject() { throw null; } + public readonly bool IsAllocated { get { throw null; } } + public object? Target { readonly get { throw null; } set { } } + public readonly System.IntPtr AddrOfPinnedObject() { throw null; } public static System.Runtime.InteropServices.GCHandle Alloc(object? value) { throw null; } public static System.Runtime.InteropServices.GCHandle Alloc(object? value, System.Runtime.InteropServices.GCHandleType type) { throw null; } - public override bool Equals([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] object? o) { throw null; } - public bool Equals(System.Runtime.InteropServices.GCHandle other) { throw null; } + public override readonly bool Equals([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] object? o) { throw null; } + public readonly bool Equals(System.Runtime.InteropServices.GCHandle other) { throw null; } public void Free() { } public static System.Runtime.InteropServices.GCHandle FromIntPtr(System.IntPtr value) { throw null; } - public override int GetHashCode() { throw null; } + public override readonly int GetHashCode() { throw null; } public static bool operator ==(System.Runtime.InteropServices.GCHandle a, System.Runtime.InteropServices.GCHandle b) { throw null; } public static explicit operator System.Runtime.InteropServices.GCHandle (System.IntPtr value) { throw null; } public static explicit operator System.IntPtr (System.Runtime.InteropServices.GCHandle value) { throw null; } diff --git a/src/libraries/System.Runtime/tests/System.Runtime.InteropServices.RuntimeInformation.Tests/DescriptionNameTests.cs b/src/libraries/System.Runtime/tests/System.Runtime.InteropServices.RuntimeInformation.Tests/DescriptionNameTests.cs index 94f006c5f587c..335c9c001deee 100644 --- a/src/libraries/System.Runtime/tests/System.Runtime.InteropServices.RuntimeInformation.Tests/DescriptionNameTests.cs +++ b/src/libraries/System.Runtime/tests/System.Runtime.InteropServices.RuntimeInformation.Tests/DescriptionNameTests.cs @@ -53,12 +53,8 @@ public void DumpRuntimeInformationToConsole() if (OperatingSystem.IsLinux()) { - Console.WriteLine($"### CGROUPS VERSION: {Interop.cgroups.s_cgroupVersion}"); - string cgroupsLocation = Interop.cgroups.s_cgroupMemoryPath; - if (cgroupsLocation != null) - { - Console.WriteLine($"### CGROUPS MEMORY: {cgroupsLocation}"); - } + // needs to be in a separate method due to Mono issue: https://github.com/dotnet/runtime/issues/77513 + DumpCGroupInformationToConsole(); } Console.WriteLine($"### ENVIRONMENT VARIABLES"); @@ -163,6 +159,16 @@ public void DumpRuntimeInformationToConsole() } } + private static void DumpCGroupInformationToConsole() + { + Console.WriteLine($"### CGROUPS VERSION: {Interop.cgroups.s_cgroupVersion}"); + string cgroupsLocation = Interop.cgroups.s_cgroupMemoryPath; + if (cgroupsLocation != null) + { + Console.WriteLine($"### CGROUPS MEMORY: {cgroupsLocation}"); + } + } + [Fact] [OuterLoop] [SkipOnPlatform(TestPlatforms.Browser, "throws PNSE when binariesLocation is not an empty string.")] diff --git a/src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ArrayTests.cs b/src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ArrayTests.cs index 13dc4f9d17f25..2850347d59d6a 100644 --- a/src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ArrayTests.cs +++ b/src/libraries/System.Runtime/tests/System.Runtime.Tests/System/ArrayTests.cs @@ -7,10 +7,8 @@ using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; -using System.Threading.Tasks; using Microsoft.DotNet.XUnitExtensions; using Xunit; -using Xunit.Abstractions; namespace System.Tests { @@ -1862,32 +1860,47 @@ public static void CreateInstance_Advanced(Type elementType, int[] lengths, int[ // Use CreateInstance(Type, int) Array array1 = Array.CreateInstance(elementType, lengths[0]); VerifyArray(array1, elementType, lengths, lowerBounds, repeatedValue); + // Use CreateInstanceFromArrayType(Type, int) + array1 = Array.CreateInstanceFromArrayType(array1.GetType(), lengths[0]); + VerifyArray(array1, elementType, lengths, lowerBounds, repeatedValue); } else if (lengths.Length == 2) { // Use CreateInstance(Type, int, int) Array array2 = Array.CreateInstance(elementType, lengths[0], lengths[1]); VerifyArray(array2, elementType, lengths, lowerBounds, repeatedValue); + // Use CreateInstanceFromArrayType(Type, int, int) + array2 = Array.CreateInstanceFromArrayType(array2.GetType(), lengths[0], lengths[1]); + VerifyArray(array2, elementType, lengths, lowerBounds, repeatedValue); } else if (lengths.Length == 3) { // Use CreateInstance(Type, int, int, int) Array array3 = Array.CreateInstance(elementType, lengths[0], lengths[1], lengths[2]); VerifyArray(array3, elementType, lengths, lowerBounds, repeatedValue); + // Use CreateInstanceFromArrayType(Type, int, int, int) + array3 = Array.CreateInstanceFromArrayType(array3.GetType(), lengths[0], lengths[1], lengths[2]); + VerifyArray(array3, elementType, lengths, lowerBounds, repeatedValue); } // Use CreateInstance(Type, int[]) Array array4 = Array.CreateInstance(elementType, lengths); VerifyArray(array4, elementType, lengths, lowerBounds, repeatedValue); + // Use CreateInstanceFromArrayType(Type, int[]) + array4 = Array.CreateInstanceFromArrayType(array4.GetType(), lengths); + VerifyArray(array4, elementType, lengths, lowerBounds, repeatedValue); + // Use CreateInstance(Type, long[]) Array array5 = Array.CreateInstance(elementType, lengths.Select(length => (long)length).ToArray()); VerifyArray(array5, elementType, lengths, lowerBounds, repeatedValue); - } // Use CreateInstance(Type, int[], int[]) Array array6 = Array.CreateInstance(elementType, lengths, lowerBounds); VerifyArray(array6, elementType, lengths, lowerBounds, repeatedValue); + // Use CreateInstanceFromArrayType(Type, int[], int[]) + array6 = Array.CreateInstanceFromArrayType(array6.GetType(), lengths, lowerBounds); + VerifyArray(array6, elementType, lengths, lowerBounds, repeatedValue); } [Fact] @@ -1899,6 +1912,12 @@ public static void CreateInstance_NullElementType_ThrowsArgumentNullException() AssertExtensions.Throws("elementType", () => Array.CreateInstance(null, new int[1])); AssertExtensions.Throws("elementType", () => Array.CreateInstance(null, new long[1])); AssertExtensions.Throws("elementType", () => Array.CreateInstance(null, new int[1], new int[1])); + + AssertExtensions.Throws("arrayType", () => Array.CreateInstanceFromArrayType(null, 0)); + AssertExtensions.Throws("arrayType", () => Array.CreateInstanceFromArrayType(null, 0, 0)); + AssertExtensions.Throws("arrayType", () => Array.CreateInstanceFromArrayType(null, 0, 0, 0)); + AssertExtensions.Throws("arrayType", () => Array.CreateInstanceFromArrayType(null, new int[1])); + AssertExtensions.Throws("arrayType", () => Array.CreateInstanceFromArrayType(null, new int[1], new int[1])); } public static IEnumerable CreateInstance_NotSupportedType_TestData() @@ -1926,6 +1945,30 @@ public void CreateInstance_NotSupportedType_ThrowsNotSupportedException(Type ele Assert.Throws(() => Array.CreateInstance(elementType, new int[1], new int[1])); } + [Theory] + [InlineData(typeof(GenericClass<>))] + public void CreateInstanceFromArrayType_NotSupportedArrayType_ThrowsNotSupportedException(Type elementType) + { + Assert.Throws(() => Array.CreateInstanceFromArrayType(elementType.MakeArrayType(), 0)); + Assert.Throws(() => Array.CreateInstanceFromArrayType(elementType.MakeArrayType(rank: 2), 0, 0)); + Assert.Throws(() => Array.CreateInstanceFromArrayType(elementType.MakeArrayType(rank: 3), 0, 0, 0)); + Assert.Throws(() => Array.CreateInstanceFromArrayType(elementType.MakeArrayType(), new int[1])); + Assert.Throws(() => Array.CreateInstanceFromArrayType(elementType.MakeArrayType(), new int[1], new int[1])); + } + + [Theory] + [InlineData(typeof(int))] + [InlineData(typeof(GenericClass<>))] + [InlineData(typeof(Span))] + public void CreateInstanceFromArrayType_NotAnArrayType_ThrowsArgumentException(Type notAnArrayType) + { + Assert.Throws("arrayType", () => Array.CreateInstanceFromArrayType(notAnArrayType, 0)); + Assert.Throws("arrayType", () => Array.CreateInstanceFromArrayType(notAnArrayType, 0, 0)); + Assert.Throws("arrayType", () => Array.CreateInstanceFromArrayType(notAnArrayType, 0, 0, 0)); + Assert.Throws("arrayType", () => Array.CreateInstanceFromArrayType(notAnArrayType, new int[1])); + Assert.Throws("arrayType", () => Array.CreateInstanceFromArrayType(notAnArrayType, new int[1], new int[1])); + } + [Fact] public void CreateInstance_TypeNotRuntimeType_ThrowsArgumentException() { @@ -1938,6 +1981,12 @@ public void CreateInstance_TypeNotRuntimeType_ThrowsArgumentException() AssertExtensions.Throws("elementType", () => Array.CreateInstance(elementType, new int[1])); AssertExtensions.Throws("elementType", () => Array.CreateInstance(elementType, new long[1])); AssertExtensions.Throws("elementType", () => Array.CreateInstance(elementType, new int[1], new int[1])); + + AssertExtensions.Throws("arrayType", () => Array.CreateInstanceFromArrayType(elementType, 1)); + AssertExtensions.Throws("arrayType", () => Array.CreateInstanceFromArrayType(elementType, 1, 1)); + AssertExtensions.Throws("arrayType", () => Array.CreateInstanceFromArrayType(elementType, 1, 1, 1)); + AssertExtensions.Throws("arrayType", () => Array.CreateInstanceFromArrayType(elementType, new int[1])); + AssertExtensions.Throws("arrayType", () => Array.CreateInstanceFromArrayType(elementType, new int[1], new int[1])); } } @@ -1950,6 +1999,12 @@ public void CreateInstance_NegativeLength_ThrowsArgumentOutOfRangeException() AssertExtensions.Throws("lengths[0]", () => Array.CreateInstance(typeof(int), new int[] { -1 })); AssertExtensions.Throws("lengths[0]", () => Array.CreateInstance(typeof(int), new long[] { -1 })); AssertExtensions.Throws("lengths[0]", () => Array.CreateInstance(typeof(int), new int[] { -1 }, new int[1])); + + AssertExtensions.Throws("length", () => Array.CreateInstanceFromArrayType(typeof(int[]), -1)); + AssertExtensions.Throws("lengths[0]", () => Array.CreateInstanceFromArrayType(typeof(int[,]), -1, 0)); + AssertExtensions.Throws("lengths[0]", () => Array.CreateInstanceFromArrayType(typeof(int[,,]), -1, 0, 0)); + AssertExtensions.Throws("lengths[0]", () => Array.CreateInstanceFromArrayType(typeof(int[]), new int[] { -1 })); + AssertExtensions.Throws("lengths[0]", () => Array.CreateInstanceFromArrayType(typeof(int[]), new int[] { -1 }, new int[1])); } [Fact] @@ -1957,12 +2012,17 @@ public void CreateInstance_NegativeLength2_ThrowsArgumentOutOfRangeException() { AssertExtensions.Throws("length2", () => Array.CreateInstance(typeof(int), 0, -1)); AssertExtensions.Throws("length2", () => Array.CreateInstance(typeof(int), 0, -1, 0)); + + AssertExtensions.Throws("lengths[1]", () => Array.CreateInstanceFromArrayType(typeof(int[,]), 0, -1)); + AssertExtensions.Throws("lengths[1]", () => Array.CreateInstanceFromArrayType(typeof(int[,,]), 0, -1, 0)); } [Fact] public void CreateInstance_NegativeLength3_ThrowsArgumentOutOfRangeException() { AssertExtensions.Throws("length3", () => Array.CreateInstance(typeof(int), 0, 0, -1)); + + AssertExtensions.Throws("lengths[2]", () => Array.CreateInstanceFromArrayType(typeof(int[,,]), 0, 0, -1)); } [Fact] @@ -1971,6 +2031,9 @@ public void CreateInstance_LengthsNull_ThrowsArgumentNullException() AssertExtensions.Throws("lengths", () => Array.CreateInstance(typeof(int), (int[])null)); AssertExtensions.Throws("lengths", () => Array.CreateInstance(typeof(int), (long[])null)); AssertExtensions.Throws("lengths", () => Array.CreateInstance(typeof(int), null, new int[1])); + + AssertExtensions.Throws("lengths", () => Array.CreateInstanceFromArrayType(typeof(int[]), (int[])null)); + AssertExtensions.Throws("lengths", () => Array.CreateInstanceFromArrayType(typeof(int[]), null, new int[1])); } [Fact] @@ -1980,12 +2043,36 @@ public void CreateInstance_LengthsEmpty_ThrowsArgumentException() AssertExtensions.Throws(null, () => Array.CreateInstance(typeof(int), new long[0])); AssertExtensions.Throws(null, () => Array.CreateInstance(typeof(int), new int[0], new int[1])); AssertExtensions.Throws(null, () => Array.CreateInstance(typeof(int), new int[0], new int[0])); + + AssertExtensions.Throws(null, () => Array.CreateInstanceFromArrayType(typeof(int[]), new int[0])); + AssertExtensions.Throws(null, () => Array.CreateInstanceFromArrayType(typeof(int[]), new int[0], new int[1])); + AssertExtensions.Throws(null, () => Array.CreateInstanceFromArrayType(typeof(int[]), new int[0], new int[0])); } [Fact] public void CreateInstance_LowerBoundNull_ThrowsArgumentNullException() { AssertExtensions.Throws("lowerBounds", () => Array.CreateInstance(typeof(int), new int[] { 1 }, null)); + + AssertExtensions.Throws("lowerBounds", () => Array.CreateInstanceFromArrayType(typeof(int[]), new int[] { 1 }, null)); + } + + [Fact] + public void CreateInstanceFromTemplate_Rank1() + { + Type variableBoundArrayType = typeof(object).MakeArrayType(1); + Assert.NotEqual(typeof(object[]), variableBoundArrayType); + + Assert.Equal(typeof(object[]), Array.CreateInstanceFromArrayType(variableBoundArrayType, 12).GetType()); + Assert.Equal(typeof(object[]), Array.CreateInstanceFromArrayType(variableBoundArrayType, [22]).GetType()); + Assert.Equal(typeof(object[]), Array.CreateInstanceFromArrayType(variableBoundArrayType, [33], [0]).GetType()); + + if (PlatformDetection.IsNonZeroLowerBoundArraySupported) + { + Assert.Equal(variableBoundArrayType, Array.CreateInstanceFromArrayType(variableBoundArrayType, [33], [22]).GetType()); + } + + Assert.Throws(() => Array.CreateInstanceFromArrayType(typeof(object[]), [7], [8])); } [Theory] @@ -2002,6 +2089,8 @@ public void CreateInstance_InvalidLengthInLongLength_ThrowsArgumentOutOfRangeExc public void CreateInstance_LengthsAndLowerBoundsHaveDifferentLengths_ThrowsArgumentException(int length) { AssertExtensions.Throws(null, () => Array.CreateInstance(typeof(int), new int[1], new int[length])); + + AssertExtensions.Throws(null, () => Array.CreateInstanceFromArrayType(typeof(int[]), new int[1], new int[length])); } [Theory] @@ -2014,12 +2103,16 @@ public void CreateInstance_RankMoreThanMaxRank_ThrowsTypeLoadException(int lengt var lengths = new int[length]; var lowerBounds = new int[length]; Assert.Throws(() => Array.CreateInstance(typeof(int), lengths, lowerBounds)); + + Assert.Throws(() => Array.CreateInstanceFromArrayType(typeof(int[]), lengths, lowerBounds)); } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNonZeroLowerBoundArraySupported))] public void CreateInstance_Type_LengthsPlusLowerBoundOverflows_ThrowsArgumentOutOfRangeException() { AssertExtensions.Throws(null, () => Array.CreateInstance(typeof(int), new int[] { int.MaxValue }, new int[] { 2 })); + + AssertExtensions.Throws(null, () => Array.CreateInstanceFromArrayType(typeof(int).MakeArrayType(1), new int[] { int.MaxValue }, new int[] { 2 })); } [Fact] diff --git a/src/libraries/System.Security.AccessControl/src/System/Security/AccessControl/CommonObjectSecurity.cs b/src/libraries/System.Security.AccessControl/src/System/Security/AccessControl/CommonObjectSecurity.cs index bb64eaec0d2b6..f5cdcbb81e6a9 100644 --- a/src/libraries/System.Security.AccessControl/src/System/Security/AccessControl/CommonObjectSecurity.cs +++ b/src/libraries/System.Security.AccessControl/src/System/Security/AccessControl/CommonObjectSecurity.cs @@ -8,13 +8,13 @@ ** ===========================================================*/ -using Microsoft.Win32; using System; using System.Collections; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Runtime.InteropServices; using System.Security.Principal; +using Microsoft.Win32; namespace System.Security.AccessControl { diff --git a/src/libraries/System.Security.AccessControl/src/System/Security/AccessControl/NativeObjectSecurity.cs b/src/libraries/System.Security.AccessControl/src/System/Security/AccessControl/NativeObjectSecurity.cs index 9bf2f9d7d490b..c7aeffb6c965d 100644 --- a/src/libraries/System.Security.AccessControl/src/System/Security/AccessControl/NativeObjectSecurity.cs +++ b/src/libraries/System.Security.AccessControl/src/System/Security/AccessControl/NativeObjectSecurity.cs @@ -8,7 +8,6 @@ ** ===========================================================*/ -using Microsoft.Win32; using System; using System.Collections; using System.Diagnostics; @@ -17,6 +16,7 @@ using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Security.Principal; +using Microsoft.Win32; using FileNotFoundException = System.IO.FileNotFoundException; namespace System.Security.AccessControl diff --git a/src/libraries/System.Security.AccessControl/src/System/Security/AccessControl/Privilege.cs b/src/libraries/System.Security.AccessControl/src/System/Security/AccessControl/Privilege.cs index 90bf6667e88a4..98a7612fa2733 100644 --- a/src/libraries/System.Security.AccessControl/src/System/Security/AccessControl/Privilege.cs +++ b/src/libraries/System.Security.AccessControl/src/System/Security/AccessControl/Privilege.cs @@ -1,8 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32; -using Microsoft.Win32.SafeHandles; using System.Collections; using System.Collections.Generic; using System.Diagnostics; @@ -11,9 +9,11 @@ using System.Runtime.Versioning; using System.Security.Principal; using System.Threading; +using Microsoft.Win32; +using Microsoft.Win32.SafeHandles; +using static System.Security.Principal.Win32; using CultureInfo = System.Globalization.CultureInfo; using Luid = Interop.Advapi32.LUID; -using static System.Security.Principal.Win32; namespace System.Security.AccessControl { diff --git a/src/libraries/System.Security.AccessControl/src/System/Security/AccessControl/SecurityDescriptor.cs b/src/libraries/System.Security.AccessControl/src/System/Security/AccessControl/SecurityDescriptor.cs index 2320b2ddefa0d..1bfd355e306a2 100644 --- a/src/libraries/System.Security.AccessControl/src/System/Security/AccessControl/SecurityDescriptor.cs +++ b/src/libraries/System.Security.AccessControl/src/System/Security/AccessControl/SecurityDescriptor.cs @@ -8,7 +8,6 @@ ** ===========================================================*/ -using Microsoft.Win32; using System; using System.ComponentModel; using System.Diagnostics; @@ -16,6 +15,7 @@ using System.Globalization; using System.Runtime.InteropServices; using System.Security.Principal; +using Microsoft.Win32; namespace System.Security.AccessControl { diff --git a/src/libraries/System.Security.AccessControl/src/System/Security/AccessControl/Win32.cs b/src/libraries/System.Security.AccessControl/src/System/Security/AccessControl/Win32.cs index 17a4dd94e9c93..d70fb7fa4cabd 100644 --- a/src/libraries/System.Security.AccessControl/src/System/Security/AccessControl/Win32.cs +++ b/src/libraries/System.Security.AccessControl/src/System/Security/AccessControl/Win32.cs @@ -1,8 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32; -using Microsoft.Win32.SafeHandles; using System; using System.Collections; using System.Diagnostics; @@ -11,6 +9,8 @@ using System.Runtime.Versioning; using System.Security; using System.Security.Principal; +using Microsoft.Win32; +using Microsoft.Win32.SafeHandles; namespace System.Security.AccessControl { diff --git a/src/libraries/System.Security.AccessControl/src/System/Security/Principal/Win32.cs b/src/libraries/System.Security.AccessControl/src/System/Security/Principal/Win32.cs index 292ffa3c1e63b..5f5e82289495d 100644 --- a/src/libraries/System.Security.AccessControl/src/System/Security/Principal/Win32.cs +++ b/src/libraries/System.Security.AccessControl/src/System/Security/Principal/Win32.cs @@ -3,13 +3,13 @@ // -using Microsoft.Win32; -using Microsoft.Win32.SafeHandles; using System; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -using System.Text; using System.Runtime.Versioning; +using System.Text; +using Microsoft.Win32; +using Microsoft.Win32.SafeHandles; namespace System.Security.Principal { diff --git a/src/libraries/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/DecryptorPal.cs b/src/libraries/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/DecryptorPal.cs index 9ae8c47962921..6f13797dd9875 100644 --- a/src/libraries/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/DecryptorPal.cs +++ b/src/libraries/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/DecryptorPal.cs @@ -2,11 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Text; using System.Diagnostics; using System.Security.Cryptography; using System.Security.Cryptography.Pkcs; using System.Security.Cryptography.X509Certificates; +using System.Text; namespace Internal.Cryptography { diff --git a/src/libraries/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/KeyAgreeRecipientInfoPal.cs b/src/libraries/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/KeyAgreeRecipientInfoPal.cs index a160f8a891c81..279d0856e4e64 100644 --- a/src/libraries/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/KeyAgreeRecipientInfoPal.cs +++ b/src/libraries/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/KeyAgreeRecipientInfoPal.cs @@ -2,10 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Text; using System.Diagnostics; using System.Security.Cryptography; using System.Security.Cryptography.Pkcs; +using System.Text; namespace Internal.Cryptography { diff --git a/src/libraries/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/KeyTransRecipientInfoPal.cs b/src/libraries/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/KeyTransRecipientInfoPal.cs index cf3de319a0eb7..158f88d2e485c 100644 --- a/src/libraries/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/KeyTransRecipientInfoPal.cs +++ b/src/libraries/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/KeyTransRecipientInfoPal.cs @@ -2,9 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Text; using System.Diagnostics; using System.Security.Cryptography.Pkcs; +using System.Text; namespace Internal.Cryptography { diff --git a/src/libraries/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/Pal/Windows/HeapBlockRetainer.cs b/src/libraries/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/Pal/Windows/HeapBlockRetainer.cs index bd51a2b307083..2eafa07ae2e55 100644 --- a/src/libraries/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/Pal/Windows/HeapBlockRetainer.cs +++ b/src/libraries/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/Pal/Windows/HeapBlockRetainer.cs @@ -3,11 +3,10 @@ using System; using System.Collections.Generic; -using System.Text; using System.Diagnostics; using System.Globalization; using System.Runtime.InteropServices; - +using System.Text; using Microsoft.Win32.SafeHandles; namespace Internal.Cryptography.Pal.Windows diff --git a/src/libraries/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/Pal/Windows/HelpersWindows.cs b/src/libraries/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/Pal/Windows/HelpersWindows.cs index ba8a290583a8b..bf8c84f9fd3ff 100644 --- a/src/libraries/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/Pal/Windows/HelpersWindows.cs +++ b/src/libraries/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/Pal/Windows/HelpersWindows.cs @@ -5,17 +5,15 @@ using System.Buffers; using System.Buffers.Binary; using System.Diagnostics; -using System.Text; using System.Runtime.InteropServices; using System.Security.Cryptography; using System.Security.Cryptography.Pkcs; using System.Security.Cryptography.X509Certificates; -using X509IssuerSerial = System.Security.Cryptography.Xml.X509IssuerSerial; - +using System.Text; using Microsoft.Win32.SafeHandles; - -using CryptProvParam = Interop.Advapi32.CryptProvParam; using static Interop.Crypt32; +using CryptProvParam = Interop.Advapi32.CryptProvParam; +using X509IssuerSerial = System.Security.Cryptography.Xml.X509IssuerSerial; namespace Internal.Cryptography.Pal.Windows { diff --git a/src/libraries/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/Pal/Windows/KeyAgreeRecipientInfoPalWindows.cs b/src/libraries/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/Pal/Windows/KeyAgreeRecipientInfoPalWindows.cs index 3fb3d21391f24..edc554e5dc97f 100644 --- a/src/libraries/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/Pal/Windows/KeyAgreeRecipientInfoPalWindows.cs +++ b/src/libraries/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/Pal/Windows/KeyAgreeRecipientInfoPalWindows.cs @@ -3,12 +3,10 @@ using System; using System.Diagnostics; +using System.Runtime.InteropServices; using System.Security.Cryptography; using System.Security.Cryptography.Pkcs; -using System.Runtime.InteropServices; - using Microsoft.Win32.SafeHandles; - using static Interop.Crypt32; namespace Internal.Cryptography.Pal.Windows diff --git a/src/libraries/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/Pal/Windows/PkcsPalWindows.Encrypt.cs b/src/libraries/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/Pal/Windows/PkcsPalWindows.Encrypt.cs index 3750d47c16447..edd8c46558b1c 100644 --- a/src/libraries/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/Pal/Windows/PkcsPalWindows.Encrypt.cs +++ b/src/libraries/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/Pal/Windows/PkcsPalWindows.Encrypt.cs @@ -8,12 +8,9 @@ using System.Security.Cryptography; using System.Security.Cryptography.Pkcs; using System.Security.Cryptography.X509Certificates; - -using FILETIME = System.Runtime.InteropServices.ComTypes.FILETIME; - using Microsoft.Win32.SafeHandles; - using static Interop.Crypt32; +using FILETIME = System.Runtime.InteropServices.ComTypes.FILETIME; namespace Internal.Cryptography.Pal.Windows { diff --git a/src/libraries/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/Pal/Windows/PkcsPalWindows.cs b/src/libraries/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/Pal/Windows/PkcsPalWindows.cs index 8db5bf5dfab5d..ab05ccc6f9f6e 100644 --- a/src/libraries/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/Pal/Windows/PkcsPalWindows.cs +++ b/src/libraries/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/Pal/Windows/PkcsPalWindows.cs @@ -2,18 +2,16 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Text; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Runtime.InteropServices; using System.Runtime.InteropServices.ComTypes; using System.Security.Cryptography; using System.Security.Cryptography.Pkcs; using System.Security.Cryptography.X509Certificates; - +using System.Text; using Microsoft.Win32.SafeHandles; - using static Interop.Crypt32; -using System.Diagnostics.CodeAnalysis; namespace Internal.Cryptography.Pal.Windows { diff --git a/src/libraries/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/RecipientInfoPal.cs b/src/libraries/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/RecipientInfoPal.cs index e8cd317e7fa15..fe1641884484b 100644 --- a/src/libraries/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/RecipientInfoPal.cs +++ b/src/libraries/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/RecipientInfoPal.cs @@ -2,9 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Text; using System.Diagnostics; using System.Security.Cryptography.Pkcs; +using System.Text; namespace Internal.Cryptography { diff --git a/src/libraries/System.Security.Cryptography.Pkcs/src/System/Security/Cryptography/CryptographicAttributeObject.cs b/src/libraries/System.Security.Cryptography.Pkcs/src/System/Security/Cryptography/CryptographicAttributeObject.cs index 06ee3b5cdc15a..d2d55378ce54d 100644 --- a/src/libraries/System.Security.Cryptography.Pkcs/src/System/Security/Cryptography/CryptographicAttributeObject.cs +++ b/src/libraries/System.Security.Cryptography.Pkcs/src/System/Security/Cryptography/CryptographicAttributeObject.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Internal.Cryptography; using System; using System.Diagnostics; +using Internal.Cryptography; namespace System.Security.Cryptography { diff --git a/src/libraries/System.Security.Cryptography.Pkcs/src/System/Security/Cryptography/Pkcs/CmsSignature.DSA.cs b/src/libraries/System.Security.Cryptography.Pkcs/src/System/Security/Cryptography/Pkcs/CmsSignature.DSA.cs index 49a3b1815e926..97192c83b9165 100644 --- a/src/libraries/System.Security.Cryptography.Pkcs/src/System/Security/Cryptography/Pkcs/CmsSignature.DSA.cs +++ b/src/libraries/System.Security.Cryptography.Pkcs/src/System/Security/Cryptography/Pkcs/CmsSignature.DSA.cs @@ -2,9 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Buffers; +using System.Collections.Generic; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; -using System.Collections.Generic; using System.Security.Cryptography.X509Certificates; using Internal.Cryptography; diff --git a/src/libraries/System.Security.Cryptography.Pkcs/src/System/Security/Cryptography/Pkcs/Pkcs12SecretBag.cs b/src/libraries/System.Security.Cryptography.Pkcs/src/System/Security/Cryptography/Pkcs/Pkcs12SecretBag.cs index c214def904283..259af2838ac5c 100644 --- a/src/libraries/System.Security.Cryptography.Pkcs/src/System/Security/Cryptography/Pkcs/Pkcs12SecretBag.cs +++ b/src/libraries/System.Security.Cryptography.Pkcs/src/System/Security/Cryptography/Pkcs/Pkcs12SecretBag.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Internal.Cryptography; using System.Diagnostics; using System.Formats.Asn1; using System.Security.Cryptography.Pkcs.Asn1; +using Internal.Cryptography; namespace System.Security.Cryptography.Pkcs { diff --git a/src/libraries/System.Security.Cryptography.ProtectedData/src/System/Security/Cryptography/ProtectedData.cs b/src/libraries/System.Security.Cryptography.ProtectedData/src/System/Security/Cryptography/ProtectedData.cs index b17f544a5f861..03c605d6252ac 100644 --- a/src/libraries/System.Security.Cryptography.ProtectedData/src/System/Security/Cryptography/ProtectedData.cs +++ b/src/libraries/System.Security.Cryptography.ProtectedData/src/System/Security/Cryptography/ProtectedData.cs @@ -2,11 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Runtime.InteropServices; - using Internal.Cryptography; - -using DATA_BLOB = Interop.Crypt32.DATA_BLOB; using CryptProtectDataFlags = Interop.Crypt32.CryptProtectDataFlags; +using DATA_BLOB = Interop.Crypt32.DATA_BLOB; namespace System.Security.Cryptography { diff --git a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/AncestralNamespaceContextManager.cs b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/AncestralNamespaceContextManager.cs index 54341e375e07e..199ffafa76c3e 100644 --- a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/AncestralNamespaceContextManager.cs +++ b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/AncestralNamespaceContextManager.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Xml; using System.Collections; +using System.Xml; namespace System.Security.Cryptography.Xml { diff --git a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/AttributeSortOrder.cs b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/AttributeSortOrder.cs index ece8cfb89fa20..8aae42b20c7a6 100644 --- a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/AttributeSortOrder.cs +++ b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/AttributeSortOrder.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Xml; using System.Collections; +using System.Xml; namespace System.Security.Cryptography.Xml { diff --git a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/C14NAncestralNamespaceContextManager.cs b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/C14NAncestralNamespaceContextManager.cs index 5365bae76f58a..fbc2200bc229c 100644 --- a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/C14NAncestralNamespaceContextManager.cs +++ b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/C14NAncestralNamespaceContextManager.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Xml; using System.Collections; +using System.Xml; namespace System.Security.Cryptography.Xml { diff --git a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXml.cs b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXml.cs index 745ed8750555d..adc6af7f077e0 100644 --- a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXml.cs +++ b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXml.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Xml; using System.IO; using System.Text; +using System.Xml; namespace System.Security.Cryptography.Xml { diff --git a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXmlAttribute.cs b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXmlAttribute.cs index 7c5382122def7..c61624cd60f23 100644 --- a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXmlAttribute.cs +++ b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXmlAttribute.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Xml; using System.Text; +using System.Xml; namespace System.Security.Cryptography.Xml { diff --git a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXmlCDataSection.cs b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXmlCDataSection.cs index f01f25d0d239f..7860c52cf1b9f 100644 --- a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXmlCDataSection.cs +++ b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXmlCDataSection.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Xml; using System.Text; +using System.Xml; namespace System.Security.Cryptography.Xml { diff --git a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXmlComment.cs b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXmlComment.cs index bf95cfa54b7cd..fd0db9b7dbd8b 100644 --- a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXmlComment.cs +++ b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXmlComment.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Xml; using System.Text; +using System.Xml; namespace System.Security.Cryptography.Xml { diff --git a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXmlDocument.cs b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXmlDocument.cs index da8481cd7597c..0868213270c5f 100644 --- a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXmlDocument.cs +++ b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXmlDocument.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Xml; using System.Text; +using System.Xml; namespace System.Security.Cryptography.Xml { diff --git a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXmlElement.cs b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXmlElement.cs index ecd37b8f2404b..1a39fceb0169a 100644 --- a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXmlElement.cs +++ b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXmlElement.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Xml; -using System.Text; using System.Collections; +using System.Text; +using System.Xml; namespace System.Security.Cryptography.Xml { diff --git a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXmlEntityReference.cs b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXmlEntityReference.cs index f6ae518d57e74..82df9cf2e529f 100644 --- a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXmlEntityReference.cs +++ b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXmlEntityReference.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Xml; using System.Text; +using System.Xml; namespace System.Security.Cryptography.Xml { diff --git a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXmlNodeList.cs b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXmlNodeList.cs index 03db7132bf317..35dd40e3cfcd9 100644 --- a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXmlNodeList.cs +++ b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXmlNodeList.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Xml; using System.Collections; +using System.Xml; namespace System.Security.Cryptography.Xml { diff --git a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXmlProcessingInstruction.cs b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXmlProcessingInstruction.cs index 305787353d7f5..a132f29ac1551 100644 --- a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXmlProcessingInstruction.cs +++ b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXmlProcessingInstruction.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Xml; using System.Text; +using System.Xml; namespace System.Security.Cryptography.Xml { diff --git a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXmlSignificantWhitespace.cs b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXmlSignificantWhitespace.cs index 78d405c16aa43..befd421f3e9c6 100644 --- a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXmlSignificantWhitespace.cs +++ b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXmlSignificantWhitespace.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Xml; using System.Text; +using System.Xml; namespace System.Security.Cryptography.Xml { diff --git a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXmlText.cs b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXmlText.cs index 26d84eab6032a..642c3f576319e 100644 --- a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXmlText.cs +++ b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXmlText.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Xml; using System.Text; +using System.Xml; namespace System.Security.Cryptography.Xml { diff --git a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXmlWhitespace.cs b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXmlWhitespace.cs index fac3906bbe738..0afe87480127a 100644 --- a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXmlWhitespace.cs +++ b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalXmlWhitespace.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Xml; using System.Text; +using System.Xml; namespace System.Security.Cryptography.Xml { diff --git a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalizationDispatcher.cs b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalizationDispatcher.cs index ae5ff3e1c0c6f..a28a2517f55eb 100644 --- a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalizationDispatcher.cs +++ b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/CanonicalizationDispatcher.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Xml; using System.Text; +using System.Xml; namespace System.Security.Cryptography.Xml { diff --git a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/ExcAncestralNamespaceContextManager.cs b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/ExcAncestralNamespaceContextManager.cs index b393d5018dd0b..27c54d9d38fee 100644 --- a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/ExcAncestralNamespaceContextManager.cs +++ b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/ExcAncestralNamespaceContextManager.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Xml; using System.Collections; +using System.Xml; namespace System.Security.Cryptography.Xml { diff --git a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/ExcCanonicalXml.cs b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/ExcCanonicalXml.cs index e79feb3e17e99..7d2cddd53e6b0 100644 --- a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/ExcCanonicalXml.cs +++ b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/ExcCanonicalXml.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Xml; using System.IO; using System.Text; +using System.Xml; namespace System.Security.Cryptography.Xml { diff --git a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/NamespaceFrame.cs b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/NamespaceFrame.cs index 639f25e15796b..ff159b14b9ea4 100644 --- a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/NamespaceFrame.cs +++ b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/NamespaceFrame.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Xml; using System.Collections; +using System.Xml; namespace System.Security.Cryptography.Xml { diff --git a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/NamespaceSortOrder.cs b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/NamespaceSortOrder.cs index 7a0766dbdc3fd..8159d1ec457f9 100644 --- a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/NamespaceSortOrder.cs +++ b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/NamespaceSortOrder.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Xml; using System.Collections; +using System.Xml; namespace System.Security.Cryptography.Xml { diff --git a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/Reference.cs b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/Reference.cs index ba3a46bc7a7a4..001aaf26a21ae 100644 --- a/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/Reference.cs +++ b/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/Reference.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Diagnostics.CodeAnalysis; using System.IO; using System.Net; using System.Xml; -using System.Diagnostics.CodeAnalysis; namespace System.Security.Cryptography.Xml { diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/AeadCommon.Windows.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/AeadCommon.Windows.cs index ee93fcdeae263..f5b09b3ac1f45 100644 --- a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/AeadCommon.Windows.cs +++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/AeadCommon.Windows.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Diagnostics; using Internal.Cryptography; using Internal.NativeCrypto; using static Interop.BCrypt; -using System.Diagnostics; namespace System.Security.Cryptography { diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/AppleCCCryptorLite.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/AppleCCCryptorLite.cs index 21b181076bf76..638de792af421 100644 --- a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/AppleCCCryptorLite.cs +++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/AppleCCCryptorLite.cs @@ -7,9 +7,8 @@ using System.Runtime.InteropServices; using Internal.Cryptography; using Microsoft.Win32.SafeHandles; - -using PAL_SymmetricAlgorithm = Interop.AppleCrypto.PAL_SymmetricAlgorithm; using PAL_ChainingMode = Interop.AppleCrypto.PAL_ChainingMode; +using PAL_SymmetricAlgorithm = Interop.AppleCrypto.PAL_SymmetricAlgorithm; namespace System.Security.Cryptography { diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/AsymmetricAlgorithm.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/AsymmetricAlgorithm.cs index 04eed09e0f869..9ddc6c83bebff 100644 --- a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/AsymmetricAlgorithm.cs +++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/AsymmetricAlgorithm.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Internal.Cryptography; using System.Diagnostics.CodeAnalysis; +using Internal.Cryptography; namespace System.Security.Cryptography { diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/BasicSymmetricCipherLiteNCrypt.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/BasicSymmetricCipherLiteNCrypt.cs index 3eb41f0740095..269356cb3ab5d 100644 --- a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/BasicSymmetricCipherLiteNCrypt.cs +++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/BasicSymmetricCipherLiteNCrypt.cs @@ -8,9 +8,8 @@ using Internal.Cryptography; using Internal.NativeCrypto; using Microsoft.Win32.SafeHandles; - -using ErrorCode = Interop.NCrypt.ErrorCode; using AsymmetricPaddingMode = Interop.NCrypt.AsymmetricPaddingMode; +using ErrorCode = Interop.NCrypt.ErrorCode; namespace System.Security.Cryptography { diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/CapiHelper.Shared.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/CapiHelper.Shared.cs index f6f9648f35aba..5affe143e9b33 100644 --- a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/CapiHelper.Shared.cs +++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/CapiHelper.Shared.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Internal.Cryptography; using System.IO; +using Internal.Cryptography; namespace System.Security.Cryptography { diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/CngCommon.SignVerify.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/CngCommon.SignVerify.cs index ec6241baa7f1a..135f8b08a86da 100644 --- a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/CngCommon.SignVerify.cs +++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/CngCommon.SignVerify.cs @@ -5,8 +5,8 @@ using System.Diagnostics; using Internal.Cryptography; using Microsoft.Win32.SafeHandles; -using ErrorCode = Interop.NCrypt.ErrorCode; using AsymmetricPaddingMode = Interop.NCrypt.AsymmetricPaddingMode; +using ErrorCode = Interop.NCrypt.ErrorCode; namespace System.Security.Cryptography { diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/CngKey.Exists.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/CngKey.Exists.cs index c730c41372177..91e46158f3943 100644 --- a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/CngKey.Exists.cs +++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/CngKey.Exists.cs @@ -2,10 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Runtime.Versioning; -using Microsoft.Win32.SafeHandles; - using Internal.Cryptography; - +using Microsoft.Win32.SafeHandles; using ErrorCode = Interop.NCrypt.ErrorCode; namespace System.Security.Cryptography diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/CngKey.Import.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/CngKey.Import.cs index b7355f7b3c07d..614013ef1a6a7 100644 --- a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/CngKey.Import.cs +++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/CngKey.Import.cs @@ -3,10 +3,8 @@ using System.Runtime.InteropServices; using System.Runtime.Versioning; -using Microsoft.Win32.SafeHandles; - using Internal.Cryptography; - +using Microsoft.Win32.SafeHandles; using ErrorCode = Interop.NCrypt.ErrorCode; namespace System.Security.Cryptography diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/CngKey.Open.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/CngKey.Open.cs index aea118b3c862f..57d5e8a94d4e8 100644 --- a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/CngKey.Open.cs +++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/CngKey.Open.cs @@ -2,10 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Runtime.Versioning; -using Microsoft.Win32.SafeHandles; - using Internal.Cryptography; - +using Microsoft.Win32.SafeHandles; using ErrorCode = Interop.NCrypt.ErrorCode; namespace System.Security.Cryptography diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/CngKey.StandardProperties.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/CngKey.StandardProperties.cs index 67984d16d0a77..51584566f560a 100644 --- a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/CngKey.StandardProperties.cs +++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/CngKey.StandardProperties.cs @@ -1,11 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Runtime.InteropServices; using System.Diagnostics; -using Microsoft.Win32.SafeHandles; +using System.Runtime.InteropServices; using Internal.Cryptography; - +using Microsoft.Win32.SafeHandles; using ErrorCode = Interop.NCrypt.ErrorCode; using NCRYPT_UI_POLICY = Interop.NCrypt.NCRYPT_UI_POLICY; diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/CngPropertyCollection.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/CngPropertyCollection.cs index 24eeb67c9de21..73c5e978ab73d 100644 --- a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/CngPropertyCollection.cs +++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/CngPropertyCollection.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Diagnostics; using System.Collections.ObjectModel; +using System.Diagnostics; namespace System.Security.Cryptography { diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/DSACryptoServiceProvider.NotSupported.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/DSACryptoServiceProvider.NotSupported.cs index 6a6c3f910d8eb..5e1f1750131fe 100644 --- a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/DSACryptoServiceProvider.NotSupported.cs +++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/DSACryptoServiceProvider.NotSupported.cs @@ -1,11 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Internal.Cryptography; -using System.IO; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; +using System.IO; using System.Runtime.Versioning; +using Internal.Cryptography; namespace System.Security.Cryptography { diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/DSACryptoServiceProvider.Unix.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/DSACryptoServiceProvider.Unix.cs index 0ee4c7e3349db..0b6eed7667269 100644 --- a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/DSACryptoServiceProvider.Unix.cs +++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/DSACryptoServiceProvider.Unix.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Internal.Cryptography; -using System.IO; using System.Diagnostics; +using System.IO; using System.Runtime.Versioning; +using Internal.Cryptography; namespace System.Security.Cryptography { diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/ECAlgorithm.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/ECAlgorithm.cs index 5acdad43f82ea..5060b889ed12a 100644 --- a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/ECAlgorithm.cs +++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/ECAlgorithm.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Internal.Cryptography; using System.Formats.Asn1; using System.Security.Cryptography.Asn1; +using Internal.Cryptography; namespace System.Security.Cryptography { diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/ECDsa.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/ECDsa.cs index ed3032f325455..862d8f790c9a8 100644 --- a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/ECDsa.cs +++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/ECDsa.cs @@ -1,12 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Internal.Cryptography; using System.Buffers; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.IO; using System.Runtime.Versioning; +using Internal.Cryptography; namespace System.Security.Cryptography { diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/HMACSHA1.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/HMACSHA1.cs index d7570e7adac88..95340b5d4d112 100644 --- a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/HMACSHA1.cs +++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/HMACSHA1.cs @@ -1,13 +1,13 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Internal.Cryptography; using System.ComponentModel; using System.Diagnostics; using System.IO; using System.Runtime.Versioning; using System.Threading; using System.Threading.Tasks; +using Internal.Cryptography; namespace System.Security.Cryptography { diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/HMACSHA256.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/HMACSHA256.cs index 70f9e0f447fec..a158ca30fb645 100644 --- a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/HMACSHA256.cs +++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/HMACSHA256.cs @@ -1,12 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Internal.Cryptography; using System.Diagnostics; using System.IO; using System.Runtime.Versioning; using System.Threading; using System.Threading.Tasks; +using Internal.Cryptography; namespace System.Security.Cryptography { diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/HMACSHA3_256.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/HMACSHA3_256.cs index d71c41bdf9854..82ada4881596f 100644 --- a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/HMACSHA3_256.cs +++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/HMACSHA3_256.cs @@ -1,11 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Internal.Cryptography; using System.Diagnostics; using System.IO; using System.Threading; using System.Threading.Tasks; +using Internal.Cryptography; namespace System.Security.Cryptography { diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/HMACSHA3_384.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/HMACSHA3_384.cs index 3e7497443098d..9e903f97e632d 100644 --- a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/HMACSHA3_384.cs +++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/HMACSHA3_384.cs @@ -1,11 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Internal.Cryptography; using System.Diagnostics; using System.IO; using System.Threading; using System.Threading.Tasks; +using Internal.Cryptography; namespace System.Security.Cryptography { diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/HMACSHA3_512.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/HMACSHA3_512.cs index 62a6bb4f17407..a50034ebecb59 100644 --- a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/HMACSHA3_512.cs +++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/HMACSHA3_512.cs @@ -1,11 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Internal.Cryptography; using System.Diagnostics; using System.IO; using System.Threading; using System.Threading.Tasks; +using Internal.Cryptography; namespace System.Security.Cryptography { diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/HashProviderCng.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/HashProviderCng.cs index 6e43501192766..831b846a74447 100644 --- a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/HashProviderCng.cs +++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/HashProviderCng.cs @@ -4,9 +4,9 @@ using System; using System.Diagnostics; using Microsoft.Win32.SafeHandles; -using NTSTATUS = Interop.BCrypt.NTSTATUS; -using BCryptOpenAlgorithmProviderFlags = Interop.BCrypt.BCryptOpenAlgorithmProviderFlags; using BCryptCreateHashFlags = Interop.BCrypt.BCryptCreateHashFlags; +using BCryptOpenAlgorithmProviderFlags = Interop.BCrypt.BCryptOpenAlgorithmProviderFlags; +using NTSTATUS = Interop.BCrypt.NTSTATUS; namespace System.Security.Cryptography { diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/HashProviderDispenser.OpenSsl.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/HashProviderDispenser.OpenSsl.cs index a048496fc3f78..e3dad7f44355a 100644 --- a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/HashProviderDispenser.OpenSsl.cs +++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/HashProviderDispenser.OpenSsl.cs @@ -5,8 +5,8 @@ using System.Diagnostics; using System.Runtime.InteropServices; using System.Security.Cryptography; -using Microsoft.Win32.SafeHandles; using Internal.Cryptography; +using Microsoft.Win32.SafeHandles; namespace System.Security.Cryptography { diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/HashProviderDispenser.Windows.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/HashProviderDispenser.Windows.cs index a9595c46fdf4a..9f7f79836e6b2 100644 --- a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/HashProviderDispenser.Windows.cs +++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/HashProviderDispenser.Windows.cs @@ -5,10 +5,10 @@ using System.Runtime.InteropServices; using Internal.Cryptography; using Microsoft.Win32.SafeHandles; -using NTSTATUS = Interop.BCrypt.NTSTATUS; -using BCryptOpenAlgorithmProviderFlags = Interop.BCrypt.BCryptOpenAlgorithmProviderFlags; -using BCryptCreateHashFlags = Interop.BCrypt.BCryptCreateHashFlags; using BCryptAlgorithmCache = Interop.BCrypt.BCryptAlgorithmCache; +using BCryptCreateHashFlags = Interop.BCrypt.BCryptCreateHashFlags; +using BCryptOpenAlgorithmProviderFlags = Interop.BCrypt.BCryptOpenAlgorithmProviderFlags; +using NTSTATUS = Interop.BCrypt.NTSTATUS; namespace System.Security.Cryptography { diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/IncrementalHash.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/IncrementalHash.cs index 022476b0bd3cc..9e709a5a4e760 100644 --- a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/IncrementalHash.cs +++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/IncrementalHash.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Internal.Cryptography; using System.Diagnostics; using System.Runtime.Versioning; +using Internal.Cryptography; namespace System.Security.Cryptography { diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/LiteHash.Unix.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/LiteHash.Unix.cs index 6e10e389b8fd6..ab09b7217f89a 100644 --- a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/LiteHash.Unix.cs +++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/LiteHash.Unix.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Diagnostics; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; namespace System.Security.Cryptography { diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/LiteHash.Windows.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/LiteHash.Windows.cs index f3ec1d6e404dd..654ab665d1591 100644 --- a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/LiteHash.Windows.cs +++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/LiteHash.Windows.cs @@ -1,11 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using Internal.Cryptography; - +using Microsoft.Win32.SafeHandles; using BCryptCreateHashFlags = Interop.BCrypt.BCryptCreateHashFlags; using BCryptOpenAlgorithmProviderFlags = Interop.BCrypt.BCryptOpenAlgorithmProviderFlags; using NTSTATUS = Interop.BCrypt.NTSTATUS; diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/LiteHashProvider.Xof.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/LiteHashProvider.Xof.cs index b79f06def8f75..72e7f4f361f67 100644 --- a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/LiteHashProvider.Xof.cs +++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/LiteHashProvider.Xof.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.IO; using System.Diagnostics; +using System.IO; using System.Threading; using System.Threading.Tasks; diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/LiteHashProvider.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/LiteHashProvider.cs index e8c79ac67b9c4..b3b33988b1abb 100644 --- a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/LiteHashProvider.cs +++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/LiteHashProvider.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.IO; using System.Diagnostics; +using System.IO; using System.Threading; using System.Threading.Tasks; diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/RC2CryptoServiceProvider.Windows.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/RC2CryptoServiceProvider.Windows.cs index c80b8ba31bb3b..85639709e1164 100644 --- a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/RC2CryptoServiceProvider.Windows.cs +++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/RC2CryptoServiceProvider.Windows.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Internal.Cryptography; using System.ComponentModel; using System.Diagnostics; using System.Runtime.Versioning; +using Internal.Cryptography; namespace System.Security.Cryptography { diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/RSA.Create.Android.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/RSA.Create.Android.cs index 0d391d3fef580..9579d88d1f15c 100644 --- a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/RSA.Create.Android.cs +++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/RSA.Create.Android.cs @@ -5,8 +5,8 @@ using System.Diagnostics; using System.Formats.Asn1; using System.IO; -using Microsoft.Win32.SafeHandles; using Internal.Cryptography; +using Microsoft.Win32.SafeHandles; namespace System.Security.Cryptography { diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/RSACryptoServiceProvider.Unix.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/RSACryptoServiceProvider.Unix.cs index 7789143feb5b8..a31f9c97794dc 100644 --- a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/RSACryptoServiceProvider.Unix.cs +++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/RSACryptoServiceProvider.Unix.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Internal.Cryptography; using System.IO; using System.Runtime.Versioning; +using Internal.Cryptography; namespace System.Security.Cryptography { diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/SHA1.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/SHA1.cs index c5c8610626490..cb0f4058107a9 100644 --- a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/SHA1.cs +++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/SHA1.cs @@ -1,12 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Internal.Cryptography; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.IO; using System.Threading; using System.Threading.Tasks; +using Internal.Cryptography; namespace System.Security.Cryptography { diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/SHA1Managed.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/SHA1Managed.cs index 5f523f6de4d30..45a9d62275f0a 100644 --- a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/SHA1Managed.cs +++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/SHA1Managed.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Internal.Cryptography; using System.ComponentModel; +using Internal.Cryptography; namespace System.Security.Cryptography { diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/SHA256.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/SHA256.cs index 578ddfec8377f..bd1070f22383c 100644 --- a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/SHA256.cs +++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/SHA256.cs @@ -1,12 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Internal.Cryptography; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.IO; using System.Threading; using System.Threading.Tasks; +using Internal.Cryptography; namespace System.Security.Cryptography { diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/SHA256Managed.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/SHA256Managed.cs index f17d34b07023f..eba61cf5043b6 100644 --- a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/SHA256Managed.cs +++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/SHA256Managed.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Internal.Cryptography; using System.ComponentModel; +using Internal.Cryptography; namespace System.Security.Cryptography { diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/SHA384.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/SHA384.cs index 6abc391dcdccb..a415cf1293e1b 100644 --- a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/SHA384.cs +++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/SHA384.cs @@ -1,12 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Internal.Cryptography; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.IO; using System.Threading; using System.Threading.Tasks; +using Internal.Cryptography; namespace System.Security.Cryptography { diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/SHA384Managed.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/SHA384Managed.cs index eab4cad1705eb..fd956d7e891aa 100644 --- a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/SHA384Managed.cs +++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/SHA384Managed.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Internal.Cryptography; using System.ComponentModel; +using Internal.Cryptography; namespace System.Security.Cryptography { diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/SHA3_256.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/SHA3_256.cs index 659fa2d292655..d1d0f23f7c783 100644 --- a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/SHA3_256.cs +++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/SHA3_256.cs @@ -1,12 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Internal.Cryptography; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.IO; using System.Threading; using System.Threading.Tasks; +using Internal.Cryptography; namespace System.Security.Cryptography { diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/SHA3_384.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/SHA3_384.cs index d74787d4698e9..3540586c49989 100644 --- a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/SHA3_384.cs +++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/SHA3_384.cs @@ -1,12 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Internal.Cryptography; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.IO; using System.Threading; using System.Threading.Tasks; +using Internal.Cryptography; namespace System.Security.Cryptography { diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/SHA3_512.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/SHA3_512.cs index 2c716453827a3..1e6cd209d76e6 100644 --- a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/SHA3_512.cs +++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/SHA3_512.cs @@ -1,12 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Internal.Cryptography; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.IO; using System.Threading; using System.Threading.Tasks; +using Internal.Cryptography; namespace System.Security.Cryptography { diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/SHA512.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/SHA512.cs index ad9dbf3dfef5b..bfc1eeb462d39 100644 --- a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/SHA512.cs +++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/SHA512.cs @@ -1,12 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Internal.Cryptography; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.IO; using System.Threading; using System.Threading.Tasks; +using Internal.Cryptography; namespace System.Security.Cryptography { diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/SHA512Managed.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/SHA512Managed.cs index 77536a2b54566..e458a87d06555 100644 --- a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/SHA512Managed.cs +++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/SHA512Managed.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Internal.Cryptography; using System.ComponentModel; +using Internal.Cryptography; namespace System.Security.Cryptography { diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/SHAHashProvider.Browser.Managed.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/SHAHashProvider.Browser.Managed.cs index 27c1b8282e72c..c9ee9cf259666 100644 --- a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/SHAHashProvider.Browser.Managed.cs +++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/SHAHashProvider.Browser.Managed.cs @@ -1,10 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.IO; using System.Diagnostics; +using System.IO; using Internal.Cryptography; - using static System.Numerics.BitOperations; namespace System.Security.Cryptography diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/AppleCertificatePal.ImportExport.iOS.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/AppleCertificatePal.ImportExport.iOS.cs index ca61622b3fadd..dbbdf1d5c2eaa 100644 --- a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/AppleCertificatePal.ImportExport.iOS.cs +++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/AppleCertificatePal.ImportExport.iOS.cs @@ -4,8 +4,8 @@ using System.Buffers; using System.Diagnostics; using System.Formats.Asn1; -using System.Security.Cryptography.Asn1.Pkcs7; using System.Security.Cryptography.Asn1.Pkcs12; +using System.Security.Cryptography.Asn1.Pkcs7; using Microsoft.Win32.SafeHandles; namespace System.Security.Cryptography.X509Certificates diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/CertificatePal.Windows.Import.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/CertificatePal.Windows.Import.cs index bc47a70e465ea..2b5feeee7fe79 100644 --- a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/CertificatePal.Windows.Import.cs +++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/CertificatePal.Windows.Import.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.IO; using System.Diagnostics; +using System.IO; using System.Runtime.InteropServices; using Internal.Cryptography; using Microsoft.Win32.SafeHandles; diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/CertificatePal.Windows.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/CertificatePal.Windows.cs index 13354c3709ee9..9b15a429e7c22 100644 --- a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/CertificatePal.Windows.cs +++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/CertificatePal.Windows.cs @@ -1,15 +1,14 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Text; -using System.Diagnostics; using System.Collections.Generic; +using System.Diagnostics; using System.Runtime.InteropServices; +using System.Text; using Internal.Cryptography; using Microsoft.Win32.SafeHandles; - -using SafeX509ChainHandle = Microsoft.Win32.SafeHandles.SafeX509ChainHandle; using SafePasswordHandle = Microsoft.Win32.SafeHandles.SafePasswordHandle; +using SafeX509ChainHandle = Microsoft.Win32.SafeHandles.SafeX509ChainHandle; namespace System.Security.Cryptography.X509Certificates { diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/ChainPal.Windows.GetChainStatusInformation.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/ChainPal.Windows.GetChainStatusInformation.cs index 348461d145229..16aaa9d5b04f4 100644 --- a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/ChainPal.Windows.GetChainStatusInformation.cs +++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/ChainPal.Windows.GetChainStatusInformation.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Numerics; using System.Diagnostics; +using System.Numerics; namespace System.Security.Cryptography.X509Certificates { diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/DSACertificateExtensions.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/DSACertificateExtensions.cs index b19422ecd9f77..f6e9fe2b4727b 100644 --- a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/DSACertificateExtensions.cs +++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/DSACertificateExtensions.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Internal.Cryptography; using System.Runtime.Versioning; +using Internal.Cryptography; namespace System.Security.Cryptography.X509Certificates { diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/OpenSslX509ChainProcessor.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/OpenSslX509ChainProcessor.cs index 07eb003711807..ceb2d401ec603 100644 --- a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/OpenSslX509ChainProcessor.cs +++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/OpenSslX509ChainProcessor.cs @@ -11,9 +11,8 @@ using System.Security.Cryptography.Asn1; using System.Security.Cryptography.X509Certificates.Asn1; using System.Text; -using Microsoft.Win32.SafeHandles; using Internal.Cryptography; - +using Microsoft.Win32.SafeHandles; using X509VerifyStatusCodeUniversal = Interop.Crypto.X509VerifyStatusCodeUniversal; #pragma warning disable 8500 // taking address of managed type diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/SafeLocalAllocHandle.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/SafeLocalAllocHandle.cs index 50a6d9f5ec33f..995f932ab1e6b 100644 --- a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/SafeLocalAllocHandle.cs +++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/SafeLocalAllocHandle.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; namespace System.Security.Cryptography.X509Certificates { diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/WindowsInterop.crypt32.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/WindowsInterop.crypt32.cs index 873a8d292bac1..df7bd6dcbc58e 100644 --- a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/WindowsInterop.crypt32.cs +++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/WindowsInterop.crypt32.cs @@ -3,17 +3,15 @@ using System; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Runtime.InteropServices; - +using System.Security.Cryptography.X509Certificates; +using Internal.Cryptography; +using Microsoft.Win32.SafeHandles; using SafeBCryptKeyHandle = Microsoft.Win32.SafeHandles.SafeBCryptKeyHandle; +using SafeNCryptKeyHandle = Microsoft.Win32.SafeHandles.SafeNCryptKeyHandle; using SafeX509ChainHandle = Microsoft.Win32.SafeHandles.SafeX509ChainHandle; using X509KeyUsageFlags = System.Security.Cryptography.X509Certificates.X509KeyUsageFlags; -using SafeNCryptKeyHandle = Microsoft.Win32.SafeHandles.SafeNCryptKeyHandle; - -using Internal.Cryptography; -using Microsoft.Win32.SafeHandles; -using System.Diagnostics.CodeAnalysis; -using System.Security.Cryptography.X509Certificates; internal static partial class Interop { diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/X509Certificate.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/X509Certificate.cs index 5a51e4394e976..e186cdd15823f 100644 --- a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/X509Certificate.cs +++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/X509Certificate.cs @@ -1,8 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Internal.Cryptography; -using Microsoft.Win32.SafeHandles; using System.Buffers; using System.ComponentModel; using System.Diagnostics; @@ -13,6 +11,8 @@ using System.Runtime.Versioning; using System.Security.Cryptography.Asn1.Pkcs12; using System.Text; +using Internal.Cryptography; +using Microsoft.Win32.SafeHandles; namespace System.Security.Cryptography.X509Certificates { diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/X509Certificate2Collection.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/X509Certificate2Collection.cs index e558c024a2d8f..b51c24698bcbd 100644 --- a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/X509Certificate2Collection.cs +++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/X509Certificate2Collection.cs @@ -1,11 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Collections.Generic; using System.Diagnostics; using System.Formats.Asn1; using System.Runtime.Versioning; using System.Security.Cryptography.X509Certificates.Asn1; -using System.Collections.Generic; using Internal.Cryptography; using Microsoft.Win32.SafeHandles; diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/X509ChainElement.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/X509ChainElement.cs index 1c93693651509..ec247c9d98c5c 100644 --- a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/X509ChainElement.cs +++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/X509ChainElement.cs @@ -2,12 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.IO; -using System.Text; using System.Diagnostics; using System.Globalization; +using System.IO; using System.Runtime.InteropServices; - +using System.Text; using Internal.Cryptography; namespace System.Security.Cryptography.X509Certificates diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/X509ExtensionCollection.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/X509ExtensionCollection.cs index 6d3b23d67e7f3..22f4bac5cb38b 100644 --- a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/X509ExtensionCollection.cs +++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/X509ExtensionCollection.cs @@ -2,14 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.IO; -using System.Text; using System.Collections; +using System.Collections.Generic; using System.Diagnostics; using System.Globalization; -using System.Collections.Generic; +using System.IO; using System.Runtime.InteropServices; - +using System.Text; using Internal.Cryptography; namespace System.Security.Cryptography.X509Certificates diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/X509Pal.Windows.PublicKey.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/X509Pal.Windows.PublicKey.cs index 71e6ef1db71b1..397aab8bca82c 100644 --- a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/X509Pal.Windows.PublicKey.cs +++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/X509Pal.Windows.PublicKey.cs @@ -6,12 +6,10 @@ using System.Runtime.InteropServices; using Internal.Cryptography; using Microsoft.Win32.SafeHandles; - +using static Interop.Crypt32; using NTSTATUS = Interop.BCrypt.NTSTATUS; using SafeBCryptKeyHandle = Microsoft.Win32.SafeHandles.SafeBCryptKeyHandle; -using static Interop.Crypt32; - namespace System.Security.Cryptography.X509Certificates { /// diff --git a/src/libraries/System.Security.Permissions/src/System/Security/Policy/Hash.cs b/src/libraries/System.Security.Permissions/src/System/Security/Policy/Hash.cs index 2db87c89e08db..85c7aa64d90dd 100644 --- a/src/libraries/System.Security.Permissions/src/System/Security/Policy/Hash.cs +++ b/src/libraries/System.Security.Permissions/src/System/Security/Policy/Hash.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.ComponentModel; -using System.Security.Cryptography; using System.Runtime.Serialization; +using System.Security.Cryptography; namespace System.Security.Policy { diff --git a/src/libraries/System.Security.Permissions/src/System/Security/SecurityManager.cs b/src/libraries/System.Security.Permissions/src/System/Security/SecurityManager.cs index 039bcc49a05f3..0ff033c383beb 100644 --- a/src/libraries/System.Security.Permissions/src/System/Security/SecurityManager.cs +++ b/src/libraries/System.Security.Permissions/src/System/Security/SecurityManager.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Security.Policy; using System.Collections; +using System.Security.Policy; namespace System.Security { diff --git a/src/libraries/System.Security.Principal.Windows/src/System/Security/Principal/NTAccount.cs b/src/libraries/System.Security.Principal.Windows/src/System/Security/Principal/NTAccount.cs index 539a2bf4924fa..cdc63c1f100fe 100644 --- a/src/libraries/System.Security.Principal.Windows/src/System/Security/Principal/NTAccount.cs +++ b/src/libraries/System.Security.Principal.Windows/src/System/Security/Principal/NTAccount.cs @@ -1,13 +1,13 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32; -using Microsoft.Win32.SafeHandles; using System.ComponentModel; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Runtime.InteropServices; +using Microsoft.Win32; +using Microsoft.Win32.SafeHandles; namespace System.Security.Principal { diff --git a/src/libraries/System.Security.Principal.Windows/src/System/Security/Principal/SID.cs b/src/libraries/System.Security.Principal.Windows/src/System/Security/Principal/SID.cs index 99e25d4b09fa0..8cfdb97aa0777 100644 --- a/src/libraries/System.Security.Principal.Windows/src/System/Security/Principal/SID.cs +++ b/src/libraries/System.Security.Principal.Windows/src/System/Security/Principal/SID.cs @@ -1,7 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System; using System.ComponentModel; using System.Diagnostics; @@ -9,6 +8,7 @@ using System.Globalization; using System.Runtime.InteropServices; using System.Text; +using Microsoft.Win32.SafeHandles; namespace System.Security.Principal { diff --git a/src/libraries/System.Security.Principal.Windows/src/System/Security/Principal/Win32.cs b/src/libraries/System.Security.Principal.Windows/src/System/Security/Principal/Win32.cs index 9ba2095d20871..1a972c664d8b5 100644 --- a/src/libraries/System.Security.Principal.Windows/src/System/Security/Principal/Win32.cs +++ b/src/libraries/System.Security.Principal.Windows/src/System/Security/Principal/Win32.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.ComponentModel; using System.Diagnostics; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; namespace System.Security.Principal { diff --git a/src/libraries/System.Security.Principal.Windows/src/System/Security/Principal/WindowsIdentity.cs b/src/libraries/System.Security.Principal.Windows/src/System/Security/Principal/WindowsIdentity.cs index aed268b36067a..11243681f4d97 100644 --- a/src/libraries/System.Security.Principal.Windows/src/System/Security/Principal/WindowsIdentity.cs +++ b/src/libraries/System.Security.Principal.Windows/src/System/Security/Principal/WindowsIdentity.cs @@ -1,27 +1,26 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Collections.Generic; using System.ComponentModel; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Runtime.InteropServices; +using System.Runtime.Serialization; using System.Security.Claims; using System.Text; using System.Threading; - +using System.Threading.Tasks; +using Microsoft.Win32.SafeHandles; using KERB_LOGON_SUBMIT_TYPE = Interop.SspiCli.KERB_LOGON_SUBMIT_TYPE; using KERB_S4U_LOGON = Interop.SspiCli.KERB_S4U_LOGON; using KerbS4uLogonFlags = Interop.SspiCli.KerbS4uLogonFlags; -using LUID = Interop.LUID; using LSA_STRING = Interop.Advapi32.LSA_STRING; +using LUID = Interop.LUID; using QUOTA_LIMITS = Interop.SspiCli.QUOTA_LIMITS; using SECURITY_LOGON_TYPE = Interop.SspiCli.SECURITY_LOGON_TYPE; using TOKEN_SOURCE = Interop.SspiCli.TOKEN_SOURCE; -using System.Runtime.Serialization; -using System.Threading.Tasks; namespace System.Security.Principal { diff --git a/src/libraries/System.Security.Principal.Windows/src/System/Security/Principal/WindowsPrincipal.cs b/src/libraries/System.Security.Principal.Windows/src/System/Security/Principal/WindowsPrincipal.cs index f875934f24e75..7d3ae2145c971 100644 --- a/src/libraries/System.Security.Principal.Windows/src/System/Security/Principal/WindowsPrincipal.cs +++ b/src/libraries/System.Security.Principal.Windows/src/System/Security/Principal/WindowsPrincipal.cs @@ -1,11 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Collections.Generic; using System.ComponentModel; using System.Runtime.InteropServices; using System.Security.Claims; +using Microsoft.Win32.SafeHandles; namespace System.Security.Principal { diff --git a/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Channels/UriGenerator.cs b/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Channels/UriGenerator.cs index f0e5fb91b2607..28a94e5a1b22c 100644 --- a/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Channels/UriGenerator.cs +++ b/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Channels/UriGenerator.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Threading; using System.Globalization; +using System.Threading; namespace System.ServiceModel.Channels { diff --git a/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/Atom10FeedFormatter.cs b/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/Atom10FeedFormatter.cs index 8f458917c9ee1..3953b79f907f9 100644 --- a/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/Atom10FeedFormatter.cs +++ b/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/Atom10FeedFormatter.cs @@ -3,13 +3,13 @@ using System.Collections.Generic; using System.Collections.ObjectModel; +using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Globalization; +using System.ServiceModel.Channels; using System.Xml; -using System.Xml.Serialization; -using System.Diagnostics.CodeAnalysis; using System.Xml.Schema; -using System.ServiceModel.Channels; -using System.Diagnostics; +using System.Xml.Serialization; namespace System.ServiceModel.Syndication { diff --git a/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/Atom10ItemFormatter.cs b/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/Atom10ItemFormatter.cs index a3d2733882baf..04014f9dad07d 100644 --- a/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/Atom10ItemFormatter.cs +++ b/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/Atom10ItemFormatter.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Xml; -using System.Xml.Serialization; using System.Diagnostics.CodeAnalysis; +using System.Xml; using System.Xml.Schema; +using System.Xml.Serialization; namespace System.ServiceModel.Syndication { diff --git a/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/AtomPub10CategoriesDocumentFormatter.cs b/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/AtomPub10CategoriesDocumentFormatter.cs index 2a03f55f31706..88d45208da4dd 100644 --- a/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/AtomPub10CategoriesDocumentFormatter.cs +++ b/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/AtomPub10CategoriesDocumentFormatter.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Xml.Serialization; +using System.Diagnostics.CodeAnalysis; using System.Xml; using System.Xml.Schema; -using System.Diagnostics.CodeAnalysis; +using System.Xml.Serialization; namespace System.ServiceModel.Syndication { diff --git a/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/AtomPub10ServiceDocumentFormatter.cs b/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/AtomPub10ServiceDocumentFormatter.cs index 4056f67ce36e7..752fa84d51caf 100644 --- a/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/AtomPub10ServiceDocumentFormatter.cs +++ b/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/AtomPub10ServiceDocumentFormatter.cs @@ -1,11 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Xml.Serialization; +using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Xml; using System.Xml.Schema; -using System.Diagnostics.CodeAnalysis; -using System.Diagnostics; +using System.Xml.Serialization; namespace System.ServiceModel.Syndication { diff --git a/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/CategoriesDocument.cs b/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/CategoriesDocument.cs index ea3e5002bd0c6..bb4e319b09be7 100644 --- a/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/CategoriesDocument.cs +++ b/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/CategoriesDocument.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Xml; -using System.Collections.ObjectModel; using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Xml; namespace System.ServiceModel.Syndication { diff --git a/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/FeedUtils.cs b/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/FeedUtils.cs index eacc8ca6861f8..7139ac483ca1f 100644 --- a/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/FeedUtils.cs +++ b/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/FeedUtils.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Collections.ObjectModel; -using System.Xml; using System.Globalization; +using System.Xml; namespace System.ServiceModel.Syndication { diff --git a/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/InlineCategoriesDocument.cs b/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/InlineCategoriesDocument.cs index f132292f5a7cd..ed65dcf6cf7a8 100644 --- a/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/InlineCategoriesDocument.cs +++ b/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/InlineCategoriesDocument.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Collections.ObjectModel; using System.Collections.Generic; +using System.Collections.ObjectModel; namespace System.ServiceModel.Syndication { diff --git a/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/ResourceCollectionInfo.cs b/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/ResourceCollectionInfo.cs index 31e669a60bbc4..ed4d91c57b1db 100644 --- a/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/ResourceCollectionInfo.cs +++ b/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/ResourceCollectionInfo.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Collections.ObjectModel; using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Xml; namespace System.ServiceModel.Syndication diff --git a/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/Rss20ItemFormatter.cs b/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/Rss20ItemFormatter.cs index 672e30f3a08df..7f9b1c5f01b47 100644 --- a/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/Rss20ItemFormatter.cs +++ b/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/Rss20ItemFormatter.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Xml; -using System.Xml.Serialization; using System.Diagnostics.CodeAnalysis; +using System.Xml; using System.Xml.Schema; +using System.Xml.Serialization; namespace System.ServiceModel.Syndication { diff --git a/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/ServiceDocument.cs b/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/ServiceDocument.cs index 41c33186cd35d..7533214a33111 100644 --- a/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/ServiceDocument.cs +++ b/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/ServiceDocument.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Collections.ObjectModel; using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Xml; namespace System.ServiceModel.Syndication diff --git a/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/SyndicationCategory.cs b/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/SyndicationCategory.cs index c34a502b75fb2..7e8cf5657e834 100644 --- a/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/SyndicationCategory.cs +++ b/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/SyndicationCategory.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Xml; using System.Collections.Generic; +using System.Xml; namespace System.ServiceModel.Syndication { diff --git a/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/SyndicationContent.cs b/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/SyndicationContent.cs index 507cc177a5e13..cf689db187478 100644 --- a/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/SyndicationContent.cs +++ b/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/SyndicationContent.cs @@ -2,9 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Collections.Generic; +using System.Runtime.Serialization; using System.Xml; using System.Xml.Serialization; -using System.Runtime.Serialization; namespace System.ServiceModel.Syndication { diff --git a/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/SyndicationElementExtension.cs b/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/SyndicationElementExtension.cs index bf5e6b612db3e..9c7f0c170d08a 100644 --- a/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/SyndicationElementExtension.cs +++ b/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/SyndicationElementExtension.cs @@ -1,11 +1,11 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Diagnostics; using System.IO; using System.Runtime.Serialization; using System.Xml; using System.Xml.Serialization; -using System.Diagnostics; namespace System.ServiceModel.Syndication { diff --git a/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/SyndicationElementExtensionCollection.cs b/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/SyndicationElementExtensionCollection.cs index fc91489b01342..f6530db583de5 100644 --- a/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/SyndicationElementExtensionCollection.cs +++ b/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/SyndicationElementExtensionCollection.cs @@ -2,10 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Collections.ObjectModel; +using System.Diagnostics; using System.Runtime.Serialization; using System.Xml; using System.Xml.Serialization; -using System.Diagnostics; namespace System.ServiceModel.Syndication { diff --git a/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/SyndicationItem.cs b/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/SyndicationItem.cs index 233248341dfdb..625da27aaff4e 100644 --- a/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/SyndicationItem.cs +++ b/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/SyndicationItem.cs @@ -3,8 +3,8 @@ using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Xml; using System.Diagnostics.CodeAnalysis; +using System.Xml; namespace System.ServiceModel.Syndication { diff --git a/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/SyndicationItemFormatter.cs b/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/SyndicationItemFormatter.cs index 6cd3b8c9886fe..c1f5dd064bcd3 100644 --- a/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/SyndicationItemFormatter.cs +++ b/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/SyndicationItemFormatter.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Xml; using System.Runtime.Serialization; +using System.Xml; namespace System.ServiceModel.Syndication { diff --git a/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/SyndicationPerson.cs b/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/SyndicationPerson.cs index cc76fb2bb6d95..ce9897c4eaeb3 100644 --- a/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/SyndicationPerson.cs +++ b/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/SyndicationPerson.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Collections.Generic; -using System.Xml; using System.Diagnostics.CodeAnalysis; +using System.Xml; namespace System.ServiceModel.Syndication { diff --git a/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/Workspace.cs b/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/Workspace.cs index d53eb41820885..14c3c12268d81 100644 --- a/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/Workspace.cs +++ b/src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/Workspace.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Collections.ObjectModel; using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Xml; namespace System.ServiceModel.Syndication diff --git a/src/libraries/System.ServiceProcess.ServiceController/src/System/ServiceProcess/ServiceController.cs b/src/libraries/System.ServiceProcess.ServiceController/src/System/ServiceProcess/ServiceController.cs index 0c1a487b26f73..2892e1abebe46 100644 --- a/src/libraries/System.ServiceProcess.ServiceController/src/System/ServiceProcess/ServiceController.cs +++ b/src/libraries/System.ServiceProcess.ServiceController/src/System/ServiceProcess/ServiceController.cs @@ -1,13 +1,13 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Collections.Generic; using System.ComponentModel; using System.Diagnostics.CodeAnalysis; using System.Runtime.InteropServices; using System.Text; using System.Threading; +using Microsoft.Win32.SafeHandles; namespace System.ServiceProcess { diff --git a/src/libraries/System.Text.Encoding.CodePages/src/System/Text/BaseCodePageEncoding.cs b/src/libraries/System.Text.Encoding.CodePages/src/System/Text/BaseCodePageEncoding.cs index d2fc6b94b2161..7453ecb108638 100644 --- a/src/libraries/System.Text.Encoding.CodePages/src/System/Text/BaseCodePageEncoding.cs +++ b/src/libraries/System.Text.Encoding.CodePages/src/System/Text/BaseCodePageEncoding.cs @@ -2,12 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Buffers.Binary; -using System.Reflection; -using System.IO; using System.Diagnostics; +using System.IO; +using System.Reflection; using System.Runtime.InteropServices; -using Microsoft.Win32.SafeHandles; using System.Runtime.Serialization; +using Microsoft.Win32.SafeHandles; namespace System.Text { diff --git a/src/libraries/System.Text.Encoding.CodePages/src/System/Text/DBCSCodePageEncoding.cs b/src/libraries/System.Text.Encoding.CodePages/src/System/Text/DBCSCodePageEncoding.cs index 17a20883ae014..8bd9670e356bf 100644 --- a/src/libraries/System.Text.Encoding.CodePages/src/System/Text/DBCSCodePageEncoding.cs +++ b/src/libraries/System.Text.Encoding.CodePages/src/System/Text/DBCSCodePageEncoding.cs @@ -3,12 +3,12 @@ using System; using System.Buffers.Binary; -using System.IO; using System.Diagnostics; +using System.IO; +using System.Runtime.CompilerServices; +using System.Security; using System.Text; using System.Threading; -using System.Security; -using System.Runtime.CompilerServices; namespace System.Text { diff --git a/src/libraries/System.Text.Encoding.CodePages/src/System/Text/EUCJPEncoding.cs b/src/libraries/System.Text.Encoding.CodePages/src/System/Text/EUCJPEncoding.cs index 0135bfdb6d7da..e7369baae503d 100644 --- a/src/libraries/System.Text.Encoding.CodePages/src/System/Text/EUCJPEncoding.cs +++ b/src/libraries/System.Text.Encoding.CodePages/src/System/Text/EUCJPEncoding.cs @@ -1,9 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Text; -using System.Globalization; - // EUCJPEncoding // // EUC-JP Encoding (51932) @@ -41,6 +38,8 @@ // using System; +using System.Globalization; +using System.Text; namespace System.Text { diff --git a/src/libraries/System.Text.Encoding.CodePages/src/System/Text/GB18030Encoding.cs b/src/libraries/System.Text.Encoding.CodePages/src/System/Text/GB18030Encoding.cs index 9ba6211d80b53..7e73e017ff7c2 100644 --- a/src/libraries/System.Text.Encoding.CodePages/src/System/Text/GB18030Encoding.cs +++ b/src/libraries/System.Text.Encoding.CodePages/src/System/Text/GB18030Encoding.cs @@ -84,12 +84,12 @@ using System; using System.Diagnostics; -using System.Text; -using System.Runtime.InteropServices; -using System.Security; +using System.Globalization; using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; using System.Runtime.Versioning; -using System.Globalization; +using System.Security; +using System.Text; namespace System.Text { diff --git a/src/libraries/System.Text.Encoding.CodePages/src/System/Text/ISO2022Encoding.cs b/src/libraries/System.Text.Encoding.CodePages/src/System/Text/ISO2022Encoding.cs index e7b936be22953..6739616d38b49 100644 --- a/src/libraries/System.Text.Encoding.CodePages/src/System/Text/ISO2022Encoding.cs +++ b/src/libraries/System.Text.Encoding.CodePages/src/System/Text/ISO2022Encoding.cs @@ -31,13 +31,13 @@ // Note: I think that IsAlwaysNormalized should probably return true for form C for Chinese 20936 based CPs. // -using System.Globalization; +using System; using System.Diagnostics; -using System.Text; +using System.Globalization; +using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -using System; using System.Security; -using System.Runtime.CompilerServices; +using System.Text; namespace System.Text { diff --git a/src/libraries/System.Text.Encoding.CodePages/src/System/Text/SBCSCodePageEncoding.cs b/src/libraries/System.Text.Encoding.CodePages/src/System/Text/SBCSCodePageEncoding.cs index ead34e1598201..5d12949ae8adb 100644 --- a/src/libraries/System.Text.Encoding.CodePages/src/System/Text/SBCSCodePageEncoding.cs +++ b/src/libraries/System.Text.Encoding.CodePages/src/System/Text/SBCSCodePageEncoding.cs @@ -3,13 +3,13 @@ using System; using System.Buffers.Binary; -using System.IO; using System.Diagnostics; -using System.Text; -using System.Threading; using System.Globalization; -using System.Security; +using System.IO; using System.Runtime.CompilerServices; +using System.Security; +using System.Text; +using System.Threading; namespace System.Text { diff --git a/src/libraries/System.Text.Encodings.Web/src/Polyfills/System.Text.Rune.netstandard20.cs b/src/libraries/System.Text.Encodings.Web/src/Polyfills/System.Text.Rune.netstandard20.cs index 77bb753ebb63d..f48490179238e 100644 --- a/src/libraries/System.Text.Encodings.Web/src/Polyfills/System.Text.Rune.netstandard20.cs +++ b/src/libraries/System.Text.Encodings.Web/src/Polyfills/System.Text.Rune.netstandard20.cs @@ -3,10 +3,10 @@ using System.Buffers; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Text.Encodings.Web; -using System.Diagnostics.CodeAnalysis; // Contains a polyfill implementation of System.Text.Rune that works on netstandard2.0. // Implementation copied from: diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/Document/JsonDocument.cs b/src/libraries/System.Text.Json/src/System/Text/Json/Document/JsonDocument.cs index 17e189cf9ff68..5a9b20ad023b8 100644 --- a/src/libraries/System.Text.Json/src/System/Text/Json/Document/JsonDocument.cs +++ b/src/libraries/System.Text.Json/src/System/Text/Json/Document/JsonDocument.cs @@ -4,9 +4,9 @@ using System.Buffers; using System.Buffers.Text; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Runtime.InteropServices; using System.Threading; -using System.Diagnostics.CodeAnalysis; namespace System.Text.Json { diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializerOptions.Caching.cs b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializerOptions.Caching.cs index 5d00d08676a00..68551c7eedf12 100644 --- a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializerOptions.Caching.cs +++ b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializerOptions.Caching.cs @@ -9,6 +9,7 @@ using System.Runtime.ExceptionServices; using System.Text.Json.Serialization; using System.Text.Json.Serialization.Metadata; +using System.Threading; namespace System.Text.Json { @@ -24,7 +25,13 @@ internal CachingContext CacheContext get { Debug.Assert(IsReadOnly); - return _cachingContext ??= TrackedCachingContexts.GetOrCreate(this); + return _cachingContext ?? GetOrCreate(); + + CachingContext GetOrCreate() + { + CachingContext ctx = TrackedCachingContexts.GetOrCreate(this); + return Interlocked.CompareExchange(ref _cachingContext, ctx, null) ?? ctx; + } } } diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/ReferenceEqualsWrapper.cs b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/ReferenceEqualsWrapper.cs index 61c8c8d7835d6..16a9c8379a63d 100644 --- a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/ReferenceEqualsWrapper.cs +++ b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/ReferenceEqualsWrapper.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Runtime.CompilerServices; using System.Diagnostics.CodeAnalysis; +using System.Runtime.CompilerServices; namespace System.Text.Json.Serialization { diff --git a/src/libraries/System.Text.RegularExpressions/src/System/Text/RegularExpressions/RegexLWCGCompiler.cs b/src/libraries/System.Text.RegularExpressions/src/System/Text/RegularExpressions/RegexLWCGCompiler.cs index 858a7349705cb..9c258f24c8344 100644 --- a/src/libraries/System.Text.RegularExpressions/src/System/Text/RegularExpressions/RegexLWCGCompiler.cs +++ b/src/libraries/System.Text.RegularExpressions/src/System/Text/RegularExpressions/RegexLWCGCompiler.cs @@ -2,9 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Diagnostics.CodeAnalysis; -using System.Threading; using System.Reflection; using System.Reflection.Emit; +using System.Threading; namespace System.Text.RegularExpressions { diff --git a/src/libraries/System.Text.RegularExpressions/src/System/Text/RegularExpressions/Symbolic/BDD.cs b/src/libraries/System.Text.RegularExpressions/src/System/Text/RegularExpressions/Symbolic/BDD.cs index d17907ff144e0..34ddb39386ceb 100644 --- a/src/libraries/System.Text.RegularExpressions/src/System/Text/RegularExpressions/Symbolic/BDD.cs +++ b/src/libraries/System.Text.RegularExpressions/src/System/Text/RegularExpressions/Symbolic/BDD.cs @@ -4,8 +4,8 @@ using System.Collections.Generic; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; -using System.Runtime.CompilerServices; using System.Numerics; +using System.Runtime.CompilerServices; namespace System.Text.RegularExpressions.Symbolic { diff --git a/src/libraries/System.Text.RegularExpressions/src/System/Text/RegularExpressions/Symbolic/MatchingState.cs b/src/libraries/System.Text.RegularExpressions/src/System/Text/RegularExpressions/Symbolic/MatchingState.cs index 7ece9a91265b8..9cd5913fde322 100644 --- a/src/libraries/System.Text.RegularExpressions/src/System/Text/RegularExpressions/Symbolic/MatchingState.cs +++ b/src/libraries/System.Text.RegularExpressions/src/System/Text/RegularExpressions/Symbolic/MatchingState.cs @@ -3,8 +3,8 @@ using System.Collections.Generic; using System.Diagnostics; -using System.Runtime.CompilerServices; using System.Net; +using System.Runtime.CompilerServices; namespace System.Text.RegularExpressions.Symbolic { diff --git a/src/libraries/System.Threading.Tasks.Dataflow/src/Blocks/BufferBlock.cs b/src/libraries/System.Threading.Tasks.Dataflow/src/Blocks/BufferBlock.cs index 712dfa60eac01..48cab170796ab 100644 --- a/src/libraries/System.Threading.Tasks.Dataflow/src/Blocks/BufferBlock.cs +++ b/src/libraries/System.Threading.Tasks.Dataflow/src/Blocks/BufferBlock.cs @@ -12,9 +12,9 @@ using System.Collections.Generic; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Security; using System.Threading.Tasks.Dataflow.Internal; -using System.Diagnostics.CodeAnalysis; namespace System.Threading.Tasks.Dataflow { diff --git a/src/libraries/System.Threading.Tasks.Dataflow/src/Blocks/TransformBlock.cs b/src/libraries/System.Threading.Tasks.Dataflow/src/Blocks/TransformBlock.cs index 30ebf3c46a672..a95127de9e7fd 100644 --- a/src/libraries/System.Threading.Tasks.Dataflow/src/Blocks/TransformBlock.cs +++ b/src/libraries/System.Threading.Tasks.Dataflow/src/Blocks/TransformBlock.cs @@ -12,8 +12,8 @@ using System.Collections.Generic; using System.Diagnostics; -using System.Threading.Tasks.Dataflow.Internal; using System.Diagnostics.CodeAnalysis; +using System.Threading.Tasks.Dataflow.Internal; namespace System.Threading.Tasks.Dataflow { diff --git a/src/libraries/System.Threading.Tasks.Dataflow/src/Blocks/TransformManyBlock.cs b/src/libraries/System.Threading.Tasks.Dataflow/src/Blocks/TransformManyBlock.cs index c5587ed10a722..4acb1ce404b12 100644 --- a/src/libraries/System.Threading.Tasks.Dataflow/src/Blocks/TransformManyBlock.cs +++ b/src/libraries/System.Threading.Tasks.Dataflow/src/Blocks/TransformManyBlock.cs @@ -11,11 +11,11 @@ // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Linq; using System.Threading.Tasks.Dataflow.Internal; -using System.Collections.ObjectModel; namespace System.Threading.Tasks.Dataflow { diff --git a/src/libraries/System.Threading.Tasks.Dataflow/src/Internal/Common.cs b/src/libraries/System.Threading.Tasks.Dataflow/src/Internal/Common.cs index 7801a2e33f8c0..7bfd3ecf35d95 100644 --- a/src/libraries/System.Threading.Tasks.Dataflow/src/Internal/Common.cs +++ b/src/libraries/System.Threading.Tasks.Dataflow/src/Internal/Common.cs @@ -10,10 +10,10 @@ // // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- +using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; -using System.Collections; using System.Runtime.ExceptionServices; namespace System.Threading.Tasks.Dataflow.Internal diff --git a/src/libraries/System.Threading.Tasks.Dataflow/src/Internal/DataflowEtwProvider.cs b/src/libraries/System.Threading.Tasks.Dataflow/src/Internal/DataflowEtwProvider.cs index eafe195d48717..7c01b09ed6dcf 100644 --- a/src/libraries/System.Threading.Tasks.Dataflow/src/Internal/DataflowEtwProvider.cs +++ b/src/libraries/System.Threading.Tasks.Dataflow/src/Internal/DataflowEtwProvider.cs @@ -12,9 +12,9 @@ using System.Diagnostics; using System.Diagnostics.CodeAnalysis; +using System.Diagnostics.Tracing; using System.Linq; using System.Security; -using System.Diagnostics.Tracing; namespace System.Threading.Tasks.Dataflow.Internal { diff --git a/src/libraries/System.Threading.Tasks.Parallel/src/System/Threading/Tasks/Parallel.cs b/src/libraries/System.Threading.Tasks.Parallel/src/System/Threading/Tasks/Parallel.cs index c08d76b8927c2..d7bca6aa99642 100644 --- a/src/libraries/System.Threading.Tasks.Parallel/src/System/Threading/Tasks/Parallel.cs +++ b/src/libraries/System.Threading.Tasks.Parallel/src/System/Threading/Tasks/Parallel.cs @@ -9,11 +9,11 @@ // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- using System.Collections; -using System.Collections.Generic; using System.Collections.Concurrent; -using System.Runtime.ExceptionServices; +using System.Collections.Generic; using System.Diagnostics; using System.Numerics; +using System.Runtime.ExceptionServices; namespace System.Threading.Tasks { diff --git a/src/libraries/System.Threading.Tasks.Parallel/src/System/Threading/Tasks/ParallelETWProvider.cs b/src/libraries/System.Threading.Tasks.Parallel/src/System/Threading/Tasks/ParallelETWProvider.cs index a4c62f7a972ea..1b7a8894ec285 100644 --- a/src/libraries/System.Threading.Tasks.Parallel/src/System/Threading/Tasks/ParallelETWProvider.cs +++ b/src/libraries/System.Threading.Tasks.Parallel/src/System/Threading/Tasks/ParallelETWProvider.cs @@ -9,10 +9,10 @@ using System; using System.Collections.Generic; -using System.Text; -using System.Security; using System.Diagnostics.CodeAnalysis; using System.Diagnostics.Tracing; +using System.Security; +using System.Text; namespace System.Threading.Tasks { diff --git a/src/libraries/System.Threading/src/System/Threading/CDSsyncETWBCLProvider.cs b/src/libraries/System.Threading/src/System/Threading/CDSsyncETWBCLProvider.cs index 33aa7f5e8ddb7..408fe376752c9 100644 --- a/src/libraries/System.Threading/src/System/Threading/CDSsyncETWBCLProvider.cs +++ b/src/libraries/System.Threading/src/System/Threading/CDSsyncETWBCLProvider.cs @@ -13,10 +13,10 @@ using System; using System.Collections.Generic; -using System.Text; -using System.Security; using System.Diagnostics.CodeAnalysis; using System.Diagnostics.Tracing; +using System.Security; +using System.Text; namespace System.Threading { diff --git a/src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/ResourceManagerNotifyShim.cs b/src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/ResourceManagerNotifyShim.cs index edeeac15445dd..72eb246f109be 100644 --- a/src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/ResourceManagerNotifyShim.cs +++ b/src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/ResourceManagerNotifyShim.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Transactions.Oletx; -using System.Transactions.DtcProxyShim.DtcInterfaces; using System.Runtime.InteropServices.Marshalling; +using System.Transactions.DtcProxyShim.DtcInterfaces; +using System.Transactions.Oletx; namespace System.Transactions.DtcProxyShim; diff --git a/src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/ResourceManagerShim.cs b/src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/ResourceManagerShim.cs index f9dff75d4b7d7..a6ebc874eed4e 100644 --- a/src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/ResourceManagerShim.cs +++ b/src/libraries/System.Transactions.Local/src/System/Transactions/DtcProxyShim/ResourceManagerShim.cs @@ -3,8 +3,8 @@ using System; using System.Runtime.InteropServices; -using System.Transactions.Oletx; using System.Transactions.DtcProxyShim.DtcInterfaces; +using System.Transactions.Oletx; namespace System.Transactions.DtcProxyShim; diff --git a/src/libraries/System.Transactions.Local/src/System/Transactions/Oletx/DtcTransactionManager.cs b/src/libraries/System.Transactions.Local/src/System/Transactions/Oletx/DtcTransactionManager.cs index b844f208cccd6..8bb8b6e884c21 100644 --- a/src/libraries/System.Transactions.Local/src/System/Transactions/Oletx/DtcTransactionManager.cs +++ b/src/libraries/System.Transactions.Local/src/System/Transactions/Oletx/DtcTransactionManager.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Diagnostics.CodeAnalysis; -using System.Runtime.InteropServices; using System.Globalization; +using System.Runtime.InteropServices; using System.Transactions.DtcProxyShim; namespace System.Transactions.Oletx; diff --git a/src/libraries/System.Transactions.Local/src/System/Transactions/TransactionsEtwProvider.cs b/src/libraries/System.Transactions.Local/src/System/Transactions/TransactionsEtwProvider.cs index 6a681c5552d68..e68b1e8eeb1f5 100644 --- a/src/libraries/System.Transactions.Local/src/System/Transactions/TransactionsEtwProvider.cs +++ b/src/libraries/System.Transactions.Local/src/System/Transactions/TransactionsEtwProvider.cs @@ -2,15 +2,15 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; +using System.Collections; using System.Collections.Generic; -using System.Text; -using System.Threading.Tasks; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Diagnostics.Tracing; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -using System.Collections; +using System.Text; +using System.Threading.Tasks; using System.Transactions.Oletx; namespace System.Transactions diff --git a/src/libraries/System.Windows.Extensions/src/System/Security/Cryptography/X509Certificates/X509Certificate2UI.cs b/src/libraries/System.Windows.Extensions/src/System/Security/Cryptography/X509Certificates/X509Certificate2UI.cs index bca43321f2cf9..b19e217322f07 100644 --- a/src/libraries/System.Windows.Extensions/src/System/Security/Cryptography/X509Certificates/X509Certificate2UI.cs +++ b/src/libraries/System.Windows.Extensions/src/System/Security/Cryptography/X509Certificates/X509Certificate2UI.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Microsoft.Win32.SafeHandles; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; +using Microsoft.Win32.SafeHandles; namespace System.Security.Cryptography.X509Certificates { diff --git a/src/mono/System.Private.CoreLib/src/System/Array.Mono.cs b/src/mono/System.Private.CoreLib/src/System/Array.Mono.cs index f6782a42a23be..57b21d78cc501 100644 --- a/src/mono/System.Private.CoreLib/src/System/Array.Mono.cs +++ b/src/mono/System.Private.CoreLib/src/System/Array.Mono.cs @@ -289,6 +289,11 @@ private static unsafe Array InternalCreate(RuntimeType elementType, int rank, in [MethodImpl(MethodImplOptions.InternalCall)] private static extern unsafe void InternalCreate(ref Array? result, IntPtr elementType, int rank, int* lengths, int* lowerBounds); + private static unsafe Array InternalCreateFromArrayType(Type arrayType, int rank, int* pLengths, int* pLowerBounds) + { + return InternalCreate((arrayType.GetElementType() as RuntimeType)!, rank, pLengths, pLowerBounds); + } + private unsafe nint GetFlattenedIndex(int rawIndex) { // Checked by the caller diff --git a/src/mono/System.Private.CoreLib/src/System/Collections/Generic/ArraySortHelper.Mono.cs b/src/mono/System.Private.CoreLib/src/System/Collections/Generic/ArraySortHelper.Mono.cs index f8b26363ef452..deb6b1c08b4da 100644 --- a/src/mono/System.Private.CoreLib/src/System/Collections/Generic/ArraySortHelper.Mono.cs +++ b/src/mono/System.Private.CoreLib/src/System/Collections/Generic/ArraySortHelper.Mono.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Runtime.CompilerServices; using System.Diagnostics.CodeAnalysis; +using System.Runtime.CompilerServices; namespace System.Collections.Generic { diff --git a/src/mono/System.Private.CoreLib/src/System/Environment.Mono.cs b/src/mono/System.Private.CoreLib/src/System/Environment.Mono.cs index e7303f9129fb4..91d6ccef63e2e 100644 --- a/src/mono/System.Private.CoreLib/src/System/Environment.Mono.cs +++ b/src/mono/System.Private.CoreLib/src/System/Environment.Mono.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Globalization; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; +using System.Globalization; using System.Runtime.CompilerServices; using System.Threading; diff --git a/src/mono/System.Private.CoreLib/src/System/Exception.Mono.cs b/src/mono/System.Private.CoreLib/src/System/Exception.Mono.cs index 2c47a908f26e1..77718e32953a3 100644 --- a/src/mono/System.Private.CoreLib/src/System/Exception.Mono.cs +++ b/src/mono/System.Private.CoreLib/src/System/Exception.Mono.cs @@ -4,10 +4,10 @@ using System.Collections; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; +using System.Diagnostics.Tracing; using System.Reflection; -using System.Runtime.InteropServices; using System.Runtime.CompilerServices; -using System.Diagnostics.Tracing; +using System.Runtime.InteropServices; namespace System { diff --git a/src/mono/System.Private.CoreLib/src/System/GC.Mono.cs b/src/mono/System.Private.CoreLib/src/System/GC.Mono.cs index 485576645537f..21eba8223fd0f 100644 --- a/src/mono/System.Private.CoreLib/src/System/GC.Mono.cs +++ b/src/mono/System.Private.CoreLib/src/System/GC.Mono.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Diagnostics.Tracing; using System.Runtime; using System.Runtime.CompilerServices; -using System.Diagnostics.Tracing; namespace System { diff --git a/src/mono/System.Private.CoreLib/src/System/MulticastDelegate.cs b/src/mono/System.Private.CoreLib/src/System/MulticastDelegate.cs index d9f04d3059e51..356a2e3498083 100644 --- a/src/mono/System.Private.CoreLib/src/System/MulticastDelegate.cs +++ b/src/mono/System.Private.CoreLib/src/System/MulticastDelegate.cs @@ -4,8 +4,8 @@ using System.ComponentModel; using System.Diagnostics.CodeAnalysis; using System.Reflection; -using System.Runtime.Serialization; using System.Runtime.InteropServices; +using System.Runtime.Serialization; namespace System { diff --git a/src/mono/System.Private.CoreLib/src/System/Reflection/Assembly.Mono.cs b/src/mono/System.Private.CoreLib/src/System/Reflection/Assembly.Mono.cs index ba531f8083f1e..d47cbc107c83f 100644 --- a/src/mono/System.Private.CoreLib/src/System/Reflection/Assembly.Mono.cs +++ b/src/mono/System.Private.CoreLib/src/System/Reflection/Assembly.Mono.cs @@ -1,12 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Diagnostics.Tracing; using System.IO; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Loader; using System.Threading; -using System.Diagnostics.Tracing; namespace System.Reflection { diff --git a/src/mono/System.Private.CoreLib/src/System/Reflection/AssemblyName.Mono.cs b/src/mono/System.Private.CoreLib/src/System/Reflection/AssemblyName.Mono.cs index 644014e66f27d..7d1559cb60cbc 100644 --- a/src/mono/System.Private.CoreLib/src/System/Reflection/AssemblyName.Mono.cs +++ b/src/mono/System.Private.CoreLib/src/System/Reflection/AssemblyName.Mono.cs @@ -1,12 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Mono; using System.Configuration.Assemblies; using System.Globalization; using System.IO; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; +using Mono; namespace System.Reflection { diff --git a/src/mono/System.Private.CoreLib/src/System/Reflection/CustomAttribute.cs b/src/mono/System.Private.CoreLib/src/System/Reflection/CustomAttribute.cs index a024884e065d8..159d0830c53b0 100644 --- a/src/mono/System.Private.CoreLib/src/System/Reflection/CustomAttribute.cs +++ b/src/mono/System.Private.CoreLib/src/System/Reflection/CustomAttribute.cs @@ -26,12 +26,11 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -using System.Collections.Generic; - namespace System.Reflection { internal static class CustomAttribute diff --git a/src/mono/System.Private.CoreLib/src/System/Reflection/Emit/RuntimeConstructorBuilder.Mono.cs b/src/mono/System.Private.CoreLib/src/System/Reflection/Emit/RuntimeConstructorBuilder.Mono.cs index f6127e18e8425..603be1d0b1ea1 100644 --- a/src/mono/System.Private.CoreLib/src/System/Reflection/Emit/RuntimeConstructorBuilder.Mono.cs +++ b/src/mono/System.Private.CoreLib/src/System/Reflection/Emit/RuntimeConstructorBuilder.Mono.cs @@ -34,10 +34,10 @@ // #if MONO_FEATURE_SRE -using System.Globalization; +using System.Buffers.Binary; using System.Diagnostics.CodeAnalysis; +using System.Globalization; using System.Runtime.InteropServices; -using System.Buffers.Binary; namespace System.Reflection.Emit { diff --git a/src/mono/System.Private.CoreLib/src/System/Reflection/Emit/RuntimeEventBuilder.Mono.cs b/src/mono/System.Private.CoreLib/src/System/Reflection/Emit/RuntimeEventBuilder.Mono.cs index 5cbfea669f365..4184069ae8734 100644 --- a/src/mono/System.Private.CoreLib/src/System/Reflection/Emit/RuntimeEventBuilder.Mono.cs +++ b/src/mono/System.Private.CoreLib/src/System/Reflection/Emit/RuntimeEventBuilder.Mono.cs @@ -34,8 +34,8 @@ // #if MONO_FEATURE_SRE -using System.Runtime.InteropServices; using System.Diagnostics.CodeAnalysis; +using System.Runtime.InteropServices; namespace System.Reflection.Emit { diff --git a/src/mono/System.Private.CoreLib/src/System/Reflection/Emit/RuntimeFieldBuilder.Mono.cs b/src/mono/System.Private.CoreLib/src/System/Reflection/Emit/RuntimeFieldBuilder.Mono.cs index 68f4c7b2bbf74..2bf9bf01df316 100644 --- a/src/mono/System.Private.CoreLib/src/System/Reflection/Emit/RuntimeFieldBuilder.Mono.cs +++ b/src/mono/System.Private.CoreLib/src/System/Reflection/Emit/RuntimeFieldBuilder.Mono.cs @@ -34,10 +34,10 @@ // #if MONO_FEATURE_SRE +using System.Buffers.Binary; +using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Runtime.InteropServices; -using System.Diagnostics.CodeAnalysis; -using System.Buffers.Binary; namespace System.Reflection.Emit { diff --git a/src/mono/System.Private.CoreLib/src/System/Reflection/Emit/RuntimeLocalBuilder.Mono.cs b/src/mono/System.Private.CoreLib/src/System/Reflection/Emit/RuntimeLocalBuilder.Mono.cs index e178376470ddc..583b48bef6288 100644 --- a/src/mono/System.Private.CoreLib/src/System/Reflection/Emit/RuntimeLocalBuilder.Mono.cs +++ b/src/mono/System.Private.CoreLib/src/System/Reflection/Emit/RuntimeLocalBuilder.Mono.cs @@ -35,8 +35,8 @@ // (C) 2001, 2002 Ximian, Inc. http://www.ximian.com // -using System.Runtime.InteropServices; using System.Diagnostics.CodeAnalysis; +using System.Runtime.InteropServices; namespace System.Reflection.Emit { diff --git a/src/mono/System.Private.CoreLib/src/System/Reflection/Emit/RuntimeModuleBuilder.Mono.cs b/src/mono/System.Private.CoreLib/src/System/Reflection/Emit/RuntimeModuleBuilder.Mono.cs index df9293f8b4c88..91ba110849327 100644 --- a/src/mono/System.Private.CoreLib/src/System/Reflection/Emit/RuntimeModuleBuilder.Mono.cs +++ b/src/mono/System.Private.CoreLib/src/System/Reflection/Emit/RuntimeModuleBuilder.Mono.cs @@ -36,10 +36,10 @@ using System.Collections.Generic; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; +using System.Globalization; +using System.IO; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -using System.IO; -using System.Globalization; namespace System.Reflection.Emit { diff --git a/src/mono/System.Private.CoreLib/src/System/Reflection/Emit/RuntimeParameterBuilder.Mono.cs b/src/mono/System.Private.CoreLib/src/System/Reflection/Emit/RuntimeParameterBuilder.Mono.cs index 2f682a29d674a..293ab88da052d 100644 --- a/src/mono/System.Private.CoreLib/src/System/Reflection/Emit/RuntimeParameterBuilder.Mono.cs +++ b/src/mono/System.Private.CoreLib/src/System/Reflection/Emit/RuntimeParameterBuilder.Mono.cs @@ -35,8 +35,8 @@ // #if MONO_FEATURE_SRE -using System.Runtime.InteropServices; using System.Diagnostics.CodeAnalysis; +using System.Runtime.InteropServices; namespace System.Reflection.Emit { diff --git a/src/mono/System.Private.CoreLib/src/System/Reflection/Emit/RuntimePropertyBuilder.Mono.cs b/src/mono/System.Private.CoreLib/src/System/Reflection/Emit/RuntimePropertyBuilder.Mono.cs index 25dbb485d23c3..5ac012a9bbbc2 100644 --- a/src/mono/System.Private.CoreLib/src/System/Reflection/Emit/RuntimePropertyBuilder.Mono.cs +++ b/src/mono/System.Private.CoreLib/src/System/Reflection/Emit/RuntimePropertyBuilder.Mono.cs @@ -34,9 +34,9 @@ // #if MONO_FEATURE_SRE +using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Runtime.InteropServices; -using System.Diagnostics.CodeAnalysis; namespace System.Reflection.Emit { diff --git a/src/mono/System.Private.CoreLib/src/System/Reflection/LoaderAllocator.cs b/src/mono/System.Private.CoreLib/src/System/Reflection/LoaderAllocator.cs index a3295aec790cc..fb38ac15b29d5 100644 --- a/src/mono/System.Private.CoreLib/src/System/Reflection/LoaderAllocator.cs +++ b/src/mono/System.Private.CoreLib/src/System/Reflection/LoaderAllocator.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Runtime.InteropServices; using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; namespace System.Reflection { diff --git a/src/mono/System.Private.CoreLib/src/System/Reflection/RuntimeAssembly.cs b/src/mono/System.Private.CoreLib/src/System/Reflection/RuntimeAssembly.cs index f3146c49f551a..85561feed3fd7 100644 --- a/src/mono/System.Private.CoreLib/src/System/Reflection/RuntimeAssembly.cs +++ b/src/mono/System.Private.CoreLib/src/System/Reflection/RuntimeAssembly.cs @@ -24,10 +24,10 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -using System.IO; -using System.Globalization; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; +using System.Globalization; +using System.IO; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Loader; diff --git a/src/mono/System.Private.CoreLib/src/System/Reflection/RuntimeFieldInfo.cs b/src/mono/System.Private.CoreLib/src/System/Reflection/RuntimeFieldInfo.cs index 914ff57c67d0c..2abf53980d06b 100644 --- a/src/mono/System.Private.CoreLib/src/System/Reflection/RuntimeFieldInfo.cs +++ b/src/mono/System.Private.CoreLib/src/System/Reflection/RuntimeFieldInfo.cs @@ -25,10 +25,10 @@ // using System.Collections.Generic; +using System.Diagnostics; using System.Globalization; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -using System.Diagnostics; namespace System.Reflection { diff --git a/src/mono/System.Private.CoreLib/src/System/Reflection/RuntimeMethodInfo.Mono.cs b/src/mono/System.Private.CoreLib/src/System/Reflection/RuntimeMethodInfo.Mono.cs index 7cbf84f2196f1..42e3f780d5498 100644 --- a/src/mono/System.Private.CoreLib/src/System/Reflection/RuntimeMethodInfo.Mono.cs +++ b/src/mono/System.Private.CoreLib/src/System/Reflection/RuntimeMethodInfo.Mono.cs @@ -27,14 +27,14 @@ // using System.Collections.Generic; +using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Globalization; +using System.Reflection.Emit; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -using System.Reflection.Emit; using System.Text; using System.Threading; -using System.Diagnostics; -using System.Diagnostics.CodeAnalysis; using InteropServicesCallingConvention = System.Runtime.InteropServices.CallingConvention; namespace System.Reflection diff --git a/src/mono/System.Private.CoreLib/src/System/Reflection/RuntimeModule.cs b/src/mono/System.Private.CoreLib/src/System/Reflection/RuntimeModule.cs index 8f9e3629f7d85..32756ef222cb7 100644 --- a/src/mono/System.Private.CoreLib/src/System/Reflection/RuntimeModule.cs +++ b/src/mono/System.Private.CoreLib/src/System/Reflection/RuntimeModule.cs @@ -24,10 +24,10 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -using System.Diagnostics.CodeAnalysis; using System.Collections.Generic; -using System.Runtime.InteropServices; +using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; namespace System.Reflection { diff --git a/src/mono/System.Private.CoreLib/src/System/Reflection/RuntimeParameterInfo.cs b/src/mono/System.Private.CoreLib/src/System/Reflection/RuntimeParameterInfo.cs index b2a743b88b5b0..d28cdfc3469c1 100644 --- a/src/mono/System.Private.CoreLib/src/System/Reflection/RuntimeParameterInfo.cs +++ b/src/mono/System.Private.CoreLib/src/System/Reflection/RuntimeParameterInfo.cs @@ -1,10 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Collections.Generic; using System.Reflection.Emit; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -using System.Collections.Generic; using System.Text; namespace System.Reflection diff --git a/src/mono/System.Private.CoreLib/src/System/Reflection/RuntimePropertyInfo.cs b/src/mono/System.Private.CoreLib/src/System/Reflection/RuntimePropertyInfo.cs index 1b5ac96333448..494d291718932 100644 --- a/src/mono/System.Private.CoreLib/src/System/Reflection/RuntimePropertyInfo.cs +++ b/src/mono/System.Private.CoreLib/src/System/Reflection/RuntimePropertyInfo.cs @@ -27,8 +27,8 @@ // using System.Collections.Generic; -using System.Globalization; using System.Diagnostics.CodeAnalysis; +using System.Globalization; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Text; diff --git a/src/mono/System.Private.CoreLib/src/System/Runtime/InteropServices/ObjectiveCMarshal.Mono.cs b/src/mono/System.Private.CoreLib/src/System/Runtime/InteropServices/ObjectiveCMarshal.Mono.cs index ef322b9fe2bd0..21ba205c5b10c 100644 --- a/src/mono/System.Private.CoreLib/src/System/Runtime/InteropServices/ObjectiveCMarshal.Mono.cs +++ b/src/mono/System.Private.CoreLib/src/System/Runtime/InteropServices/ObjectiveCMarshal.Mono.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Diagnostics; -using System.Runtime.Versioning; using System.Runtime.CompilerServices; +using System.Runtime.Versioning; namespace System.Runtime.InteropServices.ObjectiveC { diff --git a/src/mono/System.Private.CoreLib/src/System/Runtime/Loader/AssemblyLoadContext.Mono.cs b/src/mono/System.Private.CoreLib/src/System/Runtime/Loader/AssemblyLoadContext.Mono.cs index d8911faf5f816..cac84dee1e87f 100644 --- a/src/mono/System.Private.CoreLib/src/System/Runtime/Loader/AssemblyLoadContext.Mono.cs +++ b/src/mono/System.Private.CoreLib/src/System/Runtime/Loader/AssemblyLoadContext.Mono.cs @@ -1,9 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Diagnostics.CodeAnalysis; using System.IO; using System.Reflection; -using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Threading; diff --git a/src/mono/System.Private.CoreLib/src/System/RuntimeMethodHandle.cs b/src/mono/System.Private.CoreLib/src/System/RuntimeMethodHandle.cs index ad6341620d35f..832fe88ebc0fe 100644 --- a/src/mono/System.Private.CoreLib/src/System/RuntimeMethodHandle.cs +++ b/src/mono/System.Private.CoreLib/src/System/RuntimeMethodHandle.cs @@ -3,8 +3,8 @@ using System.ComponentModel; using System.Reflection; -using System.Runtime.Serialization; using System.Runtime.CompilerServices; +using System.Runtime.Serialization; using System.Text; namespace System diff --git a/src/mono/System.Private.CoreLib/src/System/RuntimeType.Mono.cs b/src/mono/System.Private.CoreLib/src/System/RuntimeType.Mono.cs index 01577c29a8819..7d50b0c14a79a 100644 --- a/src/mono/System.Private.CoreLib/src/System/RuntimeType.Mono.cs +++ b/src/mono/System.Private.CoreLib/src/System/RuntimeType.Mono.cs @@ -1,15 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Reflection; -using System.Globalization; -using System.Threading; using System.Collections.Generic; -using System.Runtime.Serialization; -using System.Runtime.CompilerServices; +using System.Diagnostics; using System.Diagnostics.CodeAnalysis; +using System.Globalization; +using System.Reflection; +using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -using System.Diagnostics; +using System.Runtime.Serialization; +using System.Threading; namespace System { diff --git a/src/mono/System.Private.CoreLib/src/System/RuntimeTypeHandle.cs b/src/mono/System.Private.CoreLib/src/System/RuntimeTypeHandle.cs index 95fe3c2b9f972..43bf37f35d9c6 100644 --- a/src/mono/System.Private.CoreLib/src/System/RuntimeTypeHandle.cs +++ b/src/mono/System.Private.CoreLib/src/System/RuntimeTypeHandle.cs @@ -34,8 +34,8 @@ using System.ComponentModel; using System.Diagnostics.CodeAnalysis; using System.Reflection; -using System.Runtime.Serialization; using System.Runtime.CompilerServices; +using System.Runtime.Serialization; using System.Threading; namespace System diff --git a/src/mono/System.Private.CoreLib/src/System/Threading/Interlocked.Mono.cs b/src/mono/System.Private.CoreLib/src/System/Threading/Interlocked.Mono.cs index 6b187ac8d967f..79e193e70e09c 100644 --- a/src/mono/System.Private.CoreLib/src/System/Threading/Interlocked.Mono.cs +++ b/src/mono/System.Private.CoreLib/src/System/Threading/Interlocked.Mono.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Runtime.CompilerServices; using System.Diagnostics.CodeAnalysis; +using System.Runtime.CompilerServices; namespace System.Threading { diff --git a/src/mono/System.Private.CoreLib/src/System/Threading/ThreadPool.Browser.Mono.cs b/src/mono/System.Private.CoreLib/src/System/Threading/ThreadPool.Browser.Mono.cs index 406c5efcba46e..afe0404b5eaad 100644 --- a/src/mono/System.Private.CoreLib/src/System/Threading/ThreadPool.Browser.Mono.cs +++ b/src/mono/System.Private.CoreLib/src/System/Threading/ThreadPool.Browser.Mono.cs @@ -1,12 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Diagnostics; using System.Collections.Generic; +using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; -using System.Diagnostics.CodeAnalysis; using Microsoft.Win32.SafeHandles; #pragma warning disable IDE0060 diff --git a/src/mono/System.Private.CoreLib/src/System/Threading/TimerQueue.Browser.Mono.cs b/src/mono/System.Private.CoreLib/src/System/Threading/TimerQueue.Browser.Mono.cs index 4c4e65a460b61..b835240188d9f 100644 --- a/src/mono/System.Private.CoreLib/src/System/Threading/TimerQueue.Browser.Mono.cs +++ b/src/mono/System.Private.CoreLib/src/System/Threading/TimerQueue.Browser.Mono.cs @@ -3,8 +3,8 @@ using System.Collections.Generic; using System.Diagnostics; -using System.Runtime.CompilerServices; using System.Diagnostics.CodeAnalysis; +using System.Runtime.CompilerServices; using System.Runtime.InteropServices; namespace System.Threading diff --git a/src/mono/System.Private.CoreLib/src/System/Type.Mono.cs b/src/mono/System.Private.CoreLib/src/System/Type.Mono.cs index 9605368222edb..851cc8f92c551 100644 --- a/src/mono/System.Private.CoreLib/src/System/Type.Mono.cs +++ b/src/mono/System.Private.CoreLib/src/System/Type.Mono.cs @@ -1,8 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Reflection; using System.Diagnostics.CodeAnalysis; +using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; diff --git a/src/mono/mono.proj b/src/mono/mono.proj index c9d324467f0dc..5bb0e3c883817 100644 --- a/src/mono/mono.proj +++ b/src/mono/mono.proj @@ -41,7 +41,7 @@ true true true - true + true $([MSBuild]::NormalizeDirectory('$(MonoObjDir)', 'cross')) $([MSBuild]::NormalizePath('$(MonoObjCrossDir)', 'config.h')) true @@ -85,8 +85,21 @@ + + + + $([MSBuild]::NormalizePath('$(PkgMicrosoft_NET_Runtime_Emscripten_3_1_34_Python_win-x64)', 'tools', 'python')) + + <_MonoCMakeArgs Include="-DENABLE_WERROR=1"/> @@ -815,8 +828,8 @@ - - + + + <_WasmRuntimeICallTablePath>$(_WasmIntermediateOutputPath)runtime-icall-table.h <_WasmPInvokeTablePath>$(_WasmIntermediateOutputPath)pinvoke-table.h <_WasmInterpToNativeTablePath>$(_WasmIntermediateOutputPath)wasm_m2n_invoke.g.h <_WasmPInvokeHPath>$(_WasmRuntimePackIncludeDir)wasm\pinvoke.h @@ -175,6 +176,7 @@ <_WasmCommonCFlags Condition="'$(WasmSingleFileBundle)' == 'true'" Include="-DWASM_SINGLE_FILE=1" /> <_WasmCommonCFlags Condition="'$(InvariantGlobalization)' == 'true'" Include="-DINVARIANT_GLOBALIZATION=1" /> <_WasmCommonCFlags Condition="'$(InvariantTimezone)' == 'true'" Include="-DINVARIANT_TIMEZONE=1" /> + <_WasmCommonCFlags Condition="'$(WasmLinkIcalls)' == 'true'" Include="-DLINK_ICALLS=1" /> @@ -241,14 +243,13 @@ + - - - - - - - + + + + @@ -263,9 +264,9 @@ - + - + @@ -460,7 +461,7 @@ <_WasiSdkClangArgs Include="-Wl,--export=malloc,--export=free,--export=__heap_base,--export=__data_end" /> <_WasiSdkClangArgs Include="-Wl,-z,stack-size=8388608,-lwasi-emulated-process-clocks,-lwasi-emulated-signal,-lwasi-emulated-mman"/> - <_WasiSdkClangArgs Include="-Wl,-s" /> + <_WasiSdkClangArgs Include="-Wl,-s" Condition="'$(WasmNativeStrip)' == 'true'"/> <_WasiSdkClangArgs Include="@(_WasiSdkLinkerFlags -> '-Xlinker %(Identity)', ' ')" /> diff --git a/src/mono/wasi/runtime/driver.c b/src/mono/wasi/runtime/driver.c index 98fbe1fef04bb..c3e67e346dd25 100644 --- a/src/mono/wasi/runtime/driver.c +++ b/src/mono/wasi/runtime/driver.c @@ -84,9 +84,21 @@ void load_icu_data (void); int mono_wasm_enable_gc = 1; +/* Not part of public headers */ +#define MONO_ICALL_TABLE_CALLBACKS_VERSION 3 + +typedef struct { + int version; + void* (*lookup) (MonoMethod *method, char *classname, char *methodname, char *sigstart, int32_t *flags); + const char* (*lookup_icall_symbol) (void* func); +} MonoIcallTableCallbacks; + int mono_string_instance_is_interned (MonoString *str_raw); +void +mono_install_icall_table_callbacks (const MonoIcallTableCallbacks *cb); + void mono_trace_init (void); #define g_new(type, size) ((type *) malloc (sizeof (type) * (size))) diff --git a/src/native/libs/System.Native/pal_console.c b/src/native/libs/System.Native/pal_console.c index 52241f47d16d6..73b4a50ecfa37 100644 --- a/src/native/libs/System.Native/pal_console.c +++ b/src/native/libs/System.Native/pal_console.c @@ -19,12 +19,12 @@ #include #include -int32_t SystemNative_GetWindowSize(WinSize* windowSize) +int32_t SystemNative_GetWindowSize(intptr_t fd, WinSize* windowSize) { assert(windowSize != NULL); #if HAVE_IOCTL && HAVE_TIOCGWINSZ - int error = ioctl(STDOUT_FILENO, TIOCGWINSZ, windowSize); + int error = ioctl(ToFileDescriptor(fd), TIOCGWINSZ, windowSize); if (error != 0) { @@ -33,6 +33,7 @@ int32_t SystemNative_GetWindowSize(WinSize* windowSize) return error; #else + (void)fd; memset(windowSize, 0, sizeof(WinSize)); // managed out param must be initialized errno = ENOTSUP; return -1; @@ -61,6 +62,7 @@ int32_t SystemNative_IsATty(intptr_t fd) } static char* g_keypadXmit = NULL; // string used to enable application mode, from terminfo +static int g_keypadXmitFd = -1; static void WriteKeypadXmit(void) { @@ -69,12 +71,12 @@ static void WriteKeypadXmit(void) if (g_keypadXmit != NULL) { ssize_t ret; - while (CheckInterrupted(ret = write(STDOUT_FILENO, g_keypadXmit, (size_t)(sizeof(char) * strlen(g_keypadXmit))))); - assert(ret >= 0); // failure to change the mode should not prevent app from continuing + while (CheckInterrupted(ret = write(g_keypadXmitFd, g_keypadXmit, (size_t)(sizeof(char) * strlen(g_keypadXmit))))); + assert(ret >= 0 || (errno == EBADF && g_keypadXmitFd == 0)); // failure to change the mode should not prevent app from continuing } } -void SystemNative_SetKeypadXmit(const char* terminfoString) +void SystemNative_SetKeypadXmit(intptr_t fd, const char* terminfoString) { assert(terminfoString != NULL); @@ -85,6 +87,7 @@ void SystemNative_SetKeypadXmit(const char* terminfoString) } // Store the string to use to enter application mode, then enter + g_keypadXmitFd = ToFileDescriptor(fd); g_keypadXmit = strdup(terminfoString); WriteKeypadXmit(); } @@ -108,7 +111,6 @@ static bool g_reading = false; // tracks whether the application static bool g_childUsesTerminal = false; // tracks whether a child process is using the terminal static bool g_terminalUninitialized = false; // tracks whether the application is terminating static bool g_terminalConfigured = false; // tracks whether the application configured the terminal. - static bool g_hasTty = false; // cache we are not a tty static volatile bool g_receivedSigTtou = false; diff --git a/src/native/libs/System.Native/pal_console.h b/src/native/libs/System.Native/pal_console.h index 5942e25713e18..e211ab2ef0934 100644 --- a/src/native/libs/System.Native/pal_console.h +++ b/src/native/libs/System.Native/pal_console.h @@ -46,7 +46,7 @@ typedef struct * * Returns 0 on success; otherwise, returns -1 and sets errno. */ -PALEXPORT int32_t SystemNative_GetWindowSize(WinSize* windowsSize); +PALEXPORT int32_t SystemNative_GetWindowSize(intptr_t fd, WinSize* windowsSize); /** * Sets the windows size of the terminal @@ -76,7 +76,7 @@ PALEXPORT int32_t SystemNative_InitializeTerminalAndSignalHandling(void); * * Returns 1 on success; otherwise returns 0 and sets errno. */ -PALEXPORT void SystemNative_SetKeypadXmit(const char* terminfoString); +PALEXPORT void SystemNative_SetKeypadXmit(intptr_t fd, const char* terminfoString); /** * Gets the special control character codes for the requested control characters. diff --git a/src/native/libs/System.Native/pal_console_wasi.c b/src/native/libs/System.Native/pal_console_wasi.c index cb77505bc9a70..f28f6a0c2dda0 100644 --- a/src/native/libs/System.Native/pal_console_wasi.c +++ b/src/native/libs/System.Native/pal_console_wasi.c @@ -23,8 +23,9 @@ #define DEBUGNOTRETURN #endif -int32_t SystemNative_GetWindowSize(WinSize* windowSize) +int32_t SystemNative_GetWindowSize(intptr_t fd, WinSize* windowSize) { + (void)fd; assert(windowSize != NULL); memset(windowSize, 0, sizeof(WinSize)); // managed out param must be initialized errno = ENOTSUP; @@ -44,8 +45,9 @@ int32_t SystemNative_IsATty(intptr_t fd) } DEBUGNOTRETURN -void SystemNative_SetKeypadXmit(const char* terminfoString) +void SystemNative_SetKeypadXmit(intptr_t fd, const char* terminfoString) { + (void)fd; assert(terminfoString != NULL); assert_msg(false, "Not supported on WASI", 0); } diff --git a/src/native/minipal/getexepath.h b/src/native/minipal/getexepath.h index dfee16910ad4d..601447a1af215 100644 --- a/src/native/minipal/getexepath.h +++ b/src/native/minipal/getexepath.h @@ -37,7 +37,7 @@ static inline char* minipal_getexepath(void) return NULL; } - char path_buf[path_length]; + char* path_buf = (char*)alloca(path_length); if (_NSGetExecutablePath(path_buf, &path_length) != 0) { errno = EINVAL; diff --git a/src/tests/Common/GenerateHWIntrinsicTests/GenerateHWIntrinsicTests_Arm.cs b/src/tests/Common/GenerateHWIntrinsicTests/GenerateHWIntrinsicTests_Arm.cs index b3faa0075c51d..c59da0d84da8d 100644 --- a/src/tests/Common/GenerateHWIntrinsicTests/GenerateHWIntrinsicTests_Arm.cs +++ b/src/tests/Common/GenerateHWIntrinsicTests/GenerateHWIntrinsicTests_Arm.cs @@ -1685,23 +1685,44 @@ ("StoreUnOpTest.template", new Dictionary { ["TestName"] = "Store_Vector128_UInt16", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Store", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "firstOp[i] != result[i]"}), ("StoreUnOpTest.template", new Dictionary { ["TestName"] = "Store_Vector128_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Store", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "firstOp[i] != result[i]"}), ("StoreUnOpTest.template", new Dictionary { ["TestName"] = "Store_Vector128_UInt64", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "Store", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "firstOp[i] != result[i]"}), - ("StoreSelectedScalarTest.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector64_Byte_7", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Byte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["ElementIndex"] = "7", ["ValidateResult"] = "firstOp[ElementIndex] != result"}), - ("StoreSelectedScalarTest.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector64_Int16_3", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ElementIndex"] = "3", ["ValidateResult"] = "firstOp[ElementIndex] != result"}), - ("StoreSelectedScalarTest.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector64_Int32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ElementIndex"] = "1", ["ValidateResult"] = "firstOp[ElementIndex] != result"}), - ("StoreSelectedScalarTest.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector64_SByte_7", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["ElementIndex"] = "7", ["ValidateResult"] = "firstOp[ElementIndex] != result"}), - ("StoreSelectedScalarTest.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector64_Single_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ElementIndex"] = "1", ["ValidateResult"] = "BitConverter.SingleToInt32Bits(firstOp[ElementIndex]) != BitConverter.SingleToInt32Bits(result)"}), - ("StoreSelectedScalarTest.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector64_UInt16_3", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["ElementIndex"] = "3", ["ValidateResult"] = "firstOp[ElementIndex] != result"}), - ("StoreSelectedScalarTest.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector64_UInt32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["RetVectorType"] = "Vector64", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector64", ["Op1BaseType"] = "UInt32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ElementIndex"] = "1", ["ValidateResult"] = "firstOp[ElementIndex] != result"}), - ("StoreSelectedScalarTest.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector128_Byte_15", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Byte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["ElementIndex"] = "15", ["ValidateResult"] = "firstOp[ElementIndex] != result"}), - ("StoreSelectedScalarTest.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector128_Double_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Double", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ElementIndex"] = "1", ["ValidateResult"] = "BitConverter.DoubleToInt64Bits(firstOp[ElementIndex]) != BitConverter.DoubleToInt64Bits(result)"}), - ("StoreSelectedScalarTest.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector128_Int16_7", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ElementIndex"] = "7", ["ValidateResult"] = "firstOp[ElementIndex] != result"}), - ("StoreSelectedScalarTest.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector128_Int32_3", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ElementIndex"] = "3", ["ValidateResult"] = "firstOp[ElementIndex] != result"}), - ("StoreSelectedScalarTest.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector128_Int64_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Int64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["ElementIndex"] = "1", ["ValidateResult"] = "firstOp[ElementIndex] != result"}), - ("StoreSelectedScalarTest.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector128_SByte_15", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "SByte", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["ElementIndex"] = "15", ["ValidateResult"] = "firstOp[ElementIndex] != result"}), - ("StoreSelectedScalarTest.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector128_Single_3", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "Single", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ElementIndex"] = "3", ["ValidateResult"] = "BitConverter.SingleToInt32Bits(firstOp[ElementIndex]) != BitConverter.SingleToInt32Bits(result)"}), - ("StoreSelectedScalarTest.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector128_UInt16_7", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["ElementIndex"] = "7", ["ValidateResult"] = "firstOp[ElementIndex] != result"}), - ("StoreSelectedScalarTest.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector128_UInt32_3", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ElementIndex"] = "3", ["ValidateResult"] = "firstOp[ElementIndex] != result"}), - ("StoreSelectedScalarTest.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector128_UInt64_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["RetVectorType"] = "Vector128", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["ElementIndex"] = "1", ["ValidateResult"] = "firstOp[ElementIndex] != result"}), + ("StoreSelectedScalarTest.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector64_Byte_7", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["ElementIndex"] = "7", ["ValidateResult"] = "firstOp[ElementIndex] != result"}), + ("StoreSelectedScalarTest.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector64_Int16_3", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ElementIndex"] = "3", ["ValidateResult"] = "firstOp[ElementIndex] != result"}), + ("StoreSelectedScalarTest.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector64_Int32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ElementIndex"] = "1", ["ValidateResult"] = "firstOp[ElementIndex] != result"}), + ("StoreSelectedScalarTest.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector64_SByte_7", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["ElementIndex"] = "7", ["ValidateResult"] = "firstOp[ElementIndex] != result"}), + ("StoreSelectedScalarTest.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector64_Single_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ElementIndex"] = "1", ["ValidateResult"] = "BitConverter.SingleToInt32Bits(firstOp[ElementIndex]) != BitConverter.SingleToInt32Bits(result)"}), + ("StoreSelectedScalarTest.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector64_UInt16_3", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["ElementIndex"] = "3", ["ValidateResult"] = "firstOp[ElementIndex] != result"}), + ("StoreSelectedScalarTest.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector64_UInt32_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "8", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ElementIndex"] = "1", ["ValidateResult"] = "firstOp[ElementIndex] != result"}), + ("StoreSelectedScalarTest.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector128_Byte_15", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetByte()", ["ElementIndex"] = "15", ["ValidateResult"] = "firstOp[ElementIndex] != result"}), + ("StoreSelectedScalarTest.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector128_Double_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["Op1BaseType"] = "Double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Double", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetDouble()", ["ElementIndex"] = "1", ["ValidateResult"] = "BitConverter.DoubleToInt64Bits(firstOp[ElementIndex]) != BitConverter.DoubleToInt64Bits(result)"}), + ("StoreSelectedScalarTest.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector128_Int16_7", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt16()", ["ElementIndex"] = "7", ["ValidateResult"] = "firstOp[ElementIndex] != result"}), + ("StoreSelectedScalarTest.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector128_Int32_3", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt32()", ["ElementIndex"] = "3", ["ValidateResult"] = "firstOp[ElementIndex] != result"}), + ("StoreSelectedScalarTest.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector128_Int64_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetInt64()", ["ElementIndex"] = "1", ["ValidateResult"] = "firstOp[ElementIndex] != result"}), + ("StoreSelectedScalarTest.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector128_SByte_15", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSByte()", ["ElementIndex"] = "15", ["ValidateResult"] = "firstOp[ElementIndex] != result"}), + ("StoreSelectedScalarTest.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector128_Single_3", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["Op1BaseType"] = "Single", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Single", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetSingle()", ["ElementIndex"] = "3", ["ValidateResult"] = "BitConverter.SingleToInt32Bits(firstOp[ElementIndex]) != BitConverter.SingleToInt32Bits(result)"}), + ("StoreSelectedScalarTest.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector128_UInt16_7", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["ElementIndex"] = "7", ["ValidateResult"] = "firstOp[ElementIndex] != result"}), + ("StoreSelectedScalarTest.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector128_UInt32_3", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["ElementIndex"] = "3", ["ValidateResult"] = "firstOp[ElementIndex] != result"}), + ("StoreSelectedScalarTest.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector128_UInt64_1", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["ElementIndex"] = "1", ["ValidateResult"] = "firstOp[ElementIndex] != result"}), + ("StoreSelectedScalarx2Test.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector64x2_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateResult"] = "input1[index] != result[0] || input2[index] != result[1]"}), + ("StoreSelectedScalarx2Test.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector64x2_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "8", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateResult"] = "input1[index] != result[0] || input2[index] != result[1]"}), + ("StoreSelectedScalarx2Test.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector64x2_UShort", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "8", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateResult"] = "input1[index] != result[0] || input2[index] != result[1]"}), + ("StoreSelectedScalarx2Test.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector64x2_Short", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateResult"] = "input1[index] != result[0] || input2[index] != result[1]"}), + ("StoreSelectedScalarx2Test.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector64x2_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "8", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateResult"] = "input1[index] != result[0] || input2[index] != result[1]"}), + ("StoreSelectedScalarx2Test.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector64x2_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateResult"] = "input1[index] != result[0] || input2[index] != result[1]"}), + ("StoreSelectedScalarx2Test.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector64x2_Float", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["Op1BaseType"] = "float", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "float", ["LargestVectorSize"] = "8", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateResult"] = "input1[index] != result[0] || input2[index] != result[1]"}), + ("StoreSelectedScalarx3Test.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector64x3_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateResult"] = "input1[index] != result[0] || input2[index] != result[1] || input3[index] != result[2]"}), + ("StoreSelectedScalarx3Test.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector64x3_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "8", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateResult"] = "input1[index] != result[0] || input2[index] != result[1] || input3[index] != result[2]"}), + ("StoreSelectedScalarx3Test.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector64x3_UShort", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "8", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateResult"] = "input1[index] != result[0] || input2[index] != result[1] || input3[index] != result[2]"}), + ("StoreSelectedScalarx3Test.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector64x3_Short", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateResult"] = "input1[index] != result[0] || input2[index] != result[1] || input3[index] != result[2]"}), + ("StoreSelectedScalarx3Test.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector64x3_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "8", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateResult"] = "input1[index] != result[0] || input2[index] != result[1] || input3[index] != result[2]"}), + ("StoreSelectedScalarx3Test.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector64x3_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateResult"] = "input1[index] != result[0] || input2[index] != result[1] || input3[index] != result[2]"}), + ("StoreSelectedScalarx3Test.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector64x3_Float", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["Op1BaseType"] = "float", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "float", ["LargestVectorSize"] = "8", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateResult"] = "input1[index] != result[0] || input2[index] != result[1] || input3[index] != result[2]"}), + ("StoreSelectedScalarx4Test.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector64x4_SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateResult"] = "input1[index] != result[0] || input2[index] != result[1] || input3[index] != result[2] || input4[index] != result[3]"}), + ("StoreSelectedScalarx4Test.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector64x4_Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "8", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateResult"] = "input1[index] != result[0] || input2[index] != result[1] || input3[index] != result[2] || input4[index] != result[3]"}), + ("StoreSelectedScalarx4Test.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector64x4_UShort", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "8", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateResult"] = "input1[index] != result[0] || input2[index] != result[1] || input3[index] != result[2] || input4[index] != result[3]"}), + ("StoreSelectedScalarx4Test.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector64x4_Short", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "8", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateResult"] = "input1[index] != result[0] || input2[index] != result[1] || input3[index] != result[2] || input4[index] != result[3]"}), + ("StoreSelectedScalarx4Test.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector64x4_UInt32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "8", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateResult"] = "input1[index] != result[0] || input2[index] != result[1] || input3[index] != result[2] || input4[index] != result[3]"}), + ("StoreSelectedScalarx4Test.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector64x4_Int32", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "8", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateResult"] = "input1[index] != result[0] || input2[index] != result[1] || input3[index] != result[2] || input4[index] != result[3]"}), + ("StoreSelectedScalarx4Test.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector64x4_Float", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["Op1BaseType"] = "float", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "float", ["LargestVectorSize"] = "8", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateResult"] = "input1[index] != result[0] || input2[index] != result[1] || input3[index] != result[2] || input4[index] != result[3]"}), ("StoreVectorx2Test.template", new Dictionary { ["TestName"] = "StoreVector64x2SByte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreVector64x2", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "8", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "input1[i] != result[i] || input2[i] != result[OpElementCount + i]"}), ("StoreVectorx2Test.template", new Dictionary { ["TestName"] = "StoreVector64x2Byte", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreVector64x2", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "8", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "input1[i] != result[i] || input2[i] != result[OpElementCount + i]"}), ("StoreVectorx2Test.template", new Dictionary { ["TestName"] = "StoreVector64x2UShort", ["Isa"] = "AdvSimd", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreVector64x2", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector64", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "8", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "input1[i] != result[i] || input2[i] != result[OpElementCount + i]"}), @@ -2521,6 +2542,36 @@ ("StoreBinOpTest.template", new Dictionary { ["TestName"] = "StorePairNonTemporal_Vector128_UInt16", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "StorePairNonTemporal", ["RetBaseType"] = "UInt16", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt16()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "Helpers.Concat(firstOp, secondOp, i) != result[i]"}), ("StoreBinOpTest.template", new Dictionary { ["TestName"] = "StorePairNonTemporal_Vector128_UInt32", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "StorePairNonTemporal", ["RetBaseType"] = "UInt32", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt32()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateIterResult"] = "Helpers.Concat(firstOp, secondOp, i) != result[i]"}), ("StoreBinOpTest.template", new Dictionary { ["TestName"] = "StorePairNonTemporal_Vector128_UInt64", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "StorePairNonTemporal", ["RetBaseType"] = "UInt64", ["Op1VectorType"] = "Vector128", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "32", ["NextValueOp1"] = "TestLibrary.Generator.GetUInt64()", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateIterResult"] = "Helpers.Concat(firstOp, secondOp, i) != result[i]"}), + ("StoreSelectedScalarx2Test.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector128x2_SByte", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateResult"] = "input1[index] != result[0] || input2[index] != result[1]"}), + ("StoreSelectedScalarx2Test.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector128x2_Byte", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateResult"] = "input1[index] != result[0] || input2[index] != result[1]"}), + ("StoreSelectedScalarx2Test.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector128x2_UShort", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateResult"] = "input1[index] != result[0] || input2[index] != result[1]"}), + ("StoreSelectedScalarx2Test.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector128x2_Short", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateResult"] = "input1[index] != result[0] || input2[index] != result[1]"}), + ("StoreSelectedScalarx2Test.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector128x2_UInt32", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateResult"] = "input1[index] != result[0] || input2[index] != result[1]"}), + ("StoreSelectedScalarx2Test.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector128x2_Int32", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateResult"] = "input1[index] != result[0] || input2[index] != result[1]"}), + ("StoreSelectedScalarx2Test.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector128x2_UInt64", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateResult"] = "input1[index] != result[0] || input2[index] != result[1]"}), + ("StoreSelectedScalarx2Test.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector128x2_Int64", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateResult"] = "input1[index] != result[0] || input2[index] != result[1]"}), + ("StoreSelectedScalarx2Test.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector128x2_Float", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["Op1BaseType"] = "float", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "float", ["LargestVectorSize"] = "16", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateResult"] = "input1[index] != result[0] || input2[index] != result[1]"}), + ("StoreSelectedScalarx2Test.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector128x2_Double", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["Op1BaseType"] = "double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "double", ["LargestVectorSize"] = "16", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateResult"] = "input1[index] != result[0] || input2[index] != result[1]"}), + ("StoreSelectedScalarx3Test.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector128x3_SByte", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateResult"] = "input1[index] != result[0] || input2[index] != result[1] || input3[index] != result[2]"}), + ("StoreSelectedScalarx3Test.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector128x3_Byte", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateResult"] = "input1[index] != result[0] || input2[index] != result[1] || input3[index] != result[2]"}), + ("StoreSelectedScalarx3Test.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector128x3_UShort", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateResult"] = "input1[index] != result[0] || input2[index] != result[1] || input3[index] != result[2]"}), + ("StoreSelectedScalarx3Test.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector128x3_Short", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateResult"] = "input1[index] != result[0] || input2[index] != result[1] || input3[index] != result[2]"}), + ("StoreSelectedScalarx3Test.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector128x3_UInt32", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateResult"] = "input1[index] != result[0] || input2[index] != result[1] || input3[index] != result[2]"}), + ("StoreSelectedScalarx3Test.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector128x3_Int32", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateResult"] = "input1[index] != result[0] || input2[index] != result[1] || input3[index] != result[2]"}), + ("StoreSelectedScalarx3Test.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector128x3_UInt64", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateResult"] = "input1[index] != result[0] || input2[index] != result[1] || input3[index] != result[2]"}), + ("StoreSelectedScalarx3Test.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector128x3_Int64", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateResult"] = "input1[index] != result[0] || input2[index] != result[1] || input3[index] != result[2]"}), + ("StoreSelectedScalarx3Test.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector128x3_Float", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["Op1BaseType"] = "float", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "float", ["LargestVectorSize"] = "16", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateResult"] = "input1[index] != result[0] || input2[index] != result[1] || input3[index] != result[2]"}), + ("StoreSelectedScalarx3Test.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector128x3_Double", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["Op1BaseType"] = "double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "double", ["LargestVectorSize"] = "16", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateResult"] = "input1[index] != result[0] || input2[index] != result[1] || input3[index] != result[2]"}), + ("StoreSelectedScalarx4Test.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector128x4_SByte", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateResult"] = "input1[index] != result[0] || input2[index] != result[1] || input3[index] != result[2] || input4[index] != result[3]"}), + ("StoreSelectedScalarx4Test.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector128x4_Byte", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateResult"] = "input1[index] != result[0] || input2[index] != result[1] || input3[index] != result[2] || input4[index] != result[3]"}), + ("StoreSelectedScalarx4Test.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector128x4_UShort", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateResult"] = "input1[index] != result[0] || input2[index] != result[1] || input3[index] != result[2] || input4[index] != result[3]"}), + ("StoreSelectedScalarx4Test.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector128x4_Short", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["Op1BaseType"] = "Int16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int16", ["LargestVectorSize"] = "16", ["NextValueOp2"] = "TestLibrary.Generator.GetInt16()", ["ValidateResult"] = "input1[index] != result[0] || input2[index] != result[1] || input3[index] != result[2] || input4[index] != result[3]"}), + ("StoreSelectedScalarx4Test.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector128x4_UInt32", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["Op1BaseType"] = "UInt32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt32", ["LargestVectorSize"] = "16", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt32()", ["ValidateResult"] = "input1[index] != result[0] || input2[index] != result[1] || input3[index] != result[2] || input4[index] != result[3]"}), + ("StoreSelectedScalarx4Test.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector128x4_Int32", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["Op1BaseType"] = "Int32", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int32", ["LargestVectorSize"] = "16", ["NextValueOp2"] = "TestLibrary.Generator.GetInt32()", ["ValidateResult"] = "input1[index] != result[0] || input2[index] != result[1] || input3[index] != result[2] || input4[index] != result[3]"}), + ("StoreSelectedScalarx4Test.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector128x4_UInt64", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["Op1BaseType"] = "UInt64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt64", ["LargestVectorSize"] = "16", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt64()", ["ValidateResult"] = "input1[index] != result[0] || input2[index] != result[1] || input3[index] != result[2] || input4[index] != result[3]"}), + ("StoreSelectedScalarx4Test.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector128x4_Int64", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["Op1BaseType"] = "Int64", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Int64", ["LargestVectorSize"] = "16", ["NextValueOp2"] = "TestLibrary.Generator.GetInt64()", ["ValidateResult"] = "input1[index] != result[0] || input2[index] != result[1] || input3[index] != result[2] || input4[index] != result[3]"}), + ("StoreSelectedScalarx4Test.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector128x4_Float", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["Op1BaseType"] = "float", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "float", ["LargestVectorSize"] = "16", ["NextValueOp2"] = "TestLibrary.Generator.GetSingle()", ["ValidateResult"] = "input1[index] != result[0] || input2[index] != result[1] || input3[index] != result[2] || input4[index] != result[3]"}), + ("StoreSelectedScalarx4Test.template", new Dictionary { ["TestName"] = "StoreSelectedScalar_Vector128x4_Double", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreSelectedScalar", ["Op1BaseType"] = "double", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "double", ["LargestVectorSize"] = "16", ["NextValueOp2"] = "TestLibrary.Generator.GetDouble()", ["ValidateResult"] = "input1[index] != result[0] || input2[index] != result[1] || input3[index] != result[2] || input4[index] != result[3]"}), ("StoreVectorx2Test.template", new Dictionary { ["TestName"] = "StoreVector128x2SByte", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreVector128x2", ["Op1BaseType"] = "SByte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "SByte", ["LargestVectorSize"] = "16", ["NextValueOp2"] = "TestLibrary.Generator.GetSByte()", ["ValidateIterResult"] = "input1[i] != result[i] || input2[i] != result[OpElementCount + i]"}), ("StoreVectorx2Test.template", new Dictionary { ["TestName"] = "StoreVector128x2Byte", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreVector128x2", ["Op1BaseType"] = "Byte", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "Byte", ["LargestVectorSize"] = "16", ["NextValueOp2"] = "TestLibrary.Generator.GetByte()", ["ValidateIterResult"] = "input1[i] != result[i] || input2[i] != result[OpElementCount + i]"}), ("StoreVectorx2Test.template", new Dictionary { ["TestName"] = "StoreVector128x2UShort", ["Isa"] = "AdvSimd.Arm64", ["LoadIsa"] = "AdvSimd", ["Method"] = "StoreVector128x2", ["Op1BaseType"] = "UInt16", ["Op2VectorType"] = "Vector128", ["Op2BaseType"] = "UInt16", ["LargestVectorSize"] = "16", ["NextValueOp2"] = "TestLibrary.Generator.GetUInt16()", ["ValidateIterResult"] = "input1[i] != result[i] || input2[i] != result[OpElementCount + i]"}), diff --git a/src/tests/JIT/HardwareIntrinsics/Arm/Shared/StoreSelectedScalarTest.template b/src/tests/JIT/HardwareIntrinsics/Arm/Shared/StoreSelectedScalarTest.template index 918616f32b51d..9a5e3346fcf9b 100644 --- a/src/tests/JIT/HardwareIntrinsics/Arm/Shared/StoreSelectedScalarTest.template +++ b/src/tests/JIT/HardwareIntrinsics/Arm/Shared/StoreSelectedScalarTest.template @@ -76,10 +76,10 @@ namespace JIT.HardwareIntrinsics.Arm private ulong alignment; - public DataTable({Op1BaseType}[] inArray1, {RetBaseType}[] outArray, int alignment) + public DataTable({Op2BaseType}[] inArray1, {Op1BaseType}[] outArray, int alignment) { - int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf<{Op1BaseType}>(); - int sizeOfoutArray = outArray.Length * Unsafe.SizeOf<{RetBaseType}>(); + int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf<{Op2BaseType}>(); + int sizeOfoutArray = outArray.Length * Unsafe.SizeOf<{Op1BaseType}>(); if ((alignment != 16 && alignment != 8) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfoutArray) { throw new ArgumentException("Invalid value of alignment"); @@ -93,7 +93,7 @@ namespace JIT.HardwareIntrinsics.Arm this.alignment = (ulong)alignment; - Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As<{Op1BaseType}, byte>(ref inArray1[0]), (uint)sizeOfinArray1); + Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As<{Op2BaseType}, byte>(ref inArray1[0]), (uint)sizeOfinArray1); } public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); @@ -113,21 +113,21 @@ namespace JIT.HardwareIntrinsics.Arm private struct TestStruct { - public {Op1VectorType}<{Op1BaseType}> _fld1; + public {Op2VectorType}<{Op2BaseType}> _fld1; public static TestStruct Create() { var testStruct = new TestStruct(); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = {NextValueOp1}; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1VectorType}<{Op1BaseType}>, byte>(ref testStruct._fld1), ref Unsafe.As<{Op1BaseType}, byte>(ref _data1[0]), (uint)Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>()); + Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op2VectorType}<{Op2BaseType}>, byte>(ref testStruct._fld1), ref Unsafe.As<{Op2BaseType}, byte>(ref _data1[0]), (uint)Unsafe.SizeOf<{Op2VectorType}<{Op2BaseType}>>()); return testStruct; } public void RunStructFldScenario(StoreSelectedScalarTest__{TestName} testClass) { - {Isa}.{Method}(({RetBaseType}*)testClass._dataTable.outArrayPtr, _fld1, {ElementIndex}); + {Isa}.{Method}(({Op1BaseType}*)testClass._dataTable.outArrayPtr, _fld1, {ElementIndex}); testClass.ValidateResult(_fld1, testClass._dataTable.outArrayPtr); } @@ -135,13 +135,13 @@ namespace JIT.HardwareIntrinsics.Arm private static readonly int LargestVectorSize = {LargestVectorSize}; - private static readonly int Op1ElementCount = Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>() / sizeof({Op1BaseType}); + private static readonly int Op1ElementCount = Unsafe.SizeOf<{Op2VectorType}<{Op2BaseType}>>() / sizeof({Op2BaseType}); private static readonly int RetElementCount = 1; private static readonly byte ElementIndex = {ElementIndex}; - private static {Op1BaseType}[] _data1 = new {Op1BaseType}[Op1ElementCount]; + private static {Op2BaseType}[] _data1 = new {Op2BaseType}[Op1ElementCount]; - private {Op1VectorType}<{Op1BaseType}> _fld1; + private {Op2VectorType}<{Op2BaseType}> _fld1; private DataTable _dataTable; @@ -150,10 +150,10 @@ namespace JIT.HardwareIntrinsics.Arm Succeeded = true; for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = {NextValueOp1}; } - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1VectorType}<{Op1BaseType}>, byte>(ref _fld1), ref Unsafe.As<{Op1BaseType}, byte>(ref _data1[0]), (uint)Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>()); + Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op2VectorType}<{Op2BaseType}>, byte>(ref _fld1), ref Unsafe.As<{Op2BaseType}, byte>(ref _data1[0]), (uint)Unsafe.SizeOf<{Op2VectorType}<{Op2BaseType}>>()); for (var i = 0; i < Op1ElementCount; i++) { _data1[i] = {NextValueOp1}; } - _dataTable = new DataTable(_data1, new {RetBaseType}[RetElementCount], LargestVectorSize); + _dataTable = new DataTable(_data1, new {Op1BaseType}[RetElementCount], LargestVectorSize); } public bool IsSupported => {Isa}.IsSupported; @@ -164,7 +164,7 @@ namespace JIT.HardwareIntrinsics.Arm { TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); - {Isa}.{Method}(({RetBaseType}*)_dataTable.outArrayPtr, Unsafe.Read<{Op1VectorType}<{Op1BaseType}>>(_dataTable.inArray1Ptr), {ElementIndex}); + {Isa}.{Method}(({Op1BaseType}*)_dataTable.outArrayPtr, Unsafe.Read<{Op2VectorType}<{Op2BaseType}>>(_dataTable.inArray1Ptr), {ElementIndex}); ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); } @@ -173,7 +173,7 @@ namespace JIT.HardwareIntrinsics.Arm { TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); - {Isa}.{Method}(({RetBaseType}*)_dataTable.outArrayPtr, {LoadIsa}.Load{Op1VectorType}(({Op1BaseType}*)(_dataTable.inArray1Ptr)), {ElementIndex}); + {Isa}.{Method}(({Op1BaseType}*)_dataTable.outArrayPtr, {LoadIsa}.Load{Op2VectorType}(({Op2BaseType}*)(_dataTable.inArray1Ptr)), {ElementIndex}); ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); } @@ -182,10 +182,10 @@ namespace JIT.HardwareIntrinsics.Arm { TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); - typeof({Isa}).GetMethod(nameof({Isa}.{Method}), new Type[] { typeof({RetBaseType}*), typeof({Op1VectorType}<{Op1BaseType}>), typeof(byte) }) + typeof({Isa}).GetMethod(nameof({Isa}.{Method}), new Type[] { typeof({Op1BaseType}*), typeof({Op2VectorType}<{Op2BaseType}>), typeof(byte) }) .Invoke(null, new object[] { - Pointer.Box(_dataTable.outArrayPtr, typeof({RetBaseType}*)), - Unsafe.Read<{Op1VectorType}<{Op1BaseType}>>(_dataTable.inArray1Ptr), + Pointer.Box(_dataTable.outArrayPtr, typeof({Op1BaseType}*)), + Unsafe.Read<{Op2VectorType}<{Op2BaseType}>>(_dataTable.inArray1Ptr), ElementIndex }); ValidateResult(_dataTable.inArray1Ptr, _dataTable.outArrayPtr); @@ -195,8 +195,8 @@ namespace JIT.HardwareIntrinsics.Arm { TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); - var op1 = Unsafe.Read<{Op1VectorType}<{Op1BaseType}>>(_dataTable.inArray1Ptr); - {Isa}.{Method}(({RetBaseType}*)_dataTable.outArrayPtr, op1, {ElementIndex}); + var op1 = Unsafe.Read<{Op2VectorType}<{Op2BaseType}>>(_dataTable.inArray1Ptr); + {Isa}.{Method}(({Op1BaseType}*)_dataTable.outArrayPtr, op1, {ElementIndex}); ValidateResult(op1, _dataTable.outArrayPtr); } @@ -205,7 +205,7 @@ namespace JIT.HardwareIntrinsics.Arm { TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); - {Isa}.{Method}(({RetBaseType}*)_dataTable.outArrayPtr, _fld1, {ElementIndex}); + {Isa}.{Method}(({Op1BaseType}*)_dataTable.outArrayPtr, _fld1, {ElementIndex}); ValidateResult(_fld1, _dataTable.outArrayPtr); } @@ -215,7 +215,7 @@ namespace JIT.HardwareIntrinsics.Arm TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); var test = TestStruct.Create(); - {Isa}.{Method}(({RetBaseType}*)_dataTable.outArrayPtr, test._fld1, {ElementIndex}); + {Isa}.{Method}(({Op1BaseType}*)_dataTable.outArrayPtr, test._fld1, {ElementIndex}); ValidateResult(test._fld1, _dataTable.outArrayPtr); } @@ -249,29 +249,29 @@ namespace JIT.HardwareIntrinsics.Arm } } - private void ValidateResult({Op1VectorType}<{Op1BaseType}> op1, void* result, [CallerMemberName] string method = "") + private void ValidateResult({Op2VectorType}<{Op2BaseType}> op1, void* result, [CallerMemberName] string method = "") { - {Op1BaseType}[] inArray1 = new {Op1BaseType}[Op1ElementCount]; - {RetBaseType}[] outArray = new {RetBaseType}[RetElementCount]; + {Op2BaseType}[] inArray1 = new {Op2BaseType}[Op1ElementCount]; + {Op1BaseType}[] outArray = new {Op1BaseType}[RetElementCount]; - Unsafe.WriteUnaligned(ref Unsafe.As<{Op1BaseType}, byte>(ref inArray1[0]), op1); - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{RetBaseType}, byte>(ref outArray[0]), ref Unsafe.AsRef(result),(uint)(Unsafe.SizeOf<{RetBaseType}>() * RetElementCount)); + Unsafe.WriteUnaligned(ref Unsafe.As<{Op2BaseType}, byte>(ref inArray1[0]), op1); + Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1BaseType}, byte>(ref outArray[0]), ref Unsafe.AsRef(result),(uint)(Unsafe.SizeOf<{Op1BaseType}>() * RetElementCount)); ValidateResult(inArray1, outArray[0], method); } private void ValidateResult(void* op1, void* result, [CallerMemberName] string method = "") { - {Op1BaseType}[] inArray1 = new {Op1BaseType}[Op1ElementCount]; - {RetBaseType}[] outArray = new {RetBaseType}[RetElementCount]; + {Op2BaseType}[] inArray1 = new {Op2BaseType}[Op1ElementCount]; + {Op1BaseType}[] outArray = new {Op1BaseType}[RetElementCount]; - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1BaseType}, byte>(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf<{Op1VectorType}<{Op1BaseType}>>()); - Unsafe.CopyBlockUnaligned(ref Unsafe.As<{RetBaseType}, byte>(ref outArray[0]), ref Unsafe.AsRef(result), (uint)(Unsafe.SizeOf<{RetBaseType}>() * RetElementCount)); + Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op2BaseType}, byte>(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf<{Op2VectorType}<{Op2BaseType}>>()); + Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1BaseType}, byte>(ref outArray[0]), ref Unsafe.AsRef(result), (uint)(Unsafe.SizeOf<{Op1BaseType}>() * RetElementCount)); ValidateResult(inArray1, outArray[0], method); } - private void ValidateResult({Op1BaseType}[] firstOp, {RetBaseType} result, [CallerMemberName] string method = "") + private void ValidateResult({Op2BaseType}[] firstOp, {Op1BaseType} result, [CallerMemberName] string method = "") { bool succeeded = true; @@ -282,7 +282,7 @@ namespace JIT.HardwareIntrinsics.Arm if (!succeeded) { - TestLibrary.TestFramework.LogInformation($"{nameof({Isa})}.{nameof({Isa}.{Method})}<{RetBaseType}>({Op1BaseType}*, {Op1VectorType}<{Op1BaseType}>, {ElementIndex}): {method} failed:"); + TestLibrary.TestFramework.LogInformation($"{nameof({Isa})}.{nameof({Isa}.{Method})}<{Op1BaseType}>({Op2BaseType}*, {Op2VectorType}<{Op2BaseType}>, {ElementIndex}): {method} failed:"); TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); TestLibrary.TestFramework.LogInformation(string.Empty); diff --git a/src/tests/JIT/HardwareIntrinsics/Arm/Shared/StoreSelectedScalarx2Test.template b/src/tests/JIT/HardwareIntrinsics/Arm/Shared/StoreSelectedScalarx2Test.template new file mode 100644 index 0000000000000..4aa717e4edcea --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/Arm/Shared/StoreSelectedScalarx2Test.template @@ -0,0 +1,313 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +/****************************************************************************** + * This file is auto-generated from a template file by the GenerateTests.csx * + * script in src\tests\JIT\HardwareIntrinsics\Arm\Shared. In order to make * + * changes, please update the corresponding template and run according to the * + * directions listed in the file. * + ******************************************************************************/ + +using System; +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Runtime.Intrinsics; +using System.Runtime.Intrinsics.Arm; +using Xunit; + +namespace JIT.HardwareIntrinsics.Arm +{ + public static partial class Program + { + [Fact] + public static void {TestName}() + { + var test = new StoreSelectedScalarx2Test__{Op1BaseType}(); + if (test.IsSupported) + { + // Validates basic functionality works, using Unsafe.Read + test.RunBasicScenario_UnsafeRead(); + + if ({LoadIsa}.IsSupported) + { + // Validates basic functionality works, using Load + test.RunBasicScenario_Load(); + } + + // Validates calling via reflection works, using Unsafe.Read + test.RunReflectionScenario_UnsafeRead(); + + // Validates passing a local works, using Unsafe.Read + test.RunLclVarScenario_UnsafeRead(); + + // Validates passing an instance member of a class works + test.RunClassFldScenario(); + + // Validates passing the field of a local struct works + test.RunStructLclFldScenario(); + + // Validates passing an instance member of a struct works + test.RunStructFldScenario(); + } + else + { + // Validates we throw on unsupported hardware + test.RunUnsupportedScenario(); + } + + if (!test.Succeeded) + { + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } + + public sealed unsafe class StoreSelectedScalarx2Test__{Op1BaseType} + { + private struct DataTable + { + private byte[] inArray1; + private byte[] inArray2; + private byte[] outArray; + + private GCHandle inHandle1; + private GCHandle inHandle2; + private GCHandle outHandle; + + private ulong alignment; + + public DataTable({Op2BaseType}[] inArray1, {Op2BaseType}[] inArray2, {Op1BaseType}[] outArray, int alignment) + { + int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf<{Op2BaseType}>(); + int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf<{Op2BaseType}>(); + int sizeOfoutArray = outArray.Length * Unsafe.SizeOf<{Op1BaseType}>(); + if ((alignment != 16 && alignment != 8) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfoutArray) + { + throw new ArgumentException("Invalid value of alignment"); + } + + this.inArray1 = new byte[alignment * 2]; + this.inArray2 = new byte[alignment * 2]; + this.outArray = new byte[alignment * 2]; + + this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); + this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); + this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); + + this.alignment = (ulong)alignment; + + Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As<{Op2BaseType}, byte>(ref inArray1[0]), (uint)sizeOfinArray1); + Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As<{Op2BaseType}, byte>(ref inArray2[0]), (uint)sizeOfinArray2); + } + + public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); + public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); + public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); + + public void Dispose() + { + inHandle1.Free(); + inHandle2.Free(); + outHandle.Free(); + } + + private static unsafe void* Align(byte* buffer, ulong expectedAlignment) + { + return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); + } + } + + private struct TestStruct + { + public {Op2VectorType}<{Op2BaseType}> _fld1; + public {Op2VectorType}<{Op2BaseType}> _fld2; + public byte elemIndex; + + public static TestStruct Create() + { + var testStruct = new TestStruct(); + + for (var i = 0; i < OpElementCount; i++) { _data1[i] = {NextValueOp2}; _data2[i] = {NextValueOp2}; } + Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op2VectorType}<{Op2BaseType}>, byte>(ref testStruct._fld1), ref Unsafe.As<{Op2BaseType}, byte>(ref _data1[0]), (uint)Unsafe.SizeOf<{Op2VectorType}<{Op2BaseType}>>()); + Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op2VectorType}<{Op2BaseType}>, byte>(ref testStruct._fld2), ref Unsafe.As<{Op2BaseType}, byte>(ref _data2[0]), (uint)Unsafe.SizeOf<{Op2VectorType}<{Op2BaseType}>>()); + testStruct.elemIndex = (byte) (TestLibrary.Generator.GetByte() % OpElementCount); + + return testStruct; + } + + public void RunStructFldScenario(StoreSelectedScalarx2Test__{Op1BaseType} testClass) + { + {Isa}.{Method}(({Op1BaseType}*)testClass._dataTable.outArrayPtr, (_fld1, _fld2), elemIndex); + testClass.ValidateResult(_fld1, _fld2, testClass._dataTable.outArrayPtr, elemIndex); + } + } + + private static readonly int LargestVectorSize = {LargestVectorSize}; + + private static readonly int OpElementCount = Unsafe.SizeOf<{Op2VectorType}<{Op2BaseType}>>() / sizeof({Op2BaseType}); + private static readonly int DestElementCount = 2; + + private static {Op2BaseType}[] _data1 = new {Op2BaseType}[OpElementCount]; + private static {Op2BaseType}[] _data2 = new {Op2BaseType}[OpElementCount]; + + private {Op2VectorType}<{Op2BaseType}> _fld1; + private {Op2VectorType}<{Op2BaseType}> _fld2; + + public byte elemIndex; + + private DataTable _dataTable; + + public StoreSelectedScalarx2Test__{Op1BaseType}() + { + Succeeded = true; + for (var i = 0; i < OpElementCount; i++) { _data1[i] = {NextValueOp2}; _data2[i] = {NextValueOp2}; } + Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op2VectorType}<{Op2BaseType}>, byte>(ref _fld1), ref Unsafe.As<{Op2BaseType}, byte>(ref _data1[0]), (uint)Unsafe.SizeOf<{Op2VectorType}<{Op2BaseType}>>()); + Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op2VectorType}<{Op2BaseType}>, byte>(ref _fld2), ref Unsafe.As<{Op2BaseType}, byte>(ref _data2[0]), (uint)Unsafe.SizeOf<{Op2VectorType}<{Op2BaseType}>>()); + for (var i = 0; i < OpElementCount; i++) { _data1[i] = {NextValueOp2}; _data2[i] = {NextValueOp2}; } + _dataTable = new DataTable(_data1, _data2, new {Op1BaseType}[DestElementCount], LargestVectorSize); + elemIndex = (byte) (TestLibrary.Generator.GetByte() % OpElementCount); + } + + public bool IsSupported => {Isa}.IsSupported; + + public bool Succeeded { get; set; } + + public void RunBasicScenario_UnsafeRead() + { + TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); + + {Isa}.{Method}(({Op1BaseType}*)_dataTable.outArrayPtr, (Unsafe.Read<{Op2VectorType}<{Op2BaseType}>>(_dataTable.inArray1Ptr), Unsafe.Read<{Op2VectorType}<{Op2BaseType}>>(_dataTable.inArray2Ptr)), elemIndex); + + ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr, elemIndex); + } + + public void RunBasicScenario_Load() + { + TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); + + {Isa}.{Method}(({Op1BaseType}*)_dataTable.outArrayPtr, ({LoadIsa}.Load{Op2VectorType}(({Op1BaseType}*)(_dataTable.inArray1Ptr)), {LoadIsa}.Load{Op2VectorType}(({Op1BaseType}*)(_dataTable.inArray2Ptr))), elemIndex); + + ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr, elemIndex); + } + + public void RunReflectionScenario_UnsafeRead() + { + TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); + + typeof({Isa}).GetMethod(nameof({Isa}.{Method}), new Type[] { typeof({Op1BaseType}*), typeof(({Op2VectorType}<{Op2BaseType}>, {Op2VectorType}<{Op2BaseType}>)), typeof(byte)}). + Invoke(null, new object[] { + Pointer.Box(_dataTable.outArrayPtr, typeof({Op1BaseType}*)), + (Unsafe.Read<{Op2VectorType}<{Op2BaseType}>>(_dataTable.inArray1Ptr), Unsafe.Read<{Op2VectorType}<{Op2BaseType}>>(_dataTable.inArray2Ptr)), elemIndex}); + + ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.outArrayPtr, elemIndex); + } + + public void RunLclVarScenario_UnsafeRead() + { + TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); + + var op1 = Unsafe.Read<{Op2VectorType}<{Op2BaseType}>>(_dataTable.inArray1Ptr); + var op2 = Unsafe.Read<{Op2VectorType}<{Op2BaseType}>>(_dataTable.inArray2Ptr); + {Isa}.{Method}(({Op1BaseType}*)_dataTable.outArrayPtr, (op1, op2), elemIndex); + + ValidateResult(op1, op2, _dataTable.outArrayPtr, elemIndex); + } + + public void RunClassFldScenario() + { + TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); + + {Isa}.{Method}(({Op1BaseType}*)_dataTable.outArrayPtr, (_fld1, _fld2), elemIndex); + + ValidateResult(_fld1, _fld2, _dataTable.outArrayPtr, elemIndex); + } + + public void RunStructLclFldScenario() + { + TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); + + var test = TestStruct.Create(); + {Isa}.{Method}(({Op1BaseType}*)_dataTable.outArrayPtr, (test._fld1, test._fld2), test.elemIndex); + + ValidateResult(test._fld1, test._fld2, _dataTable.outArrayPtr, test.elemIndex); + } + + public void RunStructFldScenario() + { + TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); + + var test = TestStruct.Create(); + test.RunStructFldScenario(this); + } + + public void RunUnsupportedScenario() + { + TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); + + bool succeeded = false; + + try + { + RunBasicScenario_UnsafeRead(); + } + catch (PlatformNotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + Succeeded = false; + } + } + + private void ValidateResult(void* op1, void* op2, void* result, byte index, [CallerMemberName] string method = "") + { + {Op2BaseType}[] inArray1 = new {Op2BaseType}[OpElementCount]; + {Op2BaseType}[] inArray2 = new {Op2BaseType}[OpElementCount]; + {Op1BaseType}[] outArray = new {Op1BaseType}[DestElementCount]; + + Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op2BaseType}, byte>(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf<{Op2VectorType}<{Op2BaseType}>>()); + Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op2BaseType}, byte>(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf<{Op2VectorType}<{Op2BaseType}>>()); + Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1BaseType}, byte>(ref outArray[0]), ref Unsafe.AsRef(result), (uint)sizeof({Op1BaseType}) * 2); + + ValidateResult(inArray1, inArray2, outArray, index, method); + } + + private void ValidateResult({Op2BaseType}[] input1, {Op2BaseType}[] input2, {Op1BaseType}[] result, byte index, [CallerMemberName] string method = "") + { + bool succeeded = true; + + if (input1[index] != result[0] || input2[index] != result[1]) + { + succeeded = false; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"{nameof({Isa})}.{nameof({Isa}.{Method})}<{Op2BaseType}>({Op2VectorType}<{Op2BaseType}>): {Method} failed:"); + TestLibrary.TestFramework.LogInformation($" input1: ({string.Join(", ", input1)})"); + TestLibrary.TestFramework.LogInformation($" input2: ({string.Join(", ", input2)})"); + TestLibrary.TestFramework.LogInformation($" index: ({string.Join(", ", index)})"); + TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); + TestLibrary.TestFramework.LogInformation(string.Empty); + + Succeeded = false; + } + } + + private void ValidateResult({Op2VectorType}<{Op2BaseType}> op1, {Op2VectorType}<{Op2BaseType}> op2, void* result, byte index, [CallerMemberName] string method = "") + { + {Op2BaseType}[] inArray1 = new {Op2BaseType}[OpElementCount]; + {Op2BaseType}[] inArray2 = new {Op2BaseType}[OpElementCount]; + {Op1BaseType}[] outArray = new {Op1BaseType}[DestElementCount]; + + Unsafe.WriteUnaligned(ref Unsafe.As<{Op2BaseType}, byte>(ref inArray1[0]), op1); + Unsafe.WriteUnaligned(ref Unsafe.As<{Op2BaseType}, byte>(ref inArray2[0]), op2); + Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1BaseType}, byte>(ref outArray[0]), ref Unsafe.AsRef(result), (uint)sizeof({Op1BaseType}) * 2); + + ValidateResult(inArray1, inArray2, outArray, index, method); + } + } +} \ No newline at end of file diff --git a/src/tests/JIT/HardwareIntrinsics/Arm/Shared/StoreSelectedScalarx3Test.template b/src/tests/JIT/HardwareIntrinsics/Arm/Shared/StoreSelectedScalarx3Test.template new file mode 100644 index 0000000000000..25be2aa49af51 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/Arm/Shared/StoreSelectedScalarx3Test.template @@ -0,0 +1,332 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +/****************************************************************************** + * This file is auto-generated from a template file by the GenerateTests.csx * + * script in src\tests\JIT\HardwareIntrinsics\Arm\Shared. In order to make * + * changes, please update the corresponding template and run according to the * + * directions listed in the file. * + ******************************************************************************/ + +using System; +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Runtime.Intrinsics; +using System.Runtime.Intrinsics.Arm; +using Xunit; + +namespace JIT.HardwareIntrinsics.Arm +{ + public static partial class Program + { + [Fact] + public static void {TestName}() + { + var test = new {Method}x3Test__{Op1BaseType}(); + if (test.IsSupported) + { + // Validates basic functionality works, using Unsafe.Read + test.RunBasicScenario_UnsafeRead(); + + if ({LoadIsa}.IsSupported) + { + // Validates basic functionality works, using Load + test.RunBasicScenario_Load(); + } + + // Validates calling via reflection works, using Unsafe.Read + test.RunReflectionScenario_UnsafeRead(); + + // Validates passing a local works, using Unsafe.Read + test.RunLclVarScenario_UnsafeRead(); + + // Validates passing an instance member of a class works + test.RunClassFldScenario(); + + // Validates passing the field of a local struct works + test.RunStructLclFldScenario(); + + // Validates passing an instance member of a struct works + test.RunStructFldScenario(); + } + else + { + // Validates we throw on unsupported hardware + test.RunUnsupportedScenario(); + } + + if (!test.Succeeded) + { + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } + + public sealed unsafe class {Method}x3Test__{Op1BaseType} + { + private struct DataTable + { + private byte[] inArray1; + private byte[] inArray2; + private byte[] inArray3; + private byte[] outArray; + + private GCHandle inHandle1; + private GCHandle inHandle2; + private GCHandle inHandle3; + private GCHandle outHandle; + + private ulong alignment; + + public DataTable({Op2BaseType}[] inArray1, {Op2BaseType}[] inArray2, {Op2BaseType}[] inArray3, {Op1BaseType}[] outArray, int alignment) + { + int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf<{Op2BaseType}>(); + int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf<{Op2BaseType}>(); + int sizeOfinArray3 = inArray3.Length * Unsafe.SizeOf<{Op2BaseType}>(); + int sizeOfoutArray = outArray.Length * Unsafe.SizeOf<{Op1BaseType}>(); + if ((alignment != 16 && alignment != 8) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfoutArray) + { + throw new ArgumentException("Invalid value of alignment"); + } + + this.inArray1 = new byte[alignment * 2]; + this.inArray2 = new byte[alignment * 2]; + this.inArray3 = new byte[alignment * 2]; + this.outArray = new byte[alignment * 2]; + + this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); + this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); + this.inHandle3 = GCHandle.Alloc(this.inArray3, GCHandleType.Pinned); + this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); + + this.alignment = (ulong)alignment; + + Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As<{Op2BaseType}, byte>(ref inArray1[0]), (uint)sizeOfinArray1); + Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As<{Op2BaseType}, byte>(ref inArray2[0]), (uint)sizeOfinArray2); + Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray3Ptr), ref Unsafe.As<{Op2BaseType}, byte>(ref inArray3[0]), (uint)sizeOfinArray3); + } + + public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); + public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); + public void* inArray3Ptr => Align((byte*)(inHandle3.AddrOfPinnedObject().ToPointer()), alignment); + public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); + + public void Dispose() + { + inHandle1.Free(); + inHandle2.Free(); + inHandle3.Free(); + outHandle.Free(); + } + + private static unsafe void* Align(byte* buffer, ulong expectedAlignment) + { + return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); + } + } + + private struct TestStruct + { + public {Op2VectorType}<{Op2BaseType}> _fld1; + public {Op2VectorType}<{Op2BaseType}> _fld2; + public {Op2VectorType}<{Op2BaseType}> _fld3; + public byte elemIndex; + + public static TestStruct Create() + { + var testStruct = new TestStruct(); + + for (var i = 0; i < OpElementCount; i++) { _data1[i] = {NextValueOp2}; _data2[i] = {NextValueOp2}; _data3[i] = {NextValueOp2}; } + Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op2VectorType}<{Op2BaseType}>, byte>(ref testStruct._fld1), ref Unsafe.As<{Op2BaseType}, byte>(ref _data1[0]), (uint)Unsafe.SizeOf<{Op2VectorType}<{Op2BaseType}>>()); + Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op2VectorType}<{Op2BaseType}>, byte>(ref testStruct._fld2), ref Unsafe.As<{Op2BaseType}, byte>(ref _data2[0]), (uint)Unsafe.SizeOf<{Op2VectorType}<{Op2BaseType}>>()); + Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op2VectorType}<{Op2BaseType}>, byte>(ref testStruct._fld3), ref Unsafe.As<{Op2BaseType}, byte>(ref _data3[0]), (uint)Unsafe.SizeOf<{Op2VectorType}<{Op2BaseType}>>()); + testStruct.elemIndex = (byte) (TestLibrary.Generator.GetByte() % OpElementCount); + + return testStruct; + } + + public void RunStructFldScenario({Method}x3Test__{Op1BaseType} testClass) + { + {Isa}.{Method}(({Op1BaseType}*)testClass._dataTable.outArrayPtr, (_fld1, _fld2, _fld3), elemIndex); + testClass.ValidateResult(_fld1, _fld2, _fld3, testClass._dataTable.outArrayPtr, elemIndex); + } + } + + private static readonly int LargestVectorSize = {LargestVectorSize}; + + private static readonly int OpElementCount = Unsafe.SizeOf<{Op2VectorType}<{Op2BaseType}>>() / sizeof({Op2BaseType}); + private static readonly int DestElementCount = 3; + + private static {Op2BaseType}[] _data1 = new {Op2BaseType}[OpElementCount]; + private static {Op2BaseType}[] _data2 = new {Op2BaseType}[OpElementCount]; + private static {Op2BaseType}[] _data3 = new {Op2BaseType}[OpElementCount]; + + private {Op2VectorType}<{Op2BaseType}> _fld1; + private {Op2VectorType}<{Op2BaseType}> _fld2; + private {Op2VectorType}<{Op2BaseType}> _fld3; + + public byte elemIndex; + + private DataTable _dataTable; + + public {Method}x3Test__{Op1BaseType}() + { + Succeeded = true; + for (var i = 0; i < OpElementCount; i++) { _data1[i] = {NextValueOp2}; _data2[i] = {NextValueOp2}; _data3[i] = {NextValueOp2}; } + Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op2VectorType}<{Op2BaseType}>, byte>(ref _fld1), ref Unsafe.As<{Op2BaseType}, byte>(ref _data1[0]), (uint)Unsafe.SizeOf<{Op2VectorType}<{Op2BaseType}>>()); + Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op2VectorType}<{Op2BaseType}>, byte>(ref _fld2), ref Unsafe.As<{Op2BaseType}, byte>(ref _data2[0]), (uint)Unsafe.SizeOf<{Op2VectorType}<{Op2BaseType}>>()); + Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op2VectorType}<{Op2BaseType}>, byte>(ref _fld3), ref Unsafe.As<{Op2BaseType}, byte>(ref _data3[0]), (uint)Unsafe.SizeOf<{Op2VectorType}<{Op2BaseType}>>()); + for (var i = 0; i < OpElementCount; i++) { _data1[i] = {NextValueOp2}; _data2[i] = {NextValueOp2}; _data3[i] = {NextValueOp2}; } + _dataTable = new DataTable(_data1, _data2, _data3, new {Op1BaseType}[DestElementCount], LargestVectorSize); + elemIndex = (byte) (TestLibrary.Generator.GetByte() % OpElementCount); + } + + public bool IsSupported => {Isa}.IsSupported; + + public bool Succeeded { get; set; } + + public void RunBasicScenario_UnsafeRead() + { + TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); + + {Isa}.{Method}(({Op1BaseType}*)_dataTable.outArrayPtr, (Unsafe.Read<{Op2VectorType}<{Op2BaseType}>>(_dataTable.inArray1Ptr), Unsafe.Read<{Op2VectorType}<{Op2BaseType}>>(_dataTable.inArray2Ptr), Unsafe.Read<{Op2VectorType}<{Op2BaseType}>>(_dataTable.inArray3Ptr)), elemIndex); + + ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr, elemIndex); + } + + public void RunBasicScenario_Load() + { + TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); + + {Isa}.{Method}(({Op1BaseType}*)_dataTable.outArrayPtr, ({LoadIsa}.Load{Op2VectorType}(({Op2BaseType}*)(_dataTable.inArray1Ptr)), {LoadIsa}.Load{Op2VectorType}(({Op2BaseType}*)(_dataTable.inArray2Ptr)), {LoadIsa}.Load{Op2VectorType}(({Op2BaseType}*)(_dataTable.inArray3Ptr))), elemIndex); + + ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr, elemIndex); + } + + public void RunReflectionScenario_UnsafeRead() + { + TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); + + typeof({Isa}).GetMethod(nameof({Isa}.{Method}), new Type[] { typeof({Op1BaseType}*), typeof(({Op2VectorType}<{Op2BaseType}>, {Op2VectorType}<{Op2BaseType}>, {Op2VectorType}<{Op2BaseType}>)), typeof(byte)}). + Invoke(null, new object[] { + Pointer.Box(_dataTable.outArrayPtr, typeof({Op1BaseType}*)), + (Unsafe.Read<{Op2VectorType}<{Op2BaseType}>>(_dataTable.inArray1Ptr), Unsafe.Read<{Op2VectorType}<{Op2BaseType}>>(_dataTable.inArray2Ptr), Unsafe.Read<{Op2VectorType}<{Op2BaseType}>>(_dataTable.inArray3Ptr)), elemIndex}); + + ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.outArrayPtr, elemIndex); + } + + public void RunLclVarScenario_UnsafeRead() + { + TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); + + var op1 = Unsafe.Read<{Op2VectorType}<{Op2BaseType}>>(_dataTable.inArray1Ptr); + var op2 = Unsafe.Read<{Op2VectorType}<{Op2BaseType}>>(_dataTable.inArray2Ptr); + var op3 = Unsafe.Read<{Op2VectorType}<{Op2BaseType}>>(_dataTable.inArray3Ptr); + {Isa}.{Method}(({Op1BaseType}*)_dataTable.outArrayPtr, (op1, op2, op3), elemIndex); + + ValidateResult(op1, op2, op3, _dataTable.outArrayPtr, elemIndex); + } + + public void RunClassFldScenario() + { + TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); + + {Isa}.{Method}(({Op1BaseType}*)_dataTable.outArrayPtr, (_fld1, _fld2, _fld3), elemIndex); + + ValidateResult(_fld1, _fld2, _fld3, _dataTable.outArrayPtr, elemIndex); + } + + public void RunStructLclFldScenario() + { + TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); + + var test = TestStruct.Create(); + {Isa}.{Method}(({Op1BaseType}*)_dataTable.outArrayPtr, (test._fld1, test._fld2, test._fld3), test.elemIndex); + + ValidateResult(test._fld1, test._fld2, test._fld3, _dataTable.outArrayPtr, test.elemIndex); + } + + public void RunStructFldScenario() + { + TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); + + var test = TestStruct.Create(); + test.RunStructFldScenario(this); + } + + public void RunUnsupportedScenario() + { + TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); + + bool succeeded = false; + + try + { + RunBasicScenario_UnsafeRead(); + } + catch (PlatformNotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + Succeeded = false; + } + } + + private void ValidateResult(void* op1, void* op2, void* op3, void* result, byte index, [CallerMemberName] string method = "") + { + {Op2BaseType}[] inArray1 = new {Op2BaseType}[OpElementCount]; + {Op2BaseType}[] inArray2 = new {Op2BaseType}[OpElementCount]; + {Op2BaseType}[] inArray3 = new {Op2BaseType}[OpElementCount]; + {Op1BaseType}[] outArray = new {Op1BaseType}[DestElementCount]; + + Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op2BaseType}, byte>(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf<{Op2VectorType}<{Op2BaseType}>>()); + Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op2BaseType}, byte>(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf<{Op2VectorType}<{Op2BaseType}>>()); + Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op2BaseType}, byte>(ref inArray3[0]), ref Unsafe.AsRef(op3), (uint)Unsafe.SizeOf<{Op2VectorType}<{Op2BaseType}>>()); + Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1BaseType}, byte>(ref outArray[0]), ref Unsafe.AsRef(result), (uint)sizeof({Op1BaseType}) * 3); + + ValidateResult(inArray1, inArray2, inArray3, outArray, index, method); + } + + private void ValidateResult({Op2BaseType}[] input1, {Op2BaseType}[] input2, {Op2BaseType}[] input3, {Op1BaseType}[] result, byte index, [CallerMemberName] string method = "") + { + bool succeeded = true; + + if ({ValidateResult}) + { + succeeded = false; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"{nameof({Isa})}.{nameof({Isa}.{Method})}<{Op2BaseType}>({Op2VectorType}<{Op2BaseType}>): {Method} failed:"); + TestLibrary.TestFramework.LogInformation($" input1: ({string.Join(", ", input1)})"); + TestLibrary.TestFramework.LogInformation($" input2: ({string.Join(", ", input2)})"); + TestLibrary.TestFramework.LogInformation($" input3: ({string.Join(", ", input3)})"); + TestLibrary.TestFramework.LogInformation($" index: ({string.Join(", ", index)})"); + TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); + TestLibrary.TestFramework.LogInformation(string.Empty); + + Succeeded = false; + } + } + + private void ValidateResult({Op2VectorType}<{Op2BaseType}> op1, {Op2VectorType}<{Op2BaseType}> op2, {Op2VectorType}<{Op2BaseType}> op3, void* result, byte index, [CallerMemberName] string method = "") + { + {Op2BaseType}[] inArray1 = new {Op2BaseType}[OpElementCount]; + {Op2BaseType}[] inArray2 = new {Op2BaseType}[OpElementCount]; + {Op2BaseType}[] inArray3 = new {Op2BaseType}[OpElementCount]; + {Op1BaseType}[] outArray = new {Op1BaseType}[DestElementCount]; + + Unsafe.WriteUnaligned(ref Unsafe.As<{Op2BaseType}, byte>(ref inArray1[0]), op1); + Unsafe.WriteUnaligned(ref Unsafe.As<{Op2BaseType}, byte>(ref inArray2[0]), op2); + Unsafe.WriteUnaligned(ref Unsafe.As<{Op2BaseType}, byte>(ref inArray3[0]), op3); + Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1BaseType}, byte>(ref outArray[0]), ref Unsafe.AsRef(result), (uint)sizeof({Op1BaseType}) * 3); + + ValidateResult(inArray1, inArray2, inArray3, outArray, index, method); + } + } +} \ No newline at end of file diff --git a/src/tests/JIT/HardwareIntrinsics/Arm/Shared/StoreSelectedScalarx4Test.template b/src/tests/JIT/HardwareIntrinsics/Arm/Shared/StoreSelectedScalarx4Test.template new file mode 100644 index 0000000000000..0580f1a8ec4a7 --- /dev/null +++ b/src/tests/JIT/HardwareIntrinsics/Arm/Shared/StoreSelectedScalarx4Test.template @@ -0,0 +1,351 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +/****************************************************************************** + * This file is auto-generated from a template file by the GenerateTests.csx * + * script in src\tests\JIT\HardwareIntrinsics\Arm\Shared. In order to make * + * changes, please update the corresponding template and run according to the * + * directions listed in the file. * + ******************************************************************************/ + +using System; +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Runtime.Intrinsics; +using System.Runtime.Intrinsics.Arm; +using Xunit; + +namespace JIT.HardwareIntrinsics.Arm +{ + public static partial class Program + { + [Fact] + public static void {TestName}() + { + var test = new {Method}x4Test__{Op1BaseType}(); + if (test.IsSupported) + { + // Validates basic functionality works, using Unsafe.Read + test.RunBasicScenario_UnsafeRead(); + + if ({LoadIsa}.IsSupported) + { + // Validates basic functionality works, using Load + test.RunBasicScenario_Load(); + } + + // Validates calling via reflection works, using Unsafe.Read + test.RunReflectionScenario_UnsafeRead(); + + // Validates passing a local works, using Unsafe.Read + test.RunLclVarScenario_UnsafeRead(); + + // Validates passing an instance member of a class works + test.RunClassFldScenario(); + + // Validates passing the field of a local struct works + test.RunStructLclFldScenario(); + + // Validates passing an instance member of a struct works + test.RunStructFldScenario(); + } + else + { + // Validates we throw on unsupported hardware + test.RunUnsupportedScenario(); + } + + if (!test.Succeeded) + { + throw new Exception("One or more scenarios did not complete as expected."); + } + } + } + + public sealed unsafe class {Method}x4Test__{Op1BaseType} + { + private struct DataTable + { + private byte[] inArray1; + private byte[] inArray2; + private byte[] inArray3; + private byte[] inArray4; + private byte[] outArray; + + private GCHandle inHandle1; + private GCHandle inHandle2; + private GCHandle inHandle3; + private GCHandle inHandle4; + private GCHandle outHandle; + + private ulong alignment; + + public DataTable({Op2BaseType}[] inArray1, {Op2BaseType}[] inArray2, {Op2BaseType}[] inArray3, {Op2BaseType}[] inArray4, {Op1BaseType}[] outArray, int alignment) + { + int sizeOfinArray1 = inArray1.Length * Unsafe.SizeOf<{Op2BaseType}>(); + int sizeOfinArray2 = inArray2.Length * Unsafe.SizeOf<{Op2BaseType}>(); + int sizeOfinArray3 = inArray3.Length * Unsafe.SizeOf<{Op2BaseType}>(); + int sizeOfinArray4 = inArray4.Length * Unsafe.SizeOf<{Op2BaseType}>(); + int sizeOfoutArray = outArray.Length * Unsafe.SizeOf<{Op1BaseType}>(); + if ((alignment != 16 && alignment != 8) || (alignment * 2) < sizeOfinArray1 || (alignment * 2) < sizeOfoutArray) + { + throw new ArgumentException("Invalid value of alignment"); + } + + this.inArray1 = new byte[alignment * 2]; + this.inArray2 = new byte[alignment * 2]; + this.inArray3 = new byte[alignment * 2]; + this.inArray4 = new byte[alignment * 2]; + this.outArray = new byte[alignment * 4]; + + this.inHandle1 = GCHandle.Alloc(this.inArray1, GCHandleType.Pinned); + this.inHandle2 = GCHandle.Alloc(this.inArray2, GCHandleType.Pinned); + this.inHandle3 = GCHandle.Alloc(this.inArray3, GCHandleType.Pinned); + this.inHandle4 = GCHandle.Alloc(this.inArray4, GCHandleType.Pinned); + this.outHandle = GCHandle.Alloc(this.outArray, GCHandleType.Pinned); + + this.alignment = (ulong)alignment; + + Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray1Ptr), ref Unsafe.As<{Op2BaseType}, byte>(ref inArray1[0]), (uint)sizeOfinArray1); + Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray2Ptr), ref Unsafe.As<{Op2BaseType}, byte>(ref inArray2[0]), (uint)sizeOfinArray2); + Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray3Ptr), ref Unsafe.As<{Op2BaseType}, byte>(ref inArray3[0]), (uint)sizeOfinArray3); + Unsafe.CopyBlockUnaligned(ref Unsafe.AsRef(inArray4Ptr), ref Unsafe.As<{Op2BaseType}, byte>(ref inArray4[0]), (uint)sizeOfinArray4); + } + + public void* inArray1Ptr => Align((byte*)(inHandle1.AddrOfPinnedObject().ToPointer()), alignment); + public void* inArray2Ptr => Align((byte*)(inHandle2.AddrOfPinnedObject().ToPointer()), alignment); + public void* inArray3Ptr => Align((byte*)(inHandle3.AddrOfPinnedObject().ToPointer()), alignment); + public void* inArray4Ptr => Align((byte*)(inHandle4.AddrOfPinnedObject().ToPointer()), alignment); + public void* outArrayPtr => Align((byte*)(outHandle.AddrOfPinnedObject().ToPointer()), alignment); + + public void Dispose() + { + inHandle1.Free(); + inHandle2.Free(); + inHandle3.Free(); + inHandle4.Free(); + outHandle.Free(); + } + + private static unsafe void* Align(byte* buffer, ulong expectedAlignment) + { + return (void*)(((ulong)buffer + expectedAlignment - 1) & ~(expectedAlignment - 1)); + } + } + + private struct TestStruct + { + public {Op2VectorType}<{Op2BaseType}> _fld1; + public {Op2VectorType}<{Op2BaseType}> _fld2; + public {Op2VectorType}<{Op2BaseType}> _fld3; + public {Op2VectorType}<{Op2BaseType}> _fld4; + public byte elemIndex; + + public static TestStruct Create() + { + var testStruct = new TestStruct(); + + for (var i = 0; i < OpElementCount; i++) { _data1[i] = {NextValueOp2}; _data2[i] = {NextValueOp2}; _data3[i] = {NextValueOp2}; _data4[i] = {NextValueOp2}; } + Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op2VectorType}<{Op2BaseType}>, byte>(ref testStruct._fld1), ref Unsafe.As<{Op2BaseType}, byte>(ref _data1[0]), (uint)Unsafe.SizeOf<{Op2VectorType}<{Op2BaseType}>>()); + Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op2VectorType}<{Op2BaseType}>, byte>(ref testStruct._fld2), ref Unsafe.As<{Op2BaseType}, byte>(ref _data2[0]), (uint)Unsafe.SizeOf<{Op2VectorType}<{Op2BaseType}>>()); + Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op2VectorType}<{Op2BaseType}>, byte>(ref testStruct._fld3), ref Unsafe.As<{Op2BaseType}, byte>(ref _data3[0]), (uint)Unsafe.SizeOf<{Op2VectorType}<{Op2BaseType}>>()); + Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op2VectorType}<{Op2BaseType}>, byte>(ref testStruct._fld4), ref Unsafe.As<{Op2BaseType}, byte>(ref _data4[0]), (uint)Unsafe.SizeOf<{Op2VectorType}<{Op2BaseType}>>()); + testStruct.elemIndex = (byte) (TestLibrary.Generator.GetByte() % OpElementCount); + + return testStruct; + } + + public void RunStructFldScenario({Method}x4Test__{Op1BaseType} testClass) + { + {Isa}.{Method}(({Op1BaseType}*)testClass._dataTable.outArrayPtr, (_fld1, _fld2, _fld3, _fld4), elemIndex); + testClass.ValidateResult(_fld1, _fld2, _fld3, _fld4, testClass._dataTable.outArrayPtr, elemIndex); + } + } + + private static readonly int LargestVectorSize = {LargestVectorSize}; + + private static readonly int OpElementCount = Unsafe.SizeOf<{Op2VectorType}<{Op2BaseType}>>() / sizeof({Op2BaseType}); + private static readonly int DestElementCount = 4; + + private static {Op2BaseType}[] _data1 = new {Op2BaseType}[OpElementCount]; + private static {Op2BaseType}[] _data2 = new {Op2BaseType}[OpElementCount]; + private static {Op2BaseType}[] _data3 = new {Op2BaseType}[OpElementCount]; + private static {Op2BaseType}[] _data4 = new {Op2BaseType}[OpElementCount]; + + private {Op2VectorType}<{Op2BaseType}> _fld1; + private {Op2VectorType}<{Op2BaseType}> _fld2; + private {Op2VectorType}<{Op2BaseType}> _fld3; + private {Op2VectorType}<{Op2BaseType}> _fld4; + + public byte elemIndex; + + private DataTable _dataTable; + + public {Method}x4Test__{Op1BaseType}() + { + Succeeded = true; + for (var i = 0; i < OpElementCount; i++) { _data1[i] = {NextValueOp2}; _data2[i] = {NextValueOp2}; _data3[i] = {NextValueOp2}; _data4[i] = {NextValueOp2}; } + Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op2VectorType}<{Op2BaseType}>, byte>(ref _fld1), ref Unsafe.As<{Op2BaseType}, byte>(ref _data1[0]), (uint)Unsafe.SizeOf<{Op2VectorType}<{Op2BaseType}>>()); + Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op2VectorType}<{Op2BaseType}>, byte>(ref _fld2), ref Unsafe.As<{Op2BaseType}, byte>(ref _data2[0]), (uint)Unsafe.SizeOf<{Op2VectorType}<{Op2BaseType}>>()); + Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op2VectorType}<{Op2BaseType}>, byte>(ref _fld3), ref Unsafe.As<{Op2BaseType}, byte>(ref _data3[0]), (uint)Unsafe.SizeOf<{Op2VectorType}<{Op2BaseType}>>()); + Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op2VectorType}<{Op2BaseType}>, byte>(ref _fld4), ref Unsafe.As<{Op2BaseType}, byte>(ref _data4[0]), (uint)Unsafe.SizeOf<{Op2VectorType}<{Op2BaseType}>>()); + for (var i = 0; i < OpElementCount; i++) { _data1[i] = {NextValueOp2}; _data2[i] = {NextValueOp2}; _data3[i] = {NextValueOp2}; _data4[i] = {NextValueOp2}; } + _dataTable = new DataTable(_data1, _data2, _data3, _data4, new {Op1BaseType}[DestElementCount], LargestVectorSize); + elemIndex = (byte) (TestLibrary.Generator.GetByte() % OpElementCount); + } + + public bool IsSupported => {Isa}.IsSupported; + + public bool Succeeded { get; set; } + + public void RunBasicScenario_UnsafeRead() + { + TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_UnsafeRead)); + + {Isa}.{Method}(({Op1BaseType}*)_dataTable.outArrayPtr, (Unsafe.Read<{Op2VectorType}<{Op2BaseType}>>(_dataTable.inArray1Ptr), Unsafe.Read<{Op2VectorType}<{Op2BaseType}>>(_dataTable.inArray2Ptr), Unsafe.Read<{Op2VectorType}<{Op2BaseType}>>(_dataTable.inArray3Ptr), Unsafe.Read<{Op2VectorType}<{Op2BaseType}>>(_dataTable.inArray4Ptr)), elemIndex); + + ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.inArray4Ptr, _dataTable.outArrayPtr, elemIndex); + } + + public void RunBasicScenario_Load() + { + TestLibrary.TestFramework.BeginScenario(nameof(RunBasicScenario_Load)); + + {Isa}.{Method}(({Op1BaseType}*)_dataTable.outArrayPtr, ({LoadIsa}.Load{Op2VectorType}(({Op2BaseType}*)(_dataTable.inArray1Ptr)), {LoadIsa}.Load{Op2VectorType}(({Op2BaseType}*)(_dataTable.inArray2Ptr)), {LoadIsa}.Load{Op2VectorType}(({Op2BaseType}*)(_dataTable.inArray3Ptr)), {LoadIsa}.Load{Op2VectorType}(({Op2BaseType}*)(_dataTable.inArray4Ptr))), elemIndex); + + ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.inArray4Ptr, _dataTable.outArrayPtr, elemIndex); + } + + public void RunReflectionScenario_UnsafeRead() + { + TestLibrary.TestFramework.BeginScenario(nameof(RunReflectionScenario_UnsafeRead)); + + typeof({Isa}).GetMethod(nameof({Isa}.{Method}), new Type[] { typeof({Op1BaseType}*), typeof(({Op2VectorType}<{Op2BaseType}>, {Op2VectorType}<{Op2BaseType}>, {Op2VectorType}<{Op2BaseType}>, {Op2VectorType}<{Op2BaseType}>)), typeof(byte)}). + Invoke(null, new object[] { + Pointer.Box(_dataTable.outArrayPtr, typeof({Op1BaseType}*)), + (Unsafe.Read<{Op2VectorType}<{Op2BaseType}>>(_dataTable.inArray1Ptr), Unsafe.Read<{Op2VectorType}<{Op2BaseType}>>(_dataTable.inArray2Ptr), Unsafe.Read<{Op2VectorType}<{Op2BaseType}>>(_dataTable.inArray3Ptr), Unsafe.Read<{Op2VectorType}<{Op2BaseType}>>(_dataTable.inArray4Ptr)), elemIndex}); + + ValidateResult(_dataTable.inArray1Ptr, _dataTable.inArray2Ptr, _dataTable.inArray3Ptr, _dataTable.inArray4Ptr, _dataTable.outArrayPtr, elemIndex); + } + + public void RunLclVarScenario_UnsafeRead() + { + TestLibrary.TestFramework.BeginScenario(nameof(RunLclVarScenario_UnsafeRead)); + + var op1 = Unsafe.Read<{Op2VectorType}<{Op2BaseType}>>(_dataTable.inArray1Ptr); + var op2 = Unsafe.Read<{Op2VectorType}<{Op2BaseType}>>(_dataTable.inArray2Ptr); + var op3 = Unsafe.Read<{Op2VectorType}<{Op2BaseType}>>(_dataTable.inArray3Ptr); + var op4 = Unsafe.Read<{Op2VectorType}<{Op2BaseType}>>(_dataTable.inArray4Ptr); + {Isa}.{Method}(({Op1BaseType}*)_dataTable.outArrayPtr, (op1, op2, op3, op4), elemIndex); + + ValidateResult(op1, op2, op3, op4, _dataTable.outArrayPtr, elemIndex); + } + + public void RunClassFldScenario() + { + TestLibrary.TestFramework.BeginScenario(nameof(RunClassFldScenario)); + + {Isa}.{Method}(({Op1BaseType}*)_dataTable.outArrayPtr, (_fld1, _fld2, _fld3, _fld4), elemIndex); + + ValidateResult(_fld1, _fld2, _fld3, _fld4, _dataTable.outArrayPtr, elemIndex); + } + + public void RunStructLclFldScenario() + { + TestLibrary.TestFramework.BeginScenario(nameof(RunStructLclFldScenario)); + + var test = TestStruct.Create(); + {Isa}.{Method}(({Op1BaseType}*)_dataTable.outArrayPtr, (test._fld1, test._fld2, test._fld3, test._fld4), test.elemIndex); + + ValidateResult(test._fld1, test._fld2, test._fld3, test._fld4, _dataTable.outArrayPtr, test.elemIndex); + } + + public void RunStructFldScenario() + { + TestLibrary.TestFramework.BeginScenario(nameof(RunStructFldScenario)); + + var test = TestStruct.Create(); + test.RunStructFldScenario(this); + } + + public void RunUnsupportedScenario() + { + TestLibrary.TestFramework.BeginScenario(nameof(RunUnsupportedScenario)); + + bool succeeded = false; + + try + { + RunBasicScenario_UnsafeRead(); + } + catch (PlatformNotSupportedException) + { + succeeded = true; + } + + if (!succeeded) + { + Succeeded = false; + } + } + + private void ValidateResult(void* op1, void* op2, void* op3, void* op4, void* result, byte index, [CallerMemberName] string method = "") + { + {Op2BaseType}[] inArray1 = new {Op2BaseType}[OpElementCount]; + {Op2BaseType}[] inArray2 = new {Op2BaseType}[OpElementCount]; + {Op2BaseType}[] inArray3 = new {Op2BaseType}[OpElementCount]; + {Op2BaseType}[] inArray4 = new {Op2BaseType}[OpElementCount]; + {Op1BaseType}[] outArray = new {Op1BaseType}[DestElementCount]; + + Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op2BaseType}, byte>(ref inArray1[0]), ref Unsafe.AsRef(op1), (uint)Unsafe.SizeOf<{Op2VectorType}<{Op2BaseType}>>()); + Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op2BaseType}, byte>(ref inArray2[0]), ref Unsafe.AsRef(op2), (uint)Unsafe.SizeOf<{Op2VectorType}<{Op2BaseType}>>()); + Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op2BaseType}, byte>(ref inArray3[0]), ref Unsafe.AsRef(op3), (uint)Unsafe.SizeOf<{Op2VectorType}<{Op2BaseType}>>()); + Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op2BaseType}, byte>(ref inArray4[0]), ref Unsafe.AsRef(op4), (uint)Unsafe.SizeOf<{Op2VectorType}<{Op2BaseType}>>()); + Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1BaseType}, byte>(ref outArray[0]), ref Unsafe.AsRef(result), (uint)sizeof({Op1BaseType}) * 4); + + ValidateResult(inArray1, inArray2, inArray3, inArray4, outArray, index, method); + } + + private void ValidateResult({Op2BaseType}[] input1, {Op2BaseType}[] input2, {Op2BaseType}[] input3, {Op2BaseType}[] input4, {Op1BaseType}[] result, byte index, [CallerMemberName] string method = "") + { + bool succeeded = true; + + if (input1[index] != result[0] || input2[index] != result[1] || input3[index] != result[2] || input4[index] != result[3]) + { + succeeded = false; + } + + if (!succeeded) + { + TestLibrary.TestFramework.LogInformation($"{nameof({Isa})}.{nameof({Isa}.{Method})}<{Op2BaseType}>({Op2VectorType}<{Op2BaseType}>): StoreSelectedScalar128x4 failed:"); + TestLibrary.TestFramework.LogInformation($" input1: ({string.Join(", ", input1)})"); + TestLibrary.TestFramework.LogInformation($" input2: ({string.Join(", ", input2)})"); + TestLibrary.TestFramework.LogInformation($" input3: ({string.Join(", ", input3)})"); + TestLibrary.TestFramework.LogInformation($" input4: ({string.Join(", ", input4)})"); + TestLibrary.TestFramework.LogInformation($" index: ({string.Join(", ", index)})"); + TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); + TestLibrary.TestFramework.LogInformation(string.Empty); + + Succeeded = false; + } + } + + private void ValidateResult({Op2VectorType}<{Op2BaseType}> op1, {Op2VectorType}<{Op2BaseType}> op2, {Op2VectorType}<{Op2BaseType}> op3, {Op2VectorType}<{Op2BaseType}> op4, void* result, byte index, [CallerMemberName] string method = "") + { + {Op2BaseType}[] inArray1 = new {Op2BaseType}[OpElementCount]; + {Op2BaseType}[] inArray2 = new {Op2BaseType}[OpElementCount]; + {Op2BaseType}[] inArray3 = new {Op2BaseType}[OpElementCount]; + {Op2BaseType}[] inArray4 = new {Op2BaseType}[OpElementCount]; + {Op1BaseType}[] outArray = new {Op1BaseType}[DestElementCount]; + + Unsafe.WriteUnaligned(ref Unsafe.As<{Op2BaseType}, byte>(ref inArray1[0]), op1); + Unsafe.WriteUnaligned(ref Unsafe.As<{Op2BaseType}, byte>(ref inArray2[0]), op2); + Unsafe.WriteUnaligned(ref Unsafe.As<{Op2BaseType}, byte>(ref inArray3[0]), op3); + Unsafe.WriteUnaligned(ref Unsafe.As<{Op2BaseType}, byte>(ref inArray4[0]), op4); + Unsafe.CopyBlockUnaligned(ref Unsafe.As<{Op1BaseType}, byte>(ref outArray[0]), ref Unsafe.AsRef(result), (uint)sizeof({Op1BaseType}) * 4); + + ValidateResult(inArray1, inArray2, inArray3, inArray4, outArray, index, method); + } + } +} \ No newline at end of file diff --git a/src/tests/issues.targets b/src/tests/issues.targets index 006d0eba9d95f..1b2a852bba493 100644 --- a/src/tests/issues.targets +++ b/src/tests/issues.targets @@ -755,9 +755,6 @@ https://github.com/dotnet/runtimelab/issues/155: SAFEARRAY - - https://github.com/dotnet/runtime/issues/74620 - https://github.com/dotnet/runtimelab/issues/155: AssemblyLoadContext.LoadFromAssemblyPath diff --git a/src/tests/nativeaot/SmokeTests/Determinism/Determinism.csproj b/src/tests/nativeaot/SmokeTests/Determinism/Determinism.csproj index 5601b0480c7ff..d69c92257e241 100644 --- a/src/tests/nativeaot/SmokeTests/Determinism/Determinism.csproj +++ b/src/tests/nativeaot/SmokeTests/Determinism/Determinism.csproj @@ -3,6 +3,8 @@ Exe 0 true + + true