From 0f6b678634b85063aaa178172137a3bb0ca65a25 Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Mon, 19 Aug 2019 20:58:20 -0400 Subject: [PATCH] Remove unused usings from Corlib (dotnet/coreclr#26250) * Fix IDE0065 (misplaced using) * Fix IDE0005 (remove unnecessary usings) Commit migrated from https://github.com/dotnet/coreclr/commit/b51cde6de82c25638de81bc1202e51cfd0b086a8 --- .../InteropServices/ComponentActivator.cs | 2 -- .../src/Microsoft/Win32/OAVariantLib.cs | 13 ++++----- .../Microsoft/Win32/UnsafeNativeMethods.cs | 10 ++----- .../src/System/ArgIterator.cs | 8 ++--- .../src/System/Array.CoreCLR.cs | 1 - .../src/System/CLRConfig.cs | 1 - .../Generic/ArraySortHelper.CoreCLR.cs | 3 -- .../Collections/Generic/Comparer.CoreCLR.cs | 1 - .../Generic/EqualityComparer.CoreCLR.cs | 1 - .../Diagnostics/EditAndContinueHelper.cs | 2 -- .../ICustomDebuggerNotification.cs | 2 -- .../System/Diagnostics/StackFrameHelper.cs | 10 ------- .../System/Diagnostics/StackTrace.CoreCLR.cs | 1 - .../Diagnostics/SymbolStore/ISymWriter.cs | 1 - .../src/System/Environment.CoreCLR.cs | 2 -- .../System.Private.CoreLib/src/System/GC.cs | 2 ++ .../src/System/Reflection/CustomAttribute.cs | 2 -- .../Reflection/Emit/DynamicILGenerator.cs | 1 - .../System/Reflection/Emit/ISymWrapperCore.cs | 2 -- .../System/Reflection/Emit/SignatureHelper.cs | 6 ---- .../src/System/Reflection/MdImport.cs | 1 - .../Runtime/CompilerServices/GCHeapHash.cs | 1 - .../Runtime/CompilerServices/jithelpers.cs | 1 - .../InteropServices/GCHandle.CoreCLR.cs | 7 +---- .../Runtime/InteropServices/IDispatch.cs | 4 --- .../InteropServices/NativeLibrary.CoreCLR.cs | 1 - .../Loader/AssemblyLoadContext.CoreCLR.cs | 2 -- .../Runtime/Versioning/CompatibilitySwitch.cs | 1 - .../DynamicSecurityMethodAttribute.cs | 2 -- .../src/System/String.CoreCLR.cs | 4 --- .../src/System/StubHelpers.cs | 20 +++++-------- .../src/System/Text/StringBuilder.CoreCLR.cs | 2 -- .../src/System/Threading/Monitor.cs | 5 ---- .../src/System/TypeNameParser.cs | 3 -- .../src/System/TypedReference.cs | 16 ++++------ .../src/System/ValueType.cs | 2 -- .../src/System/Variant.cs | 8 ++--- .../src/Internal/IO/File.Windows.cs | 1 - .../Runtime/CompilerServices/Unsafe.cs | 7 ++++- .../Advapi32/Interop.RegCreateKeyEx.cs | 1 - .../Advapi32/Interop.RegDeleteKeyEx.cs | 1 - .../Advapi32/Interop.RegDeleteValue.cs | 1 - .../Windows/Advapi32/Interop.RegEnumKeyEx.cs | 2 -- .../Advapi32/Interop.RegQueryValueEx.cs | 2 -- .../Windows/Advapi32/Interop.RegSetValueEx.cs | 1 - .../Interop.BCryptGenRandom.GetRandomBytes.cs | 1 - .../Windows/BCrypt/Interop.BCryptGenRandom.cs | 1 - .../Windows/BCrypt/Interop.NTSTATUS.cs | 2 -- .../Crypt32/Interop.CryptProtectMemory.cs | 1 - .../Windows/Kernel32/Interop.CancelIoEx.cs | 1 - .../Interop.FILE_INFO_BY_HANDLE_CLASS.cs | 4 --- .../Kernel32/Interop.FileTimeToSystemTime.cs | 1 - .../Windows/Kernel32/Interop.FindClose.cs | 1 - .../Kernel32/Interop.FindFirstFileEx.cs | 1 - .../Kernel32/Interop.FlushFileBuffers.cs | 2 -- .../Kernel32/Interop.GetFileAttributesEx.cs | 3 -- .../Interop.GetFileInformationByHandleEx.cs | 1 - .../Interop.GetFileType_SafeHandle.cs | 1 - .../Kernel32/Interop.GetLongPathNameW.cs | 1 - .../Windows/Kernel32/Interop.GetSystemInfo.cs | 1 - .../Windows/Kernel32/Interop.GetSystemTime.cs | 1 - .../Interop.GetSystemTimeAsFileTime.cs | 1 - .../Interop.GetSystemTimePreciseAsFileTime.cs | 1 - .../Kernel32/Interop.GetSystemTimes.cs | 1 - .../Kernel32/Interop.GlobalMemoryStatusEx.cs | 1 - .../Windows/Kernel32/Interop.LockFile.cs | 2 -- .../Kernel32/Interop.MEMORYSTATUSEX.cs | 1 - .../Interop/Windows/Kernel32/Interop.MUI.cs | 1 - .../Kernel32/Interop.MultiByteToWideChar.cs | 1 - .../Interop.ReadFile_SafeHandle_IntPtr.cs | 1 - ...op.ReadFile_SafeHandle_NativeOverlapped.cs | 1 - .../Kernel32/Interop.ResolveLocaleName.cs | 1 - .../Kernel32/Interop.SECURITY_ATTRIBUTES.cs | 1 - .../Kernel32/Interop.TimeZone.Registry.cs | 1 - .../Windows/Kernel32/Interop.TimeZone.cs | 1 - .../Interop.WriteFile_SafeHandle_IntPtr.cs | 1 - ...p.WriteFile_SafeHandle_NativeOverlapped.cs | 1 - .../Interop/Windows/Normaliz/Interop.Idna.cs | 1 - .../Windows/Normaliz/Interop.Normalization.cs | 1 - .../NtDll/Interop.NtQuerySystemInformation.cs | 1 - .../SafeHandles/SafeFileHandle.Windows.cs | 3 -- .../SafeHandles/SafeFindHandle.Windows.cs | 6 ---- .../SafeHandles/SafeRegistryHandle.Windows.cs | 1 - .../src/System/AccessViolationException.cs | 1 - .../src/System/AggregateException.cs | 3 -- .../src/System/ArgumentException.cs | 1 - .../src/System/ArgumentOutOfRangeException.cs | 1 - .../src/System/Array.cs | 1 - .../src/System/AttributeUsageAttribute.cs | 2 -- .../src/System/BadImageFormatException.cs | 1 - .../Text/Utf8Formatter/Utf8Formatter.Float.cs | 1 - .../TlsOverPerCoreLockedStacksArrayPool.cs | 1 - .../src/System/Collections/ArrayList.cs | 1 - .../System/Collections/Generic/ICollection.cs | 3 -- .../System/Collections/Generic/IComparer.cs | 1 - .../System/Collections/Generic/IDictionary.cs | 1 - .../System/Collections/Generic/IEnumerator.cs | 3 -- .../src/System/Collections/Generic/IList.cs | 4 --- .../Generic/IReadOnlyCollection.cs | 3 -- .../Collections/Generic/IReadOnlyList.cs | 3 -- .../src/System/Collections/Generic/List.cs | 1 - .../src/System/Collections/Hashtable.cs | 1 - .../src/System/Collections/ICollection.cs | 2 -- .../src/System/Collections/IDictionary.cs | 2 -- .../src/System/Collections/IEnumerator.cs | 3 -- .../src/System/Collections/IList.cs | 2 -- .../Collections/IStructuralComparable.cs | 2 -- .../src/System/Convert.cs | 5 ---- .../src/System/DateTime.cs | 5 ---- .../Contracts/ContractFailedEventArgs.cs | 6 ---- .../Diagnostics/Tracing/ActivityTracker.cs | 10 +++---- .../Diagnostics/Tracing/CounterGroup.cs | 18 +++++------- .../Diagnostics/Tracing/CounterPayload.cs | 14 ++++----- .../Diagnostics/Tracing/DiagnosticCounter.cs | 6 ++-- .../Tracing/EventActivityOptions.cs | 2 ++ .../Diagnostics/Tracing/EventCounter.cs | 7 ++--- .../Diagnostics/Tracing/EventDescriptor.cs | 11 ++----- .../Diagnostics/Tracing/EventProvider.cs | 24 ++++----------- .../System/Diagnostics/Tracing/EventSource.cs | 29 ++++++------------- .../Tracing/EventSourceException.cs | 5 ++-- .../Diagnostics/Tracing/IEventProvider.cs | 3 +- .../Tracing/IncrementingEventCounter.cs | 6 +--- .../Tracing/IncrementingPollingCounter.cs | 7 +---- .../Diagnostics/Tracing/PollingCounter.cs | 7 +---- .../Diagnostics/Tracing/StubEnvironment.cs | 16 +++++----- .../Tracing/TraceLogging/ArrayTypeInfo.cs | 3 +- .../Tracing/TraceLogging/ConcurrentSet.cs | 4 ++- .../Tracing/TraceLogging/ConcurrentSetItem.cs | 2 -- .../Tracing/TraceLogging/DataCollector.cs | 6 ++-- .../TraceLogging/EnumerableTypeInfo.cs | 4 ++- .../TraceLogging/EventDataAttribute.cs | 2 ++ .../TraceLogging/EventFieldAttribute.cs | 2 ++ .../TraceLogging/EventIgnoreAttribute.cs | 2 ++ .../Tracing/TraceLogging/EventPayload.cs | 14 ++++----- .../TraceLogging/EventSourceActivity.cs | 10 ++----- .../TraceLogging/EventSourceOptions.cs | 2 ++ .../Tracing/TraceLogging/FieldMetadata.cs | 5 ++-- .../Tracing/TraceLogging/InvokeTypeInfo.cs | 2 ++ .../Tracing/TraceLogging/NameInfo.cs | 5 ++-- .../Tracing/TraceLogging/PropertyAnalysis.cs | 2 ++ .../Tracing/TraceLogging/PropertyValue.cs | 10 ++----- .../Tracing/TraceLogging/SimpleEventTypes.cs | 4 ++- .../Tracing/TraceLogging/SimpleTypeInfos.cs | 10 ++----- .../Tracing/TraceLogging/Statics.cs | 9 +++--- .../TraceLogging/TraceLoggingDataCollector.cs | 3 +- .../TraceLogging/TraceLoggingDataType.cs | 2 ++ .../TraceLogging/TraceLoggingEventSource.cs | 19 +++--------- .../TraceLogging/TraceLoggingEventTraits.cs | 2 ++ .../TraceLogging/TraceLoggingEventTypes.cs | 9 ++---- .../TraceLoggingMetadataCollector.cs | 4 ++- .../TraceLogging/TraceLoggingTypeInfo.cs | 8 ++--- .../Tracing/TraceLogging/TypeAnalysis.cs | 3 +- .../src/System/Diagnostics/Tracing/Winmeta.cs | 4 +-- .../src/System/Double.cs | 1 - .../src/System/EntryPointNotFoundException.cs | 1 - .../src/System/EventArgs.cs | 2 -- .../src/System/EventHandler.cs | 2 -- .../src/System/ExecutionEngineException.cs | 1 - .../src/System/Globalization/Calendar.cs | 1 - .../Globalization/CalendarData.Windows.cs | 3 -- .../Globalization/CompareInfo.Windows.cs | 2 -- .../Globalization/CultureData.Windows.cs | 4 +-- .../Globalization/GlobalizationExtensions.cs | 3 -- .../Globalization/GregorianCalendarHelper.cs | 3 -- .../Globalization/JapaneseCalendar.Win32.cs | 2 -- .../System/Globalization/TaiwanCalendar.cs | 2 -- .../src/System/Globalization/TextInfo.cs | 2 -- .../src/System/HResults.cs | 2 -- .../System/IO/DriveInfoInternal.Windows.cs | 1 - .../src/System/IO/FileAccess.cs | 2 -- .../src/System/IO/FileOptions.cs | 3 -- .../src/System/IO/FileShare.cs | 2 -- .../src/System/IO/PinnedBufferMemoryStream.cs | 1 - .../src/System/IO/TextReader.cs | 1 - .../src/System/Memory.cs | 2 -- .../src/System/Number.Dragon4.cs | 1 - .../src/System/ObjectDisposedException.cs | 1 - .../src/System/OperationCanceledException.cs | 1 - .../src/System/PasteArguments.Windows.cs | 1 - .../src/System/ReadOnlyMemory.cs | 2 -- .../src/System/Reflection/AssemblyName.cs | 1 - .../Reflection/IntrospectionExtensions.cs | 2 -- .../Reflection/SignatureTypeExtensions.cs | 2 -- .../Resources/FileBasedResourceGroveler.cs | 1 - .../src/System/Resources/IResourceGroveler.cs | 3 -- .../src/System/Resources/IResourceReader.cs | 1 - .../ManifestBasedResourceGroveler.cs | 21 +++++--------- .../Resources/ResourceFallbackManager.cs | 4 --- .../System/Resources/ResourceManager.Uap.cs | 10 ------- .../src/System/Resources/ResourceReader.cs | 2 +- .../UltimateResourceFallbackLocation.cs | 2 -- .../CompilerServices/AsyncMethodBuilder.cs | 1 - .../AsyncValueTaskMethodBuilder.cs | 1 - .../CompilerServices/ExtensionAttribute.cs | 2 -- .../src/System/Runtime/Intrinsics/X86/Aes.cs | 2 -- .../src/System/Runtime/Intrinsics/X86/Avx.cs | 3 -- .../src/System/Runtime/Intrinsics/X86/Avx2.cs | 2 -- .../src/System/Runtime/Intrinsics/X86/Bmi1.cs | 2 -- .../src/System/Runtime/Intrinsics/X86/Bmi2.cs | 2 -- .../src/System/Runtime/Intrinsics/X86/Fma.cs | 2 -- .../System/Runtime/Intrinsics/X86/Lzcnt.cs | 2 -- .../Runtime/Intrinsics/X86/Pclmulqdq.cs | 2 -- .../System/Runtime/Intrinsics/X86/Popcnt.cs | 2 -- .../src/System/Runtime/Intrinsics/X86/Sse.cs | 2 -- .../src/System/Runtime/Intrinsics/X86/Sse2.cs | 2 -- .../src/System/Runtime/Intrinsics/X86/Sse3.cs | 2 -- .../System/Runtime/Intrinsics/X86/Sse41.cs | 2 -- .../System/Runtime/Intrinsics/X86/Sse42.cs | 2 -- .../System/Runtime/Intrinsics/X86/Ssse3.cs | 2 -- .../System/Runtime/MemoryFailPoint.Windows.cs | 1 - .../SafeSerializationEventArgs.cs | 2 -- .../System/Security/CryptographicException.cs | 1 - .../System/Security/Principal/IIdentity.cs | 2 -- .../System/Security/Principal/IPrincipal.cs | 2 -- .../src/System/Security/SecurityElement.cs | 2 -- .../src/System/SpanHelpers.T.cs | 2 -- .../src/System/String.Manipulation.cs | 3 -- .../src/System/Text/Decoder.cs | 2 -- .../src/System/Text/Encoder.cs | 2 -- .../System/Text/EncoderReplacementFallback.cs | 2 -- .../src/System/Text/EncodingNLS.cs | 4 --- .../src/System/Text/EncodingProvider.cs | 4 --- .../src/System/Text/Latin1Encoding.cs | 1 - .../src/System/Text/StringBuilder.cs | 7 ----- .../src/System/Text/UTF32Encoding.cs | 2 -- .../src/System/Text/UTF7Encoding.cs | 1 - .../src/System/Text/UTF8Encoding.cs | 1 - .../Text/Unicode/Utf8Utility.Transcoding.cs | 1 - .../src/System/Text/UnicodeDebug.cs | 1 - .../src/System/Text/UnicodeEncoding.cs | 2 -- .../src/System/ThreadStaticAttribute.cs | 2 -- .../Threading/EventWaitHandle.Windows.cs | 1 - .../src/System/Threading/Mutex.cs | 2 -- .../src/System/Threading/Semaphore.cs | 3 -- .../src/System/Threading/Tasks/Future.cs | 2 -- .../System/Threading/Tasks/FutureFactory.cs | 1 - .../Threading/Tasks/TaskCompletionSource.cs | 5 ---- .../System/Threading/Tasks/TaskExtensions.cs | 3 -- .../src/System/Threading/Tasks/TaskFactory.cs | 4 --- .../System/Threading/TimerQueue.Windows.cs | 1 - .../src/System/TimeZone.cs | 3 -- .../src/System/TimeZoneInfo.Win32.cs | 2 -- .../src/System/TypeInitializationException.cs | 1 - 243 files changed, 174 insertions(+), 631 deletions(-) diff --git a/src/coreclr/src/System.Private.CoreLib/src/Internal/Runtime/InteropServices/ComponentActivator.cs b/src/coreclr/src/System.Private.CoreLib/src/Internal/Runtime/InteropServices/ComponentActivator.cs index 3e988b1ecff..504b3821ca9 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/Internal/Runtime/InteropServices/ComponentActivator.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/Internal/Runtime/InteropServices/ComponentActivator.cs @@ -6,10 +6,8 @@ using System; using System.Collections.Generic; -using System.IO; using System.Reflection; using System.Runtime.InteropServices; -using System.Runtime.Loader; namespace Internal.Runtime.InteropServices { diff --git a/src/coreclr/src/System.Private.CoreLib/src/Microsoft/Win32/OAVariantLib.cs b/src/coreclr/src/System.Private.CoreLib/src/Microsoft/Win32/OAVariantLib.cs index 558d59cc709..93f8913d5de 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/Microsoft/Win32/OAVariantLib.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/Microsoft/Win32/OAVariantLib.cs @@ -13,15 +13,14 @@ ** ===========================================================*/ +using System; +using System.Diagnostics; +using System.Globalization; +using System.Reflection; +using System.Runtime.CompilerServices; + namespace Microsoft.Win32 { - using System; - using System.Diagnostics; - using System.Reflection; - using System.Runtime.CompilerServices; - using System.Runtime.Versioning; - using CultureInfo = System.Globalization.CultureInfo; - internal static class OAVariantLib { #region Constants diff --git a/src/coreclr/src/System.Private.CoreLib/src/Microsoft/Win32/UnsafeNativeMethods.cs b/src/coreclr/src/System.Private.CoreLib/src/Microsoft/Win32/UnsafeNativeMethods.cs index c81048a0c3a..423af0af538 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/Microsoft/Win32/UnsafeNativeMethods.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/Microsoft/Win32/UnsafeNativeMethods.cs @@ -2,15 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System; +using System.Runtime.InteropServices; + namespace Microsoft.Win32 { - using Microsoft.Win32.SafeHandles; - using System; - using System.Diagnostics.Tracing; - using System.Runtime.InteropServices; - using System.Security; - using System.Text; - internal static class UnsafeNativeMethods { #if FEATURE_COMINTEROP diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/ArgIterator.cs b/src/coreclr/src/System.Private.CoreLib/src/System/ArgIterator.cs index b090a0e3c67..cd5d8d4b51d 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/ArgIterator.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/ArgIterator.cs @@ -2,13 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Runtime.InteropServices; +using System.Runtime.CompilerServices; + namespace System { - using System; - using System.Runtime.InteropServices; - using System.Runtime.CompilerServices; - using System.Runtime.Versioning; - // This class will not be marked serializable // Note: This type must have the same layout as the CLR's VARARGS type in CLRVarArgs.h. // It also contains an inline SigPointer data structure - must keep those fields in sync. diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Array.CoreCLR.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Array.CoreCLR.cs index 68979b96c3a..10456540550 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Array.CoreCLR.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Array.CoreCLR.cs @@ -5,7 +5,6 @@ using System.Collections; using System.Collections.Generic; using System.Diagnostics; -using System.Runtime.InteropServices; using System.Runtime.CompilerServices; using Internal.Runtime.CompilerServices; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/CLRConfig.cs b/src/coreclr/src/System.Private.CoreLib/src/System/CLRConfig.cs index 5b14f282ede..ecf77a6479e 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/CLRConfig.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/CLRConfig.cs @@ -4,7 +4,6 @@ using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -using Microsoft.Win32; namespace System { diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Collections/Generic/ArraySortHelper.CoreCLR.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Collections/Generic/ArraySortHelper.CoreCLR.cs index f4e38d4b4cb..135dff83bf4 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Collections/Generic/ArraySortHelper.CoreCLR.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Collections/Generic/ArraySortHelper.CoreCLR.cs @@ -2,10 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Globalization; using System.Runtime.CompilerServices; -using System.Diagnostics; -using System.Runtime.Versioning; namespace System.Collections.Generic { diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Collections/Generic/Comparer.CoreCLR.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Collections/Generic/Comparer.CoreCLR.cs index a8c5d1d28b0..502b64d6154 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Collections/Generic/Comparer.CoreCLR.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Collections/Generic/Comparer.CoreCLR.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Runtime; using System.Runtime.CompilerServices; namespace System.Collections.Generic diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.CoreCLR.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.CoreCLR.cs index ff967e3cbb1..b79fdd67f09 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.CoreCLR.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Collections/Generic/EqualityComparer.CoreCLR.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Runtime; using System.Runtime.CompilerServices; using System.Diagnostics; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Diagnostics/EditAndContinueHelper.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Diagnostics/EditAndContinueHelper.cs index e6cd1386c12..8bd88af32b8 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Diagnostics/EditAndContinueHelper.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Diagnostics/EditAndContinueHelper.cs @@ -11,8 +11,6 @@ ** =============================================================================*/ -using System; - namespace System.Diagnostics { internal sealed class EditAndContinueHelper diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Diagnostics/ICustomDebuggerNotification.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Diagnostics/ICustomDebuggerNotification.cs index f8b3e67e880..2cb65f6c15c 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Diagnostics/ICustomDebuggerNotification.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Diagnostics/ICustomDebuggerNotification.cs @@ -9,8 +9,6 @@ ** ===========================================================*/ -using System; - namespace System.Diagnostics { // Defines an interface indicating that a custom debugger notification is requested under specific diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Diagnostics/StackFrameHelper.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Diagnostics/StackFrameHelper.cs index a761302062d..68737c162bf 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Diagnostics/StackFrameHelper.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Diagnostics/StackFrameHelper.cs @@ -2,18 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections; -using System.Collections.Generic; -using System.Text; using System.Threading; -using System.Security; -using System.IO; using System.Reflection; -using System.Runtime.InteropServices; -using System.Runtime.CompilerServices; -using System.Globalization; -using System.Runtime.Versioning; namespace System.Diagnostics { diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Diagnostics/StackTrace.CoreCLR.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Diagnostics/StackTrace.CoreCLR.cs index 77630938a25..7b9a63e3902 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Diagnostics/StackTrace.CoreCLR.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Diagnostics/StackTrace.CoreCLR.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Threading; using System.Runtime.CompilerServices; using System.Reflection; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Diagnostics/SymbolStore/ISymWriter.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Diagnostics/SymbolStore/ISymWriter.cs index eeed70cb001..c6e709c06e9 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Diagnostics/SymbolStore/ISymWriter.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Diagnostics/SymbolStore/ISymWriter.cs @@ -13,7 +13,6 @@ ===========================================================*/ using System.Reflection; -using System.Runtime.InteropServices; namespace System.Diagnostics.SymbolStore { diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Environment.CoreCLR.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Environment.CoreCLR.cs index 69c49962dde..5ff86e0f1d7 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Environment.CoreCLR.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Environment.CoreCLR.cs @@ -2,13 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Buffers; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Threading; -using Microsoft.Win32; namespace System { diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/GC.cs b/src/coreclr/src/System.Private.CoreLib/src/System/GC.cs index 79de47b4443..5405704d9e2 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/GC.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/GC.cs @@ -17,7 +17,9 @@ using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Diagnostics; using System.Collections.Generic; +#if !DEBUG using Internal.Runtime.CompilerServices; +#endif namespace System { diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/CustomAttribute.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/CustomAttribute.cs index bcf49481e9b..c0708c65142 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/CustomAttribute.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/CustomAttribute.cs @@ -2,12 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Collections.Generic; using System.Diagnostics; -using System.Globalization; namespace System.Reflection { diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/DynamicILGenerator.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/DynamicILGenerator.cs index 64f98537377..25f4afa7b07 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/DynamicILGenerator.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/DynamicILGenerator.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Buffers.Binary; using System.Diagnostics.SymbolStore; using System.Runtime.InteropServices; using System.Collections.Generic; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/ISymWrapperCore.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/ISymWrapperCore.cs index 50ae0f8dbb6..2e9a4e95fb3 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/ISymWrapperCore.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/ISymWrapperCore.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Security; using System.Runtime.InteropServices; using System.Runtime.CompilerServices; using System.Diagnostics.SymbolStore; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/SignatureHelper.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/SignatureHelper.cs index 65d6eb1e394..00c8c7c07f7 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/SignatureHelper.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/SignatureHelper.cs @@ -2,16 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// - using System.Text; -using System; using System.Buffers.Binary; using System.Diagnostics; -using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -using System.Runtime.Versioning; namespace System.Reflection.Emit { diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/MdImport.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/MdImport.cs index a19facc6c44..f22f13a6195 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/MdImport.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/MdImport.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Globalization; using System.Diagnostics; using System.Runtime.CompilerServices; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/CompilerServices/GCHeapHash.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/CompilerServices/GCHeapHash.cs index 2062ab72c2a..763ab98ceb3 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/CompilerServices/GCHeapHash.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/CompilerServices/GCHeapHash.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.InteropServices; namespace System.Runtime.CompilerServices diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/CompilerServices/jithelpers.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/CompilerServices/jithelpers.cs index ec1f30b7e89..e6ebe25ad9e 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/CompilerServices/jithelpers.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/CompilerServices/jithelpers.cs @@ -8,7 +8,6 @@ //////////////////////////////////////////////////////////////////////////////// using System.Threading; -using System.Diagnostics; using Internal.Runtime.CompilerServices; using System.Diagnostics.CodeAnalysis; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/GCHandle.CoreCLR.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/GCHandle.CoreCLR.cs index b40f22005b9..a43bd005d40 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/GCHandle.CoreCLR.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/GCHandle.CoreCLR.cs @@ -3,13 +3,8 @@ // See the LICENSE file in the project root for more information. using System.Runtime.CompilerServices; +#if !DEBUG using Internal.Runtime.CompilerServices; - -#pragma warning disable SA1121 // explicitly using type aliases instead of built-in types -#if BIT64 -using nint = System.Int64; -#else -using nint = System.Int32; #endif namespace System.Runtime.InteropServices diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/IDispatch.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/IDispatch.cs index fbe70fed737..f002cb661e6 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/IDispatch.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/IDispatch.cs @@ -2,10 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections.Generic; -using System.Text; - namespace System.Runtime.InteropServices { [ComImport] diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/NativeLibrary.CoreCLR.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/NativeLibrary.CoreCLR.cs index b44a914617b..da23738e550 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/NativeLibrary.CoreCLR.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/NativeLibrary.CoreCLR.cs @@ -4,7 +4,6 @@ using System.Reflection; using System.Runtime.CompilerServices; -using System.Threading; namespace System.Runtime.InteropServices { diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/Loader/AssemblyLoadContext.CoreCLR.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/Loader/AssemblyLoadContext.CoreCLR.cs index 72bfbf18f4c..ded989602e0 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/Loader/AssemblyLoadContext.CoreCLR.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/Loader/AssemblyLoadContext.CoreCLR.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Collections.Generic; -using System.IO; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/Versioning/CompatibilitySwitch.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/Versioning/CompatibilitySwitch.cs index fedd6a0976f..6655fa8de96 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/Versioning/CompatibilitySwitch.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Runtime/Versioning/CompatibilitySwitch.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Globalization; using System.Runtime.CompilerServices; namespace System.Runtime.Versioning diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Security/DynamicSecurityMethodAttribute.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Security/DynamicSecurityMethodAttribute.cs index 99484859696..140bfcf50e8 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Security/DynamicSecurityMethodAttribute.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Security/DynamicSecurityMethodAttribute.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Runtime.InteropServices; - namespace System.Security { // DynamicSecurityMethodAttribute: diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/String.CoreCLR.cs b/src/coreclr/src/System.Private.CoreLib/src/System/String.CoreCLR.cs index c55ddb59fb5..ee664add010 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/String.CoreCLR.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/String.CoreCLR.cs @@ -2,12 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using Microsoft.Win32; -using System.Diagnostics; using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; using System.Text; -using System.Threading; namespace System { diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/StubHelpers.cs b/src/coreclr/src/System.Private.CoreLib/src/System/StubHelpers.cs index d792f973b0b..2f6ea6e6e1f 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/StubHelpers.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/StubHelpers.cs @@ -2,21 +2,17 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -namespace System.StubHelpers -{ - using System.Text; - using Microsoft.Win32; - using System.Security; - using System.Collections.Generic; - using System.Runtime; - using System.Runtime.InteropServices; +using System.Text; +using System.Collections.Generic; +using System.Runtime.InteropServices; #if FEATURE_COMINTEROP - using System.Runtime.InteropServices.WindowsRuntime; +using System.Runtime.InteropServices.WindowsRuntime; #endif // FEATURE_COMINTEROP - using System.Runtime.CompilerServices; - using System.Runtime.ConstrainedExecution; - using System.Diagnostics; +using System.Runtime.CompilerServices; +using System.Diagnostics; +namespace System.StubHelpers +{ internal static class AnsiCharMarshaler { // The length of the returned array is an approximation based on the length of the input string and the system diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Text/StringBuilder.CoreCLR.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Text/StringBuilder.CoreCLR.cs index f65d6ef21cd..132e58be87a 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Text/StringBuilder.CoreCLR.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Text/StringBuilder.CoreCLR.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Diagnostics; - namespace System.Text { public partial class StringBuilder diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Threading/Monitor.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Threading/Monitor.cs index 131c1a2a593..ac08a2d8bad 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Threading/Monitor.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Threading/Monitor.cs @@ -13,12 +13,7 @@ ** =============================================================================*/ -using System; -using System.Runtime; -using System.Threading; using System.Runtime.CompilerServices; -using System.Runtime.ConstrainedExecution; -using System.Runtime.Versioning; using System.Diagnostics; using System.Runtime.InteropServices; using System.Diagnostics.CodeAnalysis; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/TypeNameParser.cs b/src/coreclr/src/System.Private.CoreLib/src/System/TypeNameParser.cs index 4eff4e36c40..d4f125527e5 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/TypeNameParser.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/TypeNameParser.cs @@ -2,15 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Diagnostics; using System.IO; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Loader; -using System.Runtime.Versioning; -using System.Security; using System.Text; using System.Threading; using Microsoft.Win32.SafeHandles; diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/TypedReference.cs b/src/coreclr/src/System.Private.CoreLib/src/System/TypedReference.cs index 10e72a4c9a4..bccdfbf7231 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/TypedReference.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/TypedReference.cs @@ -2,18 +2,14 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -namespace System -{ - // TypedReference is basically only ever seen on the call stack, and in param arrays. - // These are blob that must be dealt with by the compiler. +// TypedReference is basically only ever seen on the call stack, and in param arrays. +// These are blob that must be dealt with by the compiler. - using System; - using System.Reflection; - using System.Runtime.CompilerServices; - using CultureInfo = System.Globalization.CultureInfo; - using FieldInfo = System.Reflection.FieldInfo; - using System.Runtime.Versioning; +using System.Reflection; +using System.Runtime.CompilerServices; +namespace System +{ [CLSCompliant(false)] [System.Runtime.Versioning.NonVersionable] // This only applies to field layout public ref struct TypedReference diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/ValueType.cs b/src/coreclr/src/System.Private.CoreLib/src/System/ValueType.cs index f1d096de372..8382e0d2285 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/ValueType.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/ValueType.cs @@ -11,10 +11,8 @@ ** ===========================================================*/ -using System; using System.Reflection; using System.Runtime.CompilerServices; -using System.Runtime.Versioning; namespace System { diff --git a/src/coreclr/src/System.Private.CoreLib/src/System/Variant.cs b/src/coreclr/src/System.Private.CoreLib/src/System/Variant.cs index e295a9a5190..40ee9e5bda9 100644 --- a/src/coreclr/src/System.Private.CoreLib/src/System/Variant.cs +++ b/src/coreclr/src/System.Private.CoreLib/src/System/Variant.cs @@ -11,14 +11,10 @@ ** ===========================================================*/ -using System; -using System.Reflection; -using System.Threading; -using System.Runtime.InteropServices; +using System.Diagnostics; using System.Globalization; using System.Runtime.CompilerServices; -using System.Runtime.Versioning; -using System.Diagnostics; +using System.Runtime.InteropServices; namespace System { diff --git a/src/libraries/System.Private.CoreLib/src/Internal/IO/File.Windows.cs b/src/libraries/System.Private.CoreLib/src/Internal/IO/File.Windows.cs index 0acae3b4577..9de653834ae 100644 --- a/src/libraries/System.Private.CoreLib/src/Internal/IO/File.Windows.cs +++ b/src/libraries/System.Private.CoreLib/src/Internal/IO/File.Windows.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using Microsoft.Win32; using Microsoft.Win32.SafeHandles; using System.IO; using System.Runtime.InteropServices; diff --git a/src/libraries/System.Private.CoreLib/src/Internal/Runtime/CompilerServices/Unsafe.cs b/src/libraries/System.Private.CoreLib/src/Internal/Runtime/CompilerServices/Unsafe.cs index 7312dee6956..76d6face177 100644 --- a/src/libraries/System.Private.CoreLib/src/Internal/Runtime/CompilerServices/Unsafe.cs +++ b/src/libraries/System.Private.CoreLib/src/Internal/Runtime/CompilerServices/Unsafe.cs @@ -11,11 +11,16 @@ using System.Runtime.Versioning; #pragma warning disable SA1121 // explicitly using type aliases instead of built-in types #if BIT64 using nuint = System.UInt64; -using nint = System.Int64; #else using nuint = System.UInt32; +#endif +#if !CORECLR +#if BIT64 +using nint = System.Int64; +#else using nint = System.Int32; #endif +#endif // // The implementations of most the methods in this file are provided as intrinsics. diff --git a/src/libraries/System.Private.CoreLib/src/Interop/Windows/Advapi32/Interop.RegCreateKeyEx.cs b/src/libraries/System.Private.CoreLib/src/Interop/Windows/Advapi32/Interop.RegCreateKeyEx.cs index 7f3dcbea768..d1471ee21c7 100644 --- a/src/libraries/System.Private.CoreLib/src/Interop/Windows/Advapi32/Interop.RegCreateKeyEx.cs +++ b/src/libraries/System.Private.CoreLib/src/Interop/Windows/Advapi32/Interop.RegCreateKeyEx.cs @@ -8,7 +8,6 @@ using Microsoft.Win32.SafeHandles; #else using Internal.Win32.SafeHandles; #endif -using System; using System.Runtime.InteropServices; internal partial class Interop diff --git a/src/libraries/System.Private.CoreLib/src/Interop/Windows/Advapi32/Interop.RegDeleteKeyEx.cs b/src/libraries/System.Private.CoreLib/src/Interop/Windows/Advapi32/Interop.RegDeleteKeyEx.cs index c949cc15ff1..ef74d496310 100644 --- a/src/libraries/System.Private.CoreLib/src/Interop/Windows/Advapi32/Interop.RegDeleteKeyEx.cs +++ b/src/libraries/System.Private.CoreLib/src/Interop/Windows/Advapi32/Interop.RegDeleteKeyEx.cs @@ -7,7 +7,6 @@ using Microsoft.Win32.SafeHandles; #else using Internal.Win32.SafeHandles; #endif -using System; using System.Runtime.InteropServices; internal partial class Interop diff --git a/src/libraries/System.Private.CoreLib/src/Interop/Windows/Advapi32/Interop.RegDeleteValue.cs b/src/libraries/System.Private.CoreLib/src/Interop/Windows/Advapi32/Interop.RegDeleteValue.cs index 4e0fdd9d40f..6b5af77da8d 100644 --- a/src/libraries/System.Private.CoreLib/src/Interop/Windows/Advapi32/Interop.RegDeleteValue.cs +++ b/src/libraries/System.Private.CoreLib/src/Interop/Windows/Advapi32/Interop.RegDeleteValue.cs @@ -8,7 +8,6 @@ using Microsoft.Win32.SafeHandles; #else using Internal.Win32.SafeHandles; #endif -using System; using System.Runtime.InteropServices; internal partial class Interop diff --git a/src/libraries/System.Private.CoreLib/src/Interop/Windows/Advapi32/Interop.RegEnumKeyEx.cs b/src/libraries/System.Private.CoreLib/src/Interop/Windows/Advapi32/Interop.RegEnumKeyEx.cs index b2873fa8690..6d4b86ebf97 100644 --- a/src/libraries/System.Private.CoreLib/src/Interop/Windows/Advapi32/Interop.RegEnumKeyEx.cs +++ b/src/libraries/System.Private.CoreLib/src/Interop/Windows/Advapi32/Interop.RegEnumKeyEx.cs @@ -8,9 +8,7 @@ using Microsoft.Win32.SafeHandles; #else using Internal.Win32.SafeHandles; #endif -using System; using System.Runtime.InteropServices; -using System.Text; internal partial class Interop { diff --git a/src/libraries/System.Private.CoreLib/src/Interop/Windows/Advapi32/Interop.RegQueryValueEx.cs b/src/libraries/System.Private.CoreLib/src/Interop/Windows/Advapi32/Interop.RegQueryValueEx.cs index 0ed94b2157b..f224de6841f 100644 --- a/src/libraries/System.Private.CoreLib/src/Interop/Windows/Advapi32/Interop.RegQueryValueEx.cs +++ b/src/libraries/System.Private.CoreLib/src/Interop/Windows/Advapi32/Interop.RegQueryValueEx.cs @@ -8,9 +8,7 @@ using Microsoft.Win32.SafeHandles; #else using Internal.Win32.SafeHandles; #endif -using System; using System.Runtime.InteropServices; -using System.Text; internal partial class Interop { diff --git a/src/libraries/System.Private.CoreLib/src/Interop/Windows/Advapi32/Interop.RegSetValueEx.cs b/src/libraries/System.Private.CoreLib/src/Interop/Windows/Advapi32/Interop.RegSetValueEx.cs index 64a405695c7..3082da7d034 100644 --- a/src/libraries/System.Private.CoreLib/src/Interop/Windows/Advapi32/Interop.RegSetValueEx.cs +++ b/src/libraries/System.Private.CoreLib/src/Interop/Windows/Advapi32/Interop.RegSetValueEx.cs @@ -8,7 +8,6 @@ using Microsoft.Win32.SafeHandles; #else using Internal.Win32.SafeHandles; #endif -using System; using System.Runtime.InteropServices; internal partial class Interop diff --git a/src/libraries/System.Private.CoreLib/src/Interop/Windows/BCrypt/Interop.BCryptGenRandom.GetRandomBytes.cs b/src/libraries/System.Private.CoreLib/src/Interop/Windows/BCrypt/Interop.BCryptGenRandom.GetRandomBytes.cs index 4d75163d4b4..b6cf96b1671 100644 --- a/src/libraries/System.Private.CoreLib/src/Interop/Windows/BCrypt/Interop.BCryptGenRandom.GetRandomBytes.cs +++ b/src/libraries/System.Private.CoreLib/src/Interop/Windows/BCrypt/Interop.BCryptGenRandom.GetRandomBytes.cs @@ -4,7 +4,6 @@ using System; using System.Diagnostics; -using System.Runtime.InteropServices; internal partial class Interop { diff --git a/src/libraries/System.Private.CoreLib/src/Interop/Windows/BCrypt/Interop.BCryptGenRandom.cs b/src/libraries/System.Private.CoreLib/src/Interop/Windows/BCrypt/Interop.BCryptGenRandom.cs index de694003723..7955dd771e6 100644 --- a/src/libraries/System.Private.CoreLib/src/Interop/Windows/BCrypt/Interop.BCryptGenRandom.cs +++ b/src/libraries/System.Private.CoreLib/src/Interop/Windows/BCrypt/Interop.BCryptGenRandom.cs @@ -3,7 +3,6 @@ // See the LICENSE file in the project root for more information. using System; -using System.Diagnostics; using System.Runtime.InteropServices; internal partial class Interop diff --git a/src/libraries/System.Private.CoreLib/src/Interop/Windows/BCrypt/Interop.NTSTATUS.cs b/src/libraries/System.Private.CoreLib/src/Interop/Windows/BCrypt/Interop.NTSTATUS.cs index 29aaa2904bf..e69a5ef7cd9 100644 --- a/src/libraries/System.Private.CoreLib/src/Interop/Windows/BCrypt/Interop.NTSTATUS.cs +++ b/src/libraries/System.Private.CoreLib/src/Interop/Windows/BCrypt/Interop.NTSTATUS.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; - internal partial class Interop { internal partial class BCrypt diff --git a/src/libraries/System.Private.CoreLib/src/Interop/Windows/Crypt32/Interop.CryptProtectMemory.cs b/src/libraries/System.Private.CoreLib/src/Interop/Windows/Crypt32/Interop.CryptProtectMemory.cs index b10cb6a0410..b85b5fc161b 100644 --- a/src/libraries/System.Private.CoreLib/src/Interop/Windows/Crypt32/Interop.CryptProtectMemory.cs +++ b/src/libraries/System.Private.CoreLib/src/Interop/Windows/Crypt32/Interop.CryptProtectMemory.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.InteropServices; using System.Security; diff --git a/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.CancelIoEx.cs b/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.CancelIoEx.cs index fc99e3052f6..01b957f58f0 100644 --- a/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.CancelIoEx.cs +++ b/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.CancelIoEx.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using Microsoft.Win32.SafeHandles; using System.Runtime.InteropServices; using System.Threading; diff --git a/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.FILE_INFO_BY_HANDLE_CLASS.cs b/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.FILE_INFO_BY_HANDLE_CLASS.cs index e31a453ba94..92955954f4f 100644 --- a/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.FILE_INFO_BY_HANDLE_CLASS.cs +++ b/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.FILE_INFO_BY_HANDLE_CLASS.cs @@ -2,10 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using Microsoft.Win32.SafeHandles; -using System; -using System.Runtime.InteropServices; - internal partial class Interop { internal partial class Kernel32 diff --git a/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.FileTimeToSystemTime.cs b/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.FileTimeToSystemTime.cs index 8c1566bb586..6c87f65a52c 100644 --- a/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.FileTimeToSystemTime.cs +++ b/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.FileTimeToSystemTime.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.InteropServices; internal partial class Interop diff --git a/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.FindClose.cs b/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.FindClose.cs index fcf9254acaa..8e48e620801 100644 --- a/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.FindClose.cs +++ b/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.FindClose.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using Microsoft.Win32.SafeHandles; using System; using System.Runtime.InteropServices; diff --git a/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.FindFirstFileEx.cs b/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.FindFirstFileEx.cs index bb1ddf78576..0033b25cc1c 100644 --- a/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.FindFirstFileEx.cs +++ b/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.FindFirstFileEx.cs @@ -5,7 +5,6 @@ #nullable enable using Microsoft.Win32.SafeHandles; using System; -using System.Diagnostics; using System.IO; using System.Runtime.InteropServices; diff --git a/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.FlushFileBuffers.cs b/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.FlushFileBuffers.cs index e10a2279cff..03ac47de9a9 100644 --- a/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.FlushFileBuffers.cs +++ b/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.FlushFileBuffers.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using Microsoft.Win32.SafeHandles; -using System; using System.Runtime.InteropServices; internal partial class Interop diff --git a/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.GetFileAttributesEx.cs b/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.GetFileAttributesEx.cs index ee2370038f1..00575c76abe 100644 --- a/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.GetFileAttributesEx.cs +++ b/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.GetFileAttributesEx.cs @@ -3,9 +3,6 @@ // See the LICENSE file in the project root for more information. #nullable enable -using Microsoft.Win32.SafeHandles; -using System; -using System.Diagnostics; using System.IO; using System.Runtime.InteropServices; diff --git a/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.GetFileInformationByHandleEx.cs b/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.GetFileInformationByHandleEx.cs index 1106cff1c58..d274917eac2 100644 --- a/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.GetFileInformationByHandleEx.cs +++ b/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.GetFileInformationByHandleEx.cs @@ -3,7 +3,6 @@ // See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; -using System; using System.Runtime.InteropServices; internal partial class Interop diff --git a/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.GetFileType_SafeHandle.cs b/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.GetFileType_SafeHandle.cs index faa57cc2f12..8a613528d9f 100644 --- a/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.GetFileType_SafeHandle.cs +++ b/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.GetFileType_SafeHandle.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using Microsoft.Win32.SafeHandles; using System.Runtime.InteropServices; internal partial class Interop diff --git a/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.GetLongPathNameW.cs b/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.GetLongPathNameW.cs index 81b4d096f56..49f8ea18da4 100644 --- a/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.GetLongPathNameW.cs +++ b/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.GetLongPathNameW.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.InteropServices; internal partial class Interop diff --git a/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.GetSystemInfo.cs b/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.GetSystemInfo.cs index d3032425a22..130eea68c32 100644 --- a/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.GetSystemInfo.cs +++ b/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.GetSystemInfo.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.InteropServices; internal partial class Interop diff --git a/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.GetSystemTime.cs b/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.GetSystemTime.cs index 9a2a784d326..c3cad18ae20 100644 --- a/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.GetSystemTime.cs +++ b/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.GetSystemTime.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.InteropServices; internal partial class Interop diff --git a/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.GetSystemTimeAsFileTime.cs b/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.GetSystemTimeAsFileTime.cs index 68132fbf341..fac974b692e 100644 --- a/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.GetSystemTimeAsFileTime.cs +++ b/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.GetSystemTimeAsFileTime.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.InteropServices; internal partial class Interop diff --git a/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.GetSystemTimePreciseAsFileTime.cs b/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.GetSystemTimePreciseAsFileTime.cs index 6a9439875c3..12bfb70846d 100644 --- a/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.GetSystemTimePreciseAsFileTime.cs +++ b/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.GetSystemTimePreciseAsFileTime.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.InteropServices; internal partial class Interop diff --git a/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.GetSystemTimes.cs b/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.GetSystemTimes.cs index fe7ea692d1f..576c8126994 100644 --- a/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.GetSystemTimes.cs +++ b/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.GetSystemTimes.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.InteropServices; internal partial class Interop diff --git a/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.GlobalMemoryStatusEx.cs b/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.GlobalMemoryStatusEx.cs index 85fd9638fb5..a729b5cdb81 100644 --- a/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.GlobalMemoryStatusEx.cs +++ b/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.GlobalMemoryStatusEx.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.InteropServices; internal partial class Interop diff --git a/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.LockFile.cs b/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.LockFile.cs index a21d00f4f66..927203b1122 100644 --- a/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.LockFile.cs +++ b/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.LockFile.cs @@ -3,8 +3,6 @@ // See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; -using System; -using System.IO; using System.Runtime.InteropServices; internal partial class Interop diff --git a/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.MEMORYSTATUSEX.cs b/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.MEMORYSTATUSEX.cs index 45f57aa4d83..402a264e307 100644 --- a/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.MEMORYSTATUSEX.cs +++ b/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.MEMORYSTATUSEX.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.InteropServices; internal partial class Interop diff --git a/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.MUI.cs b/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.MUI.cs index 509d9a24110..12867a8527b 100644 --- a/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.MUI.cs +++ b/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.MUI.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.InteropServices; internal static partial class Interop diff --git a/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.MultiByteToWideChar.cs b/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.MultiByteToWideChar.cs index 158e4db3fd3..ab6220eb5db 100644 --- a/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.MultiByteToWideChar.cs +++ b/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.MultiByteToWideChar.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.InteropServices; internal partial class Interop diff --git a/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.ReadFile_SafeHandle_IntPtr.cs b/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.ReadFile_SafeHandle_IntPtr.cs index 076f7f136fd..5fedb4ed06d 100644 --- a/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.ReadFile_SafeHandle_IntPtr.cs +++ b/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.ReadFile_SafeHandle_IntPtr.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using Microsoft.Win32.SafeHandles; using System; using System.Runtime.InteropServices; diff --git a/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.ReadFile_SafeHandle_NativeOverlapped.cs b/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.ReadFile_SafeHandle_NativeOverlapped.cs index 3ae65a88069..e80be340fce 100644 --- a/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.ReadFile_SafeHandle_NativeOverlapped.cs +++ b/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.ReadFile_SafeHandle_NativeOverlapped.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using Microsoft.Win32.SafeHandles; using System; using System.Runtime.InteropServices; using System.Threading; diff --git a/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.ResolveLocaleName.cs b/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.ResolveLocaleName.cs index 2d6b6c3c729..c349129d515 100644 --- a/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.ResolveLocaleName.cs +++ b/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.ResolveLocaleName.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.InteropServices; internal static partial class Interop diff --git a/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.SECURITY_ATTRIBUTES.cs b/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.SECURITY_ATTRIBUTES.cs index 8d31f8622ff..1798cb40caa 100644 --- a/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.SECURITY_ATTRIBUTES.cs +++ b/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.SECURITY_ATTRIBUTES.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using Microsoft.Win32.SafeHandles; using System; using System.Runtime.InteropServices; diff --git a/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.TimeZone.Registry.cs b/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.TimeZone.Registry.cs index 062d1caebac..14993bcca62 100644 --- a/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.TimeZone.Registry.cs +++ b/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.TimeZone.Registry.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.InteropServices; internal static partial class Interop diff --git a/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.TimeZone.cs b/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.TimeZone.cs index 68d4583b54a..7be40ca8f4c 100644 --- a/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.TimeZone.cs +++ b/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.TimeZone.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.InteropServices; internal static partial class Interop diff --git a/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.WriteFile_SafeHandle_IntPtr.cs b/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.WriteFile_SafeHandle_IntPtr.cs index 34c7c1c1699..ea69950dfa5 100644 --- a/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.WriteFile_SafeHandle_IntPtr.cs +++ b/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.WriteFile_SafeHandle_IntPtr.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using Microsoft.Win32.SafeHandles; using System; using System.Runtime.InteropServices; diff --git a/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.WriteFile_SafeHandle_NativeOverlapped.cs b/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.WriteFile_SafeHandle_NativeOverlapped.cs index 9e96bb84568..5660cced660 100644 --- a/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.WriteFile_SafeHandle_NativeOverlapped.cs +++ b/src/libraries/System.Private.CoreLib/src/Interop/Windows/Kernel32/Interop.WriteFile_SafeHandle_NativeOverlapped.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using Microsoft.Win32.SafeHandles; using System; using System.Runtime.InteropServices; using System.Threading; diff --git a/src/libraries/System.Private.CoreLib/src/Interop/Windows/Normaliz/Interop.Idna.cs b/src/libraries/System.Private.CoreLib/src/Interop/Windows/Normaliz/Interop.Idna.cs index f49ce8dd617..4059c702262 100644 --- a/src/libraries/System.Private.CoreLib/src/Interop/Windows/Normaliz/Interop.Idna.cs +++ b/src/libraries/System.Private.CoreLib/src/Interop/Windows/Normaliz/Interop.Idna.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.InteropServices; internal partial class Interop diff --git a/src/libraries/System.Private.CoreLib/src/Interop/Windows/Normaliz/Interop.Normalization.cs b/src/libraries/System.Private.CoreLib/src/Interop/Windows/Normaliz/Interop.Normalization.cs index 6e6d88a0763..a77ccef74e8 100644 --- a/src/libraries/System.Private.CoreLib/src/Interop/Windows/Normaliz/Interop.Normalization.cs +++ b/src/libraries/System.Private.CoreLib/src/Interop/Windows/Normaliz/Interop.Normalization.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.InteropServices; internal partial class Interop diff --git a/src/libraries/System.Private.CoreLib/src/Interop/Windows/NtDll/Interop.NtQuerySystemInformation.cs b/src/libraries/System.Private.CoreLib/src/Interop/Windows/NtDll/Interop.NtQuerySystemInformation.cs index 3c4b72cd1c4..9f308bb9a16 100644 --- a/src/libraries/System.Private.CoreLib/src/Interop/Windows/NtDll/Interop.NtQuerySystemInformation.cs +++ b/src/libraries/System.Private.CoreLib/src/Interop/Windows/NtDll/Interop.NtQuerySystemInformation.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.InteropServices; internal partial class Interop 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 0bbae23a182..500f0f5b19e 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 @@ -3,10 +3,7 @@ // See the LICENSE file in the project root for more information. using System; -using System.Security; -using System.Runtime.InteropServices; using System.Threading; -using Microsoft.Win32; namespace Microsoft.Win32.SafeHandles { diff --git a/src/libraries/System.Private.CoreLib/src/Microsoft/Win32/SafeHandles/SafeFindHandle.Windows.cs b/src/libraries/System.Private.CoreLib/src/Microsoft/Win32/SafeHandles/SafeFindHandle.Windows.cs index 760ffaf73e3..c16b22d4f57 100644 --- a/src/libraries/System.Private.CoreLib/src/Microsoft/Win32/SafeHandles/SafeFindHandle.Windows.cs +++ b/src/libraries/System.Private.CoreLib/src/Microsoft/Win32/SafeHandles/SafeFindHandle.Windows.cs @@ -2,12 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Security; -using System.Runtime.InteropServices; -using System.Runtime.CompilerServices; -using Microsoft.Win32; - namespace Microsoft.Win32.SafeHandles { internal sealed class SafeFindHandle : SafeHandleZeroOrMinusOneIsInvalid diff --git a/src/libraries/System.Private.CoreLib/src/Microsoft/Win32/SafeHandles/SafeRegistryHandle.Windows.cs b/src/libraries/System.Private.CoreLib/src/Microsoft/Win32/SafeHandles/SafeRegistryHandle.Windows.cs index 249f5e9f7c2..cb3506bac4c 100644 --- a/src/libraries/System.Private.CoreLib/src/Microsoft/Win32/SafeHandles/SafeRegistryHandle.Windows.cs +++ b/src/libraries/System.Private.CoreLib/src/Microsoft/Win32/SafeHandles/SafeRegistryHandle.Windows.cs @@ -3,7 +3,6 @@ // See the LICENSE file in the project root for more information. using Microsoft.Win32.SafeHandles; -using System.Runtime.InteropServices; #if REGISTRY_ASSEMBLY namespace Microsoft.Win32.SafeHandles diff --git a/src/libraries/System.Private.CoreLib/src/System/AccessViolationException.cs b/src/libraries/System.Private.CoreLib/src/System/AccessViolationException.cs index f19b3c4ed76..1bd0a25ac08 100644 --- a/src/libraries/System.Private.CoreLib/src/System/AccessViolationException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/AccessViolationException.cs @@ -11,7 +11,6 @@ ** =============================================================================*/ -using System; using System.Runtime.Serialization; namespace System diff --git a/src/libraries/System.Private.CoreLib/src/System/AggregateException.cs b/src/libraries/System.Private.CoreLib/src/System/AggregateException.cs index 872f19e0cc8..e24ad1939b0 100644 --- a/src/libraries/System.Private.CoreLib/src/System/AggregateException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/AggregateException.cs @@ -2,16 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Diagnostics; using System.Globalization; using System.Runtime.ExceptionServices; using System.Runtime.Serialization; -using System.Security; using System.Text; -using System.Threading; namespace System { diff --git a/src/libraries/System.Private.CoreLib/src/System/ArgumentException.cs b/src/libraries/System.Private.CoreLib/src/System/ArgumentException.cs index b6d4ede6074..1a66f14e479 100644 --- a/src/libraries/System.Private.CoreLib/src/System/ArgumentException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/ArgumentException.cs @@ -11,7 +11,6 @@ ** =============================================================================*/ -using System.Globalization; using System.Runtime.Serialization; 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 6e5a1397c56..daf4f556ea4 100644 --- a/src/libraries/System.Private.CoreLib/src/System/ArgumentOutOfRangeException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/ArgumentOutOfRangeException.cs @@ -11,7 +11,6 @@ ** =============================================================================*/ -using System.Globalization; using System.Runtime.Serialization; 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 e8e5b12f717..710ef5df89d 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Array.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Array.cs @@ -8,7 +8,6 @@ using System.Collections.ObjectModel; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; using Internal.Runtime.CompilerServices; namespace System diff --git a/src/libraries/System.Private.CoreLib/src/System/AttributeUsageAttribute.cs b/src/libraries/System.Private.CoreLib/src/System/AttributeUsageAttribute.cs index dd8cae6d9a7..4c3c4f1fa95 100644 --- a/src/libraries/System.Private.CoreLib/src/System/AttributeUsageAttribute.cs +++ b/src/libraries/System.Private.CoreLib/src/System/AttributeUsageAttribute.cs @@ -11,8 +11,6 @@ ** ===========================================================*/ -using System.Reflection; - namespace System { /* By default, attributes are inherited and multiple attributes are not allowed */ diff --git a/src/libraries/System.Private.CoreLib/src/System/BadImageFormatException.cs b/src/libraries/System.Private.CoreLib/src/System/BadImageFormatException.cs index 0e98f711a92..f9072e98098 100644 --- a/src/libraries/System.Private.CoreLib/src/System/BadImageFormatException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/BadImageFormatException.cs @@ -11,7 +11,6 @@ ** ===========================================================*/ -using System.Globalization; using System.IO; using System.Runtime.Serialization; diff --git a/src/libraries/System.Private.CoreLib/src/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Float.cs b/src/libraries/System.Private.CoreLib/src/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Float.cs index dece61ecc51..41ce6833da6 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Float.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Buffers/Text/Utf8Formatter/Utf8Formatter.Float.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Diagnostics; using System.Globalization; using System.Text; diff --git a/src/libraries/System.Private.CoreLib/src/System/Buffers/TlsOverPerCoreLockedStacksArrayPool.cs b/src/libraries/System.Private.CoreLib/src/System/Buffers/TlsOverPerCoreLockedStacksArrayPool.cs index 2412ecac648..c1f0d82b6f7 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Buffers/TlsOverPerCoreLockedStacksArrayPool.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Buffers/TlsOverPerCoreLockedStacksArrayPool.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Collections.Generic; using System.Diagnostics; using System.Runtime.CompilerServices; diff --git a/src/libraries/System.Private.CoreLib/src/System/Collections/ArrayList.cs b/src/libraries/System.Private.CoreLib/src/System/Collections/ArrayList.cs index 170eb41684d..70f21d67eaf 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Collections/ArrayList.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Collections/ArrayList.cs @@ -12,7 +12,6 @@ ** ===========================================================*/ -using System.Security; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; diff --git a/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/ICollection.cs b/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/ICollection.cs index 61f6709086e..c5bb2d610a9 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/ICollection.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/ICollection.cs @@ -2,9 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Runtime.CompilerServices; - namespace System.Collections.Generic { // Base interface for all collections, defining enumerators, size, and diff --git a/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/IComparer.cs b/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/IComparer.cs index ba9be3dfcb9..d4fae2ecff9 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/IComparer.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/IComparer.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Diagnostics.CodeAnalysis; namespace System.Collections.Generic diff --git a/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/IDictionary.cs b/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/IDictionary.cs index a6441ce0905..a79782c9d20 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/IDictionary.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/IDictionary.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Diagnostics.CodeAnalysis; namespace System.Collections.Generic diff --git a/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/IEnumerator.cs b/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/IEnumerator.cs index a1fbf3e1a74..284bbe540ab 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/IEnumerator.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/IEnumerator.cs @@ -2,9 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Runtime.InteropServices; - namespace System.Collections.Generic { // Base interface for all generic enumerators, providing a simple approach diff --git a/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/IList.cs b/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/IList.cs index b2d322ac9b8..581b1d3bd40 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/IList.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/IList.cs @@ -2,10 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections; -using System.Runtime.CompilerServices; - namespace System.Collections.Generic { // An IList is an ordered collection of objects. The exact ordering diff --git a/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/IReadOnlyCollection.cs b/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/IReadOnlyCollection.cs index 9eea39de223..b9a80ffa8b5 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/IReadOnlyCollection.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/IReadOnlyCollection.cs @@ -2,9 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Runtime.CompilerServices; - namespace System.Collections.Generic { // Provides a read-only, covariant view of a generic list. diff --git a/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/IReadOnlyList.cs b/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/IReadOnlyList.cs index 7193805b068..ea54506fa82 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/IReadOnlyList.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/IReadOnlyList.cs @@ -2,9 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Runtime.CompilerServices; - namespace System.Collections.Generic { // Provides a read-only, covariant view of a generic list. diff --git a/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/List.cs b/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/List.cs index 34c02659aa6..4e3ea63c3a0 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/List.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/List.cs @@ -6,7 +6,6 @@ using System.Collections.ObjectModel; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; -using System.Threading; namespace System.Collections.Generic { diff --git a/src/libraries/System.Private.CoreLib/src/System/Collections/Hashtable.cs b/src/libraries/System.Private.CoreLib/src/System/Collections/Hashtable.cs index 1c907b3f1a6..4a8840884b5 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Collections/Hashtable.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Collections/Hashtable.cs @@ -13,7 +13,6 @@ ===========================================================*/ using System.Diagnostics; -using System.Runtime.CompilerServices; using System.Runtime.Serialization; using System.Threading; diff --git a/src/libraries/System.Private.CoreLib/src/System/Collections/ICollection.cs b/src/libraries/System.Private.CoreLib/src/System/Collections/ICollection.cs index 3037fcb4918..814e0eeffa9 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Collections/ICollection.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Collections/ICollection.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; - namespace System.Collections { // Base interface for all collections, defining enumerators, size, and diff --git a/src/libraries/System.Private.CoreLib/src/System/Collections/IDictionary.cs b/src/libraries/System.Private.CoreLib/src/System/Collections/IDictionary.cs index c85f4678b6f..003c2247563 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Collections/IDictionary.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Collections/IDictionary.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Diagnostics.CodeAnalysis; - namespace System.Collections { // An IDictionary is a possibly unordered set of key-value pairs. diff --git a/src/libraries/System.Private.CoreLib/src/System/Collections/IEnumerator.cs b/src/libraries/System.Private.CoreLib/src/System/Collections/IEnumerator.cs index b8e01727f5f..cce1fa9c65e 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Collections/IEnumerator.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Collections/IEnumerator.cs @@ -2,9 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Runtime.InteropServices; - namespace System.Collections { // Base interface for all enumerators, providing a simple approach diff --git a/src/libraries/System.Private.CoreLib/src/System/Collections/IList.cs b/src/libraries/System.Private.CoreLib/src/System/Collections/IList.cs index caeadf89407..a6b7e5a2aea 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Collections/IList.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Collections/IList.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; - namespace System.Collections { // An IList is an ordered collection of objects. The exact ordering diff --git a/src/libraries/System.Private.CoreLib/src/System/Collections/IStructuralComparable.cs b/src/libraries/System.Private.CoreLib/src/System/Collections/IStructuralComparable.cs index 1849e367c41..b1bb10e919e 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Collections/IStructuralComparable.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Collections/IStructuralComparable.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; - namespace System.Collections { public interface IStructuralComparable diff --git a/src/libraries/System.Private.CoreLib/src/System/Convert.cs b/src/libraries/System.Private.CoreLib/src/System/Convert.cs index e9c230c2022..b6c4b026876 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Convert.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Convert.cs @@ -2,14 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Globalization; -using System.Threading; -using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -using System.Runtime.Versioning; -using System.Security; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; diff --git a/src/libraries/System.Private.CoreLib/src/System/DateTime.cs b/src/libraries/System.Private.CoreLib/src/System/DateTime.cs index 48666795af1..3708d854887 100644 --- a/src/libraries/System.Private.CoreLib/src/System/DateTime.cs +++ b/src/libraries/System.Private.CoreLib/src/System/DateTime.cs @@ -2,16 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Diagnostics; -using System.Threading; using System.Globalization; -using System.Runtime; using System.Runtime.InteropServices; using System.Runtime.CompilerServices; using System.Runtime.Serialization; -using System.Runtime.Versioning; -using System.Security; using CultureInfo = System.Globalization.CultureInfo; using Calendar = System.Globalization.Calendar; diff --git a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Contracts/ContractFailedEventArgs.cs b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Contracts/ContractFailedEventArgs.cs index bce8138b767..61b7c3c19c3 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Contracts/ContractFailedEventArgs.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Contracts/ContractFailedEventArgs.cs @@ -2,12 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Diagnostics.CodeAnalysis; -using System.Reflection; - namespace System.Diagnostics.Contracts { public sealed class ContractFailedEventArgs : EventArgs 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 7d48064ebd4..12553cf4563 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 @@ -2,20 +2,18 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. + +#if ES_BUILD_STANDALONE using System; using System.Diagnostics; -using System.Threading; -using System.Runtime.CompilerServices; -#if !ES_BUILD_AGAINST_DOTNET_V35 -using Contract = System.Diagnostics.Contracts.Contract; #else -using Contract = Microsoft.Diagnostics.Contracts.Internal.Contract; +using System.Threading.Tasks; #endif +using System.Threading; #if ES_BUILD_STANDALONE namespace Microsoft.Diagnostics.Tracing #else -using System.Threading.Tasks; namespace System.Diagnostics.Tracing #endif { diff --git a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/CounterGroup.cs b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/CounterGroup.cs index cc4a5443f21..85000b99127 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/CounterGroup.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/CounterGroup.cs @@ -2,14 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#if ES_BUILD_STANDALONE using System; using System.Diagnostics; -using System.Collections; +#endif using System.Collections.Generic; using System.Threading; -#if ES_BUILD_PCL - using System.Threading.Tasks; -#endif #if ES_BUILD_STANDALONE namespace Microsoft.Diagnostics.Tracing @@ -42,7 +40,7 @@ namespace System.Diagnostics.Tracing _counters.Remove(eventCounter); } - #region EventSource Command Processing +#region EventSource Command Processing private void RegisterCommandCallback() { @@ -72,9 +70,9 @@ namespace System.Diagnostics.Tracing } } - #endregion // EventSource Command Processing +#endregion // EventSource Command Processing - #region Global CounterGroup Array management +#region Global CounterGroup Array management // We need eventCounters to 'attach' themselves to a particular EventSource. // this table provides the mapping from EventSource -> CounterGroup @@ -114,9 +112,9 @@ namespace System.Diagnostics.Tracing } } - #endregion // Global CounterGroup Array management +#endregion // Global CounterGroup Array management - #region Timer Processing +#region Timer Processing private DateTime _timeStampSinceCollectionStarted; private int _pollingIntervalInMilliseconds; @@ -262,7 +260,7 @@ namespace System.Diagnostics.Tracing } - #endregion // Timer Processing +#endregion // Timer Processing } } diff --git a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/CounterPayload.cs b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/CounterPayload.cs index 063df021525..d81fdafca31 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/CounterPayload.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/CounterPayload.cs @@ -2,14 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#if ES_BUILD_STANDALONE using System; using System.Diagnostics; +#endif using System.Collections; using System.Collections.Generic; -using System.Threading; -#if ES_BUILD_PCL - using System.Threading.Tasks; -#endif #if ES_BUILD_STANDALONE namespace Microsoft.Diagnostics.Tracing @@ -44,7 +42,7 @@ namespace System.Diagnostics.Tracing public string? DisplayUnits { get; set; } - #region Implementation of the IEnumerable interface +#region Implementation of the IEnumerable interface public IEnumerator> GetEnumerator() { @@ -75,7 +73,7 @@ namespace System.Diagnostics.Tracing } } - #endregion // Implementation of the IEnumerable interface +#endregion // Implementation of the IEnumerable interface } [EventData] @@ -99,7 +97,7 @@ namespace System.Diagnostics.Tracing public string? DisplayUnits { get; set; } - #region Implementation of the IEnumerable interface +#region Implementation of the IEnumerable interface public IEnumerator> GetEnumerator() { @@ -127,6 +125,6 @@ namespace System.Diagnostics.Tracing } } - #endregion // Implementation of the IEnumerable interface +#endregion // Implementation of the IEnumerable interface } } diff --git a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/DiagnosticCounter.cs b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/DiagnosticCounter.cs index 87fb34d6eab..a730392d004 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/DiagnosticCounter.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/DiagnosticCounter.cs @@ -2,15 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#if ES_BUILD_STANDALONE using System; using System.Diagnostics; -using System.Collections; +#endif using System.Collections.Generic; using System.Text; using System.Threading; -#if ES_BUILD_PCL - using System.Threading.Tasks; -#endif #if ES_BUILD_STANDALONE namespace Microsoft.Diagnostics.Tracing diff --git a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventActivityOptions.cs b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventActivityOptions.cs index 782afbf869c..02f60379c1e 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventActivityOptions.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventActivityOptions.cs @@ -2,7 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#if ES_BUILD_STANDALONE using System; +#endif #if ES_BUILD_STANDALONE namespace Microsoft.Diagnostics.Tracing diff --git a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventCounter.cs b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventCounter.cs index 59847f16f5c..2cad56acc70 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventCounter.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventCounter.cs @@ -2,14 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#if ES_BUILD_STANDALONE using System; using System.Diagnostics; -using System.Collections; -using System.Collections.Generic; -using System.Threading; -#if ES_BUILD_PCL - using System.Threading.Tasks; #endif +using System.Threading; #if ES_BUILD_STANDALONE namespace Microsoft.Diagnostics.Tracing diff --git a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventDescriptor.cs b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventDescriptor.cs index d3f443a29d4..9ac2fbf7d10 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventDescriptor.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventDescriptor.cs @@ -2,18 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Runtime.InteropServices; - #if ES_BUILD_STANDALONE +using System; using Environment = Microsoft.Diagnostics.Tracing.Internal.Environment; #endif - -#if !ES_BUILD_AGAINST_DOTNET_V35 -using Contract = System.Diagnostics.Contracts.Contract; -#else -using Contract = Microsoft.Diagnostics.Contracts.Internal.Contract; -#endif +using System.Runtime.InteropServices; #if ES_BUILD_STANDALONE namespace Microsoft.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 47b4ad48d4e..7d239b8a4e1 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,33 +2,21 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#if ES_BUILD_STANDALONE using Microsoft.Win32; -using System.Collections.Generic; +using System; using System.Diagnostics; +using System.Security.Permissions; +using BitOperations = Microsoft.Diagnostics.Tracing.Internal.BitOperations; +#endif +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Numerics; using System.Runtime.InteropServices; -using System.Security; -#if ES_BUILD_STANDALONE -using System.Security.Permissions; -#endif #if CORECLR && PLATFORM_WINDOWS using Internal.Win32; #endif -using System.Threading; -using System; - -#if ES_BUILD_STANDALONE -using BitOperations = Microsoft.Diagnostics.Tracing.Internal.BitOperations; -#endif - -#if !ES_BUILD_AGAINST_DOTNET_V35 -using Contract = System.Diagnostics.Contracts.Contract; -#else -using Contract = Microsoft.Diagnostics.Contracts.Internal.Contract; -#endif - #if ES_BUILD_AGAINST_DOTNET_V35 using Microsoft.Internal; // for Tuple (can't define alias for open generic types so we "use" the whole namespace) #endif diff --git a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventSource.cs b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventSource.cs index 83976702457..8e8cd51bfac 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventSource.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventSource.cs @@ -163,38 +163,27 @@ // This allows us to use the EventData* form to be the canonical data format in the low level APIs. This also gives us the // opportunity to expose this format to EventListeners in the future. // + +#if ES_BUILD_STANDALONE using System; +using System.Diagnostics; +using System.Security.Permissions; +using EventDescriptor = Microsoft.Diagnostics.Tracing.EventDescriptor; +using BitOperations = Microsoft.Diagnostics.Tracing.Internal.BitOperations; +#else +using System.Threading.Tasks; +#endif using System.Collections.Generic; using System.Collections.ObjectModel; -using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Numerics; using System.Reflection; using System.Resources; -using System.Security; -#if ES_BUILD_STANDALONE -using System.Security.Permissions; -#endif - using System.Text; using System.Threading; -using Microsoft.Win32; - -#if ES_BUILD_STANDALONE -using EventDescriptor = Microsoft.Diagnostics.Tracing.EventDescriptor; -using BitOperations = Microsoft.Diagnostics.Tracing.Internal.BitOperations; -#else -using System.Threading.Tasks; -#endif - using Microsoft.Reflection; -#if !ES_BUILD_AGAINST_DOTNET_V35 -using Contract = System.Diagnostics.Contracts.Contract; -#else -using Contract = Microsoft.Diagnostics.Contracts.Internal.Contract; -#endif #if ES_BUILD_STANDALONE namespace Microsoft.Diagnostics.Tracing diff --git a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventSourceException.cs b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventSourceException.cs index e145b7cfe3a..2a8515ad615 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventSourceException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventSourceException.cs @@ -2,12 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Runtime.Serialization; - #if ES_BUILD_STANDALONE +using System; using Environment = Microsoft.Diagnostics.Tracing.Internal.Environment; #endif +using System.Runtime.Serialization; #if ES_BUILD_STANDALONE namespace Microsoft.Diagnostics.Tracing diff --git a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/IEventProvider.cs b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/IEventProvider.cs index bc7ab9aee00..8dc95fe424c 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/IEventProvider.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/IEventProvider.cs @@ -2,8 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#if ES_BUILD_STANDALONE using System; -using Microsoft.Win32; +#endif #if ES_BUILD_STANDALONE namespace Microsoft.Diagnostics.Tracing diff --git a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/IncrementingEventCounter.cs b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/IncrementingEventCounter.cs index 6bd0cb05b0c..ee54cfd601b 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/IncrementingEventCounter.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/IncrementingEventCounter.cs @@ -2,13 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#if ES_BUILD_STANDALONE using System; using System.Diagnostics; -using System.Collections; -using System.Collections.Generic; -using System.Threading; -#if ES_BUILD_PCL - using System.Threading.Tasks; #endif #if ES_BUILD_STANDALONE diff --git a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/IncrementingPollingCounter.cs b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/IncrementingPollingCounter.cs index 4050daf38cb..48eb0b053e2 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/IncrementingPollingCounter.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/IncrementingPollingCounter.cs @@ -2,13 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#if ES_BUILD_STANDALONE using System; -using System.Diagnostics; -using System.Collections; -using System.Collections.Generic; -using System.Threading; -#if ES_BUILD_PCL - using System.Threading.Tasks; #endif #if ES_BUILD_STANDALONE diff --git a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/PollingCounter.cs b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/PollingCounter.cs index 3238fcf0357..d578b569d29 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/PollingCounter.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/PollingCounter.cs @@ -2,13 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#if ES_BUILD_STANDALONE using System; -using System.Diagnostics; -using System.Collections; -using System.Collections.Generic; -using System.Threading; -#if ES_BUILD_PCL - using System.Threading.Tasks; #endif #if ES_BUILD_STANDALONE diff --git a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/StubEnvironment.cs b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/StubEnvironment.cs index d4c82c4d4c3..236e0cbbc40 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/StubEnvironment.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/StubEnvironment.cs @@ -3,19 +3,21 @@ // See the LICENSE file in the project root for more information. using System; -using System.Reflection; +#if ES_BUILD_PCL || ES_BUILD_PN using System.Collections.Generic; -using Microsoft.Reflection; - -#if ES_BUILD_AGAINST_DOTNET_V35 -using Microsoft.Internal; #endif - +using System.Reflection; #if ES_BUILD_STANDALONE using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Security; +#endif +#if ES_BUILD_AGAINST_DOTNET_V35 +using Microsoft.Internal; +#endif +using Microsoft.Reflection; +#if ES_BUILD_STANDALONE namespace Microsoft.Diagnostics.Tracing.Internal #else namespace System.Diagnostics.Tracing.Internal @@ -223,7 +225,7 @@ namespace Microsoft.Reflection public static bool ReflectionOnly(this Assembly assm) { return assm.ReflectionOnly; } -#else // ES_BUILD_PCL +#else // // Type extension methods diff --git a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/ArrayTypeInfo.cs b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/ArrayTypeInfo.cs index b4aff0074eb..b9f4864089b 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/ArrayTypeInfo.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/ArrayTypeInfo.cs @@ -2,9 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#if ES_BUILD_STANDALONE using System; -using System.Collections.Generic; using System.Diagnostics; +#endif #if ES_BUILD_STANDALONE namespace Microsoft.Diagnostics.Tracing diff --git a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/ConcurrentSet.cs b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/ConcurrentSet.cs index 1105b5c9f55..590fc5b177b 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/ConcurrentSet.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/ConcurrentSet.cs @@ -2,8 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#if ES_BUILD_STANDALONE using System; -using Interlocked = System.Threading.Interlocked; +#endif +using System.Threading; #if ES_BUILD_STANDALONE namespace Microsoft.Diagnostics.Tracing diff --git a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/ConcurrentSetItem.cs b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/ConcurrentSetItem.cs index 558dbf670b5..7ef078f9090 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/ConcurrentSetItem.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/ConcurrentSetItem.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; - #if ES_BUILD_STANDALONE namespace Microsoft.Diagnostics.Tracing #else diff --git a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/DataCollector.cs b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/DataCollector.cs index 26d05ae800a..b7222f5e809 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/DataCollector.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/DataCollector.cs @@ -2,14 +2,14 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#if ES_BUILD_STANDALONE using System; using System.Diagnostics; -using System.Resources; +using Environment = Microsoft.Diagnostics.Tracing.Internal.Environment; +#endif using System.Runtime.InteropServices; -using System.Security; #if ES_BUILD_STANDALONE -using Environment = Microsoft.Diagnostics.Tracing.Internal.Environment; namespace Microsoft.Diagnostics.Tracing #else namespace System.Diagnostics.Tracing diff --git a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/EnumerableTypeInfo.cs b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/EnumerableTypeInfo.cs index ce8e4f41c0b..92a1a823f94 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/EnumerableTypeInfo.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/EnumerableTypeInfo.cs @@ -2,10 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#if ES_BUILD_STANDALONE using System; +using System.Diagnostics; +#endif using System.Collections; using System.Collections.Generic; -using System.Diagnostics; #if ES_BUILD_STANDALONE namespace Microsoft.Diagnostics.Tracing diff --git a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/EventDataAttribute.cs b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/EventDataAttribute.cs index c796fc1bd98..1dff4066a3f 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/EventDataAttribute.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/EventDataAttribute.cs @@ -2,7 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#if ES_BUILD_STANDALONE using System; +#endif #if ES_BUILD_STANDALONE namespace Microsoft.Diagnostics.Tracing diff --git a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/EventFieldAttribute.cs b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/EventFieldAttribute.cs index b3e4be4a7e4..cad4a9a0683 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/EventFieldAttribute.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/EventFieldAttribute.cs @@ -2,7 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#if ES_BUILD_STANDALONE using System; +#endif #if ES_BUILD_STANDALONE namespace Microsoft.Diagnostics.Tracing diff --git a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/EventIgnoreAttribute.cs b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/EventIgnoreAttribute.cs index 769345f78e0..81411ebe2d3 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/EventIgnoreAttribute.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/EventIgnoreAttribute.cs @@ -2,7 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#if ES_BUILD_STANDALONE using System; +#endif #if ES_BUILD_STANDALONE namespace Microsoft.Diagnostics.Tracing diff --git a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/EventPayload.cs b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/EventPayload.cs index f61e57ac184..4cd4ce178a3 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/EventPayload.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/EventPayload.cs @@ -2,18 +2,14 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#if ES_BUILD_STANDALONE using System; +using System.Diagnostics; +#endif using System.Collections; using System.Collections.Generic; -using System.Diagnostics; using System.Diagnostics.CodeAnalysis; -#if !ES_BUILD_AGAINST_DOTNET_V35 -using Contract = System.Diagnostics.Contracts.Contract; -#else -using Contract = Microsoft.Diagnostics.Contracts.Internal.Contract; -#endif - #if ES_BUILD_STANDALONE namespace Microsoft.Diagnostics.Tracing #else @@ -149,9 +145,9 @@ namespace System.Diagnostics.Tracing return false; } - #region private +#region private private readonly List m_names; private readonly List m_values; - #endregion +#endregion } } diff --git a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/EventSourceActivity.cs b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/EventSourceActivity.cs index 1d4e05d48b4..8d2835ff6c9 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/EventSourceActivity.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/EventSourceActivity.cs @@ -2,13 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#if ES_BUILD_STANDALONE using System; using System.Diagnostics; - -#if !ES_BUILD_AGAINST_DOTNET_V35 -using Contract = System.Diagnostics.Contracts.Contract; -#else -using Contract = Microsoft.Diagnostics.Contracts.Internal.Contract; #endif #if ES_BUILD_STANDALONE @@ -230,7 +226,7 @@ namespace System.Diagnostics.Tracing } } - #region private +#region private private EventSourceActivity Start(string? eventName, ref EventSourceOptions options, ref T data) { if (this.state != State.Started) @@ -312,6 +308,6 @@ namespace System.Diagnostics.Tracing private string? eventName; internal static Guid s_empty; - #endregion +#endregion } } diff --git a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/EventSourceOptions.cs b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/EventSourceOptions.cs index ed5df0adeda..1e52a191917 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/EventSourceOptions.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/EventSourceOptions.cs @@ -2,7 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#if ES_BUILD_STANDALONE using System; +#endif #if ES_BUILD_STANDALONE namespace Microsoft.Diagnostics.Tracing diff --git a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/FieldMetadata.cs b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/FieldMetadata.cs index fbe97653428..f785622296d 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/FieldMetadata.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/FieldMetadata.cs @@ -2,10 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#if ES_BUILD_STANDALONE using System; using System.Diagnostics; -using System.Resources; -using Encoding = System.Text.Encoding; +#endif +using System.Text; #if ES_BUILD_STANDALONE using Environment = Microsoft.Diagnostics.Tracing.Internal.Environment; diff --git a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/InvokeTypeInfo.cs b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/InvokeTypeInfo.cs index cfdd4db627b..f9a18a5a973 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/InvokeTypeInfo.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/InvokeTypeInfo.cs @@ -2,7 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#if ES_BUILD_STANDALONE using System; +#endif using System.Collections.Generic; #if ES_BUILD_STANDALONE diff --git a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/NameInfo.cs b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/NameInfo.cs index 2a95a7da38b..1685e6a47e6 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/NameInfo.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/NameInfo.cs @@ -2,10 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#if ES_BUILD_STANDALONE using System; +#endif using System.Collections.Generic; -using System.Collections.Concurrent; -using Interlocked = System.Threading.Interlocked; +using System.Threading; #if ES_BUILD_STANDALONE namespace Microsoft.Diagnostics.Tracing diff --git a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/PropertyAnalysis.cs b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/PropertyAnalysis.cs index aa79453177c..e7c2c08b275 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/PropertyAnalysis.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/PropertyAnalysis.cs @@ -2,7 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#if ES_BUILD_STANDALONE using System; +#endif using System.Reflection; #if ES_BUILD_STANDALONE diff --git a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/PropertyValue.cs b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/PropertyValue.cs index f0354b33865..645aab27244 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/PropertyValue.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/PropertyValue.cs @@ -2,16 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#if ES_BUILD_STANDALONE using System; -using System.Reflection; -using System.Runtime.InteropServices; using System.Diagnostics; - -#if !ES_BUILD_AGAINST_DOTNET_V35 -using Contract = System.Diagnostics.Contracts.Contract; -#else -using Contract = Microsoft.Diagnostics.Contracts.Internal.Contract; #endif +using System.Reflection; +using System.Runtime.InteropServices; #if ES_BUILD_STANDALONE namespace Microsoft.Diagnostics.Tracing diff --git a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/SimpleEventTypes.cs b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/SimpleEventTypes.cs index 2bcfcdcf56d..c85ec92febf 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/SimpleEventTypes.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/SimpleEventTypes.cs @@ -2,9 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#if ES_BUILD_STANDALONE using System; using System.Diagnostics; -using Interlocked = System.Threading.Interlocked; +#endif +using System.Threading; #if ES_BUILD_STANDALONE namespace Microsoft.Diagnostics.Tracing diff --git a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/SimpleTypeInfos.cs b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/SimpleTypeInfos.cs index a1f31be0893..0525413ccd9 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/SimpleTypeInfos.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/SimpleTypeInfos.cs @@ -2,16 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#if ES_BUILD_STANDALONE using System; -using System.Collections.Generic; -using System.Reflection; using System.Diagnostics; - -#if !ES_BUILD_AGAINST_DOTNET_V35 -using Contract = System.Diagnostics.Contracts.Contract; -#else -using Contract = Microsoft.Diagnostics.Contracts.Internal.Contract; #endif +using System.Collections.Generic; +using System.Reflection; #if ES_BUILD_STANDALONE namespace Microsoft.Diagnostics.Tracing diff --git a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/Statics.cs b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/Statics.cs index a6f25e7f456..16dcc4dcc84 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/Statics.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/Statics.cs @@ -2,18 +2,17 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#if ES_BUILD_STANDALONE using System; +using Environment = Microsoft.Diagnostics.Tracing.Internal.Environment; +#endif using System.Collections.Generic; using System.Reflection; -using System.Resources; using System.Runtime.CompilerServices; -using Encoding = System.Text.Encoding; - +using System.Text; using Microsoft.Reflection; -using System.Diagnostics.CodeAnalysis; #if ES_BUILD_STANDALONE -using Environment = Microsoft.Diagnostics.Tracing.Internal.Environment; namespace Microsoft.Diagnostics.Tracing #else namespace System.Diagnostics.Tracing diff --git a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/TraceLoggingDataCollector.cs b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/TraceLoggingDataCollector.cs index 48ef0b9e1bf..a5b7621b647 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/TraceLoggingDataCollector.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/TraceLoggingDataCollector.cs @@ -2,8 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#if ES_BUILD_STANDALONE using System; -using System.Security; +#endif #if ES_BUILD_STANDALONE namespace Microsoft.Diagnostics.Tracing diff --git a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/TraceLoggingDataType.cs b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/TraceLoggingDataType.cs index fc0e76b17de..a71bf635756 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/TraceLoggingDataType.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/TraceLoggingDataType.cs @@ -2,7 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#if ES_BUILD_STANDALONE using System; +#endif #if ES_BUILD_STANDALONE namespace Microsoft.Diagnostics.Tracing diff --git a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/TraceLoggingEventSource.cs b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/TraceLoggingEventSource.cs index 71c4330b805..4eb2864f9ea 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/TraceLoggingEventSource.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/TraceLoggingEventSource.cs @@ -15,26 +15,15 @@ #endif #if ES_BUILD_STANDALONE +using System; +using System.Diagnostics; using Environment = Microsoft.Diagnostics.Tracing.Internal.Environment; using EventDescriptor = Microsoft.Diagnostics.Tracing.EventDescriptor; #endif - -using System; -using System.Diagnostics; -using System.Resources; -using System.Runtime.InteropServices; -using System.Security; -using System.Collections.ObjectModel; - -#if !ES_BUILD_AGAINST_DOTNET_V35 -using Contract = System.Diagnostics.Contracts.Contract; -using System.Collections.Generic; -using System.Text; -#else -using Contract = Microsoft.Diagnostics.Contracts.Internal.Contract; using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.InteropServices; using System.Text; -#endif #if ES_BUILD_STANDALONE namespace Microsoft.Diagnostics.Tracing diff --git a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/TraceLoggingEventTraits.cs b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/TraceLoggingEventTraits.cs index e808a8823c1..e25ae7fdc23 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/TraceLoggingEventTraits.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/TraceLoggingEventTraits.cs @@ -2,7 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#if ES_BUILD_STANDALONE using System; +#endif #if ES_BUILD_STANDALONE namespace Microsoft.Diagnostics.Tracing diff --git a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/TraceLoggingEventTypes.cs b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/TraceLoggingEventTypes.cs index f003fa0d0af..6866769ecb9 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/TraceLoggingEventTypes.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/TraceLoggingEventTypes.cs @@ -2,15 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#if ES_BUILD_STANDALONE using System; -using System.Collections.Generic; -using Interlocked = System.Threading.Interlocked; - -#if !ES_BUILD_AGAINST_DOTNET_V35 -using Contract = System.Diagnostics.Contracts.Contract; -#else -using Contract = Microsoft.Diagnostics.Contracts.Internal.Contract; #endif +using System.Collections.Generic; #if ES_BUILD_STANDALONE namespace Microsoft.Diagnostics.Tracing diff --git a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/TraceLoggingMetadataCollector.cs b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/TraceLoggingMetadataCollector.cs index 888e3ce60ec..4ab1d054932 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/TraceLoggingMetadataCollector.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/TraceLoggingMetadataCollector.cs @@ -2,11 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#if ES_BUILD_STANDALONE using System; +using Environment = Microsoft.Diagnostics.Tracing.Internal.Environment; +#endif using System.Collections.Generic; #if ES_BUILD_STANDALONE -using Environment = Microsoft.Diagnostics.Tracing.Internal.Environment; namespace Microsoft.Diagnostics.Tracing #else namespace System.Diagnostics.Tracing diff --git a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/TraceLoggingTypeInfo.cs b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/TraceLoggingTypeInfo.cs index b5c0067cbb7..a34675facac 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/TraceLoggingTypeInfo.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/TraceLoggingTypeInfo.cs @@ -2,14 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#if ES_BUILD_STANDALONE using System; -using System.Collections.Generic; - -#if !ES_BUILD_AGAINST_DOTNET_V35 -using Contract = System.Diagnostics.Contracts.Contract; -#else -using Contract = Microsoft.Diagnostics.Contracts.Internal.Contract; #endif +using System.Collections.Generic; #if ES_BUILD_STANDALONE namespace Microsoft.Diagnostics.Tracing diff --git a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/TypeAnalysis.cs b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/TypeAnalysis.cs index f14c691ac37..571298623bd 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/TypeAnalysis.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/TypeAnalysis.cs @@ -2,11 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#if ES_BUILD_STANDALONE using System; +#endif using System.Collections.Generic; using System.Reflection; - #if ES_BUILD_STANDALONE namespace Microsoft.Diagnostics.Tracing #else diff --git a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/Winmeta.cs b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/Winmeta.cs index 4c79047225a..5c23c8232ee 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/Winmeta.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/Winmeta.cs @@ -10,8 +10,10 @@ ** environment. ** ============================================================*/ + #if ES_BUILD_STANDALONE #define FEATURE_MANAGED_ETW_CHANNELS +using System; #endif #if ES_BUILD_STANDALONE @@ -20,8 +22,6 @@ namespace Microsoft.Diagnostics.Tracing namespace System.Diagnostics.Tracing #endif { - using System; - /// /// WindowsEventLevel. Custom values must be in the range from 16 through 255 /// diff --git a/src/libraries/System.Private.CoreLib/src/System/Double.cs b/src/libraries/System.Private.CoreLib/src/System/Double.cs index 21a32e267ba..f59ad627800 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Double.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Double.cs @@ -12,7 +12,6 @@ ** ===========================================================*/ -using System.Diagnostics; using System.Globalization; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; diff --git a/src/libraries/System.Private.CoreLib/src/System/EntryPointNotFoundException.cs b/src/libraries/System.Private.CoreLib/src/System/EntryPointNotFoundException.cs index e8b735c44b5..719d28243c8 100644 --- a/src/libraries/System.Private.CoreLib/src/System/EntryPointNotFoundException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/EntryPointNotFoundException.cs @@ -11,7 +11,6 @@ ** =============================================================================*/ -using System; using System.Runtime.Serialization; namespace System diff --git a/src/libraries/System.Private.CoreLib/src/System/EventArgs.cs b/src/libraries/System.Private.CoreLib/src/System/EventArgs.cs index f3561a8d0b1..0a47428bb5e 100644 --- a/src/libraries/System.Private.CoreLib/src/System/EventArgs.cs +++ b/src/libraries/System.Private.CoreLib/src/System/EventArgs.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; - namespace System { // The base class for all event classes. diff --git a/src/libraries/System.Private.CoreLib/src/System/EventHandler.cs b/src/libraries/System.Private.CoreLib/src/System/EventHandler.cs index 89c5de022ba..05f53338ebb 100644 --- a/src/libraries/System.Private.CoreLib/src/System/EventHandler.cs +++ b/src/libraries/System.Private.CoreLib/src/System/EventHandler.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; - namespace System { public delegate void EventHandler(object? sender, EventArgs e); diff --git a/src/libraries/System.Private.CoreLib/src/System/ExecutionEngineException.cs b/src/libraries/System.Private.CoreLib/src/System/ExecutionEngineException.cs index b804599fc1f..681f82b0f50 100644 --- a/src/libraries/System.Private.CoreLib/src/System/ExecutionEngineException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/ExecutionEngineException.cs @@ -15,7 +15,6 @@ ** =============================================================================*/ -using System; using System.Runtime.Serialization; namespace System diff --git a/src/libraries/System.Private.CoreLib/src/System/Globalization/Calendar.cs b/src/libraries/System.Private.CoreLib/src/System/Globalization/Calendar.cs index 86e630180c3..ff787fb3477 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Globalization/Calendar.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Globalization/Calendar.cs @@ -3,7 +3,6 @@ // See the LICENSE file in the project root for more information. using System.Diagnostics; -using System.Runtime.Serialization; namespace System.Globalization { diff --git a/src/libraries/System.Private.CoreLib/src/System/Globalization/CalendarData.Windows.cs b/src/libraries/System.Private.CoreLib/src/System/Globalization/CalendarData.Windows.cs index e103e2ef136..7eefdd248e1 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Globalization/CalendarData.Windows.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Globalization/CalendarData.Windows.cs @@ -2,10 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Diagnostics; -using System.Runtime.InteropServices; -using System.Runtime.CompilerServices; using System.Collections.Generic; using Internal.Runtime.CompilerServices; diff --git a/src/libraries/System.Private.CoreLib/src/System/Globalization/CompareInfo.Windows.cs b/src/libraries/System.Private.CoreLib/src/System/Globalization/CompareInfo.Windows.cs index 67c9cdcaf06..d271c73f6f1 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Globalization/CompareInfo.Windows.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Globalization/CompareInfo.Windows.cs @@ -6,8 +6,6 @@ using System.Buffers; using System.Diagnostics; using System.Runtime.InteropServices; -using Internal.Runtime.CompilerServices; - namespace System.Globalization { public partial class CompareInfo diff --git a/src/libraries/System.Private.CoreLib/src/System/Globalization/CultureData.Windows.cs b/src/libraries/System.Private.CoreLib/src/System/Globalization/CultureData.Windows.cs index f54ac139f9c..fcda6b7135b 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Globalization/CultureData.Windows.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Globalization/CultureData.Windows.cs @@ -5,13 +5,11 @@ using System.Collections.Generic; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; -using System.Runtime.InteropServices; using System.Text; -using Internal.Runtime.CompilerServices; - #if ENABLE_WINRT using Internal.Runtime.Augments; #endif +using Internal.Runtime.CompilerServices; namespace System.Globalization { diff --git a/src/libraries/System.Private.CoreLib/src/System/Globalization/GlobalizationExtensions.cs b/src/libraries/System.Private.CoreLib/src/System/Globalization/GlobalizationExtensions.cs index 007283aa6b1..2e61b5394ab 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Globalization/GlobalizationExtensions.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Globalization/GlobalizationExtensions.cs @@ -2,9 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Diagnostics; - namespace System.Globalization { public static class GlobalizationExtensions diff --git a/src/libraries/System.Private.CoreLib/src/System/Globalization/GregorianCalendarHelper.cs b/src/libraries/System.Private.CoreLib/src/System/Globalization/GregorianCalendarHelper.cs index feaf138e319..154791282d3 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Globalization/GregorianCalendarHelper.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Globalization/GregorianCalendarHelper.cs @@ -2,9 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Threading; - namespace System.Globalization { // Gregorian Calendars use Era Info diff --git a/src/libraries/System.Private.CoreLib/src/System/Globalization/JapaneseCalendar.Win32.cs b/src/libraries/System.Private.CoreLib/src/System/Globalization/JapaneseCalendar.Win32.cs index cf70ce2fb6c..866765c42ca 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Globalization/JapaneseCalendar.Win32.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Globalization/JapaneseCalendar.Win32.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Diagnostics; - using Internal.Win32; namespace System.Globalization diff --git a/src/libraries/System.Private.CoreLib/src/System/Globalization/TaiwanCalendar.cs b/src/libraries/System.Private.CoreLib/src/System/Globalization/TaiwanCalendar.cs index d9bd2215380..9239731f111 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Globalization/TaiwanCalendar.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Globalization/TaiwanCalendar.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Diagnostics.CodeAnalysis; - namespace System.Globalization { /// diff --git a/src/libraries/System.Private.CoreLib/src/System/Globalization/TextInfo.cs b/src/libraries/System.Private.CoreLib/src/System/Globalization/TextInfo.cs index 52ea35043db..29ad0ede3f4 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Globalization/TextInfo.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Globalization/TextInfo.cs @@ -13,10 +13,8 @@ using Internal.Runtime.CompilerServices; #pragma warning disable SA1121 // explicitly using type aliases instead of built-in types #if BIT64 using nuint = System.UInt64; -using nint = System.Int64; #else // BIT64 using nuint = System.UInt32; -using nint = System.Int32; #endif // BIT64 namespace System.Globalization diff --git a/src/libraries/System.Private.CoreLib/src/System/HResults.cs b/src/libraries/System.Private.CoreLib/src/System/HResults.cs index 4bc5a4bdf46..aa524f7f24f 100644 --- a/src/libraries/System.Private.CoreLib/src/System/HResults.cs +++ b/src/libraries/System.Private.CoreLib/src/System/HResults.cs @@ -18,8 +18,6 @@ // Reflection will use 0x1600 -> 0x161f. IO will use 0x1620 -> 0x163f. // Security will use 0x1640 -> 0x165f -using System; - namespace System { internal static partial class HResults diff --git a/src/libraries/System.Private.CoreLib/src/System/IO/DriveInfoInternal.Windows.cs b/src/libraries/System.Private.CoreLib/src/System/IO/DriveInfoInternal.Windows.cs index 003bf63c521..c811a876920 100644 --- a/src/libraries/System.Private.CoreLib/src/System/IO/DriveInfoInternal.Windows.cs +++ b/src/libraries/System.Private.CoreLib/src/System/IO/DriveInfoInternal.Windows.cs @@ -4,7 +4,6 @@ #nullable enable using System.Diagnostics; -using System.Text; namespace System.IO { diff --git a/src/libraries/System.Private.CoreLib/src/System/IO/FileAccess.cs b/src/libraries/System.Private.CoreLib/src/System/IO/FileAccess.cs index 9910f69f28e..c0b75374522 100644 --- a/src/libraries/System.Private.CoreLib/src/System/IO/FileAccess.cs +++ b/src/libraries/System.Private.CoreLib/src/System/IO/FileAccess.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; - namespace System.IO { // Contains constants for specifying the access you want for a file. diff --git a/src/libraries/System.Private.CoreLib/src/System/IO/FileOptions.cs b/src/libraries/System.Private.CoreLib/src/System/IO/FileOptions.cs index 145fb2b6db6..eed14c86b05 100644 --- a/src/libraries/System.Private.CoreLib/src/System/IO/FileOptions.cs +++ b/src/libraries/System.Private.CoreLib/src/System/IO/FileOptions.cs @@ -2,9 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Runtime.InteropServices; - namespace System.IO { // Maps to FILE_FLAG_DELETE_ON_CLOSE and similar values from winbase.h. diff --git a/src/libraries/System.Private.CoreLib/src/System/IO/FileShare.cs b/src/libraries/System.Private.CoreLib/src/System/IO/FileShare.cs index 05c20b44ee2..24742a71b3f 100644 --- a/src/libraries/System.Private.CoreLib/src/System/IO/FileShare.cs +++ b/src/libraries/System.Private.CoreLib/src/System/IO/FileShare.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; - namespace System.IO { // Contains constants for controlling file sharing options while 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 6b60ce76a36..8c1317c905a 100644 --- a/src/libraries/System.Private.CoreLib/src/System/IO/PinnedBufferMemoryStream.cs +++ b/src/libraries/System.Private.CoreLib/src/System/IO/PinnedBufferMemoryStream.cs @@ -14,7 +14,6 @@ ** ===========================================================*/ -using System; using System.Runtime.InteropServices; using System.Diagnostics; 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 4b01f6e793d..7a4896fc098 100644 --- a/src/libraries/System.Private.CoreLib/src/System/IO/TextReader.cs +++ b/src/libraries/System.Private.CoreLib/src/System/IO/TextReader.cs @@ -5,7 +5,6 @@ using System.Text; using System.Threading; using System.Threading.Tasks; -using System.Diagnostics; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Buffers; diff --git a/src/libraries/System.Private.CoreLib/src/System/Memory.cs b/src/libraries/System.Private.CoreLib/src/System/Memory.cs index beeb0251996..25f5d8f7173 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Memory.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Memory.cs @@ -14,10 +14,8 @@ using Internal.Runtime.CompilerServices; #pragma warning disable SA1121 // explicitly using type aliases instead of built-in types #if BIT64 -using nint = System.Int64; using nuint = System.UInt64; #else // BIT64 -using nint = System.Int32; using nuint = System.UInt32; #endif // BIT64 diff --git a/src/libraries/System.Private.CoreLib/src/System/Number.Dragon4.cs b/src/libraries/System.Private.CoreLib/src/System/Number.Dragon4.cs index 24e5ab224e8..24583396236 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Number.Dragon4.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Number.Dragon4.cs @@ -4,7 +4,6 @@ using System.Diagnostics; using System.Numerics; -using Internal.Runtime.CompilerServices; namespace System { diff --git a/src/libraries/System.Private.CoreLib/src/System/ObjectDisposedException.cs b/src/libraries/System.Private.CoreLib/src/System/ObjectDisposedException.cs index a80522af297..09d43ed6667 100644 --- a/src/libraries/System.Private.CoreLib/src/System/ObjectDisposedException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/ObjectDisposedException.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Globalization; using System.Runtime.CompilerServices; using System.Runtime.Serialization; diff --git a/src/libraries/System.Private.CoreLib/src/System/OperationCanceledException.cs b/src/libraries/System.Private.CoreLib/src/System/OperationCanceledException.cs index 09e708b679e..31896e1e744 100644 --- a/src/libraries/System.Private.CoreLib/src/System/OperationCanceledException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/OperationCanceledException.cs @@ -11,7 +11,6 @@ ** ===========================================================*/ -using System; using System.Runtime.Serialization; using System.Threading; diff --git a/src/libraries/System.Private.CoreLib/src/System/PasteArguments.Windows.cs b/src/libraries/System.Private.CoreLib/src/System/PasteArguments.Windows.cs index 7cdcbc4533a..677d8481653 100644 --- a/src/libraries/System.Private.CoreLib/src/System/PasteArguments.Windows.cs +++ b/src/libraries/System.Private.CoreLib/src/System/PasteArguments.Windows.cs @@ -3,7 +3,6 @@ // See the LICENSE file in the project root for more information. using System.Collections.Generic; -using System.Runtime.CompilerServices; using System.Text; namespace System diff --git a/src/libraries/System.Private.CoreLib/src/System/ReadOnlyMemory.cs b/src/libraries/System.Private.CoreLib/src/System/ReadOnlyMemory.cs index 3b290efe4e8..18843adb8e4 100644 --- a/src/libraries/System.Private.CoreLib/src/System/ReadOnlyMemory.cs +++ b/src/libraries/System.Private.CoreLib/src/System/ReadOnlyMemory.cs @@ -14,10 +14,8 @@ using Internal.Runtime.CompilerServices; #pragma warning disable SA1121 // explicitly using type aliases instead of built-in types #if BIT64 -using nint = System.Int64; using nuint = System.UInt64; #else // BIT64 -using nint = System.Int32; using nuint = System.UInt32; #endif // BIT64 diff --git a/src/libraries/System.Private.CoreLib/src/System/Reflection/AssemblyName.cs b/src/libraries/System.Private.CoreLib/src/System/Reflection/AssemblyName.cs index 8ccdde70091..7c348b3b7a6 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Reflection/AssemblyName.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Reflection/AssemblyName.cs @@ -3,7 +3,6 @@ // See the LICENSE file in the project root for more information. using System.Configuration.Assemblies; -using System.IO; using System.Runtime.Serialization; using System.Text; using CultureInfo = System.Globalization.CultureInfo; diff --git a/src/libraries/System.Private.CoreLib/src/System/Reflection/IntrospectionExtensions.cs b/src/libraries/System.Private.CoreLib/src/System/Reflection/IntrospectionExtensions.cs index 39b00baa1f3..d9674f94b26 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Reflection/IntrospectionExtensions.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Reflection/IntrospectionExtensions.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Diagnostics; - namespace System.Reflection { public static class IntrospectionExtensions diff --git a/src/libraries/System.Private.CoreLib/src/System/Reflection/SignatureTypeExtensions.cs b/src/libraries/System.Private.CoreLib/src/System/Reflection/SignatureTypeExtensions.cs index 050c0a7ff6f..c83f25b0e19 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Reflection/SignatureTypeExtensions.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Reflection/SignatureTypeExtensions.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Diagnostics; - namespace System.Reflection { #if CORERT diff --git a/src/libraries/System.Private.CoreLib/src/System/Resources/FileBasedResourceGroveler.cs b/src/libraries/System.Private.CoreLib/src/System/Resources/FileBasedResourceGroveler.cs index afcdd293efb..bfe217975a4 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Resources/FileBasedResourceGroveler.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Resources/FileBasedResourceGroveler.cs @@ -15,7 +15,6 @@ using System.Collections.Generic; using System.Diagnostics; using System.Globalization; using System.IO; -using System.Threading; using Internal.IO; 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 64256bb89d9..c8090aae365 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Resources/IResourceGroveler.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Resources/IResourceGroveler.cs @@ -13,11 +13,8 @@ ** ===========================================================*/ -using System; using System.Globalization; -using System.Threading; using System.Collections.Generic; -using System.Runtime.Versioning; namespace System.Resources { diff --git a/src/libraries/System.Private.CoreLib/src/System/Resources/IResourceReader.cs b/src/libraries/System.Private.CoreLib/src/System/Resources/IResourceReader.cs index 68e9dec5952..e45605a8305 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Resources/IResourceReader.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Resources/IResourceReader.cs @@ -13,7 +13,6 @@ ** ===========================================================*/ -using System; using System.Collections; namespace System.Resources diff --git a/src/libraries/System.Private.CoreLib/src/System/Resources/ManifestBasedResourceGroveler.cs b/src/libraries/System.Private.CoreLib/src/System/Resources/ManifestBasedResourceGroveler.cs index e23a0349c3c..da7ece8284d 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Resources/ManifestBasedResourceGroveler.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Resources/ManifestBasedResourceGroveler.cs @@ -14,22 +14,15 @@ ** ===========================================================*/ +using System.Collections.Generic; +using System.Globalization; +using System.IO; +using System.Reflection; +using System.Text; +using System.Diagnostics; + namespace System.Resources { - using System; - using System.Collections; - using System.Collections.Generic; - using System.Globalization; - using System.IO; - using System.Reflection; - using System.Runtime.InteropServices; - using System.Runtime.CompilerServices; - using System.Runtime.Versioning; - using System.Text; - using System.Threading; - using System.Diagnostics; - using Microsoft.Win32; - // // Note: this type is integral to the construction of exception objects, // and sometimes this has to be done in low memory situtations (OOM) or diff --git a/src/libraries/System.Private.CoreLib/src/System/Resources/ResourceFallbackManager.cs b/src/libraries/System.Private.CoreLib/src/System/Resources/ResourceFallbackManager.cs index 70c8d8cc6b6..a78042f8e85 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Resources/ResourceFallbackManager.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Resources/ResourceFallbackManager.cs @@ -14,13 +14,9 @@ ** ===========================================================*/ -using System; using System.Collections; using System.Collections.Generic; using System.Globalization; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.Versioning; namespace System.Resources { diff --git a/src/libraries/System.Private.CoreLib/src/System/Resources/ResourceManager.Uap.cs b/src/libraries/System.Private.CoreLib/src/System/Resources/ResourceManager.Uap.cs index dd3ca1efe86..be4d7dd4edf 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Resources/ResourceManager.Uap.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Resources/ResourceManager.Uap.cs @@ -2,19 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.IO; using System.Globalization; -using System.Collections; -using System.Text; using System.Reflection; -using System.Security; -using System.Threading; -using System.Runtime.InteropServices; -using System.Runtime.CompilerServices; -using Microsoft.Win32; -using System.Collections.Generic; -using System.Runtime.Versioning; using System.Diagnostics; using Internal.Resources; diff --git a/src/libraries/System.Private.CoreLib/src/System/Resources/ResourceReader.cs b/src/libraries/System.Private.CoreLib/src/System/Resources/ResourceReader.cs index 470325472b5..673f05a80bd 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Resources/ResourceReader.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Resources/ResourceReader.cs @@ -3,7 +3,6 @@ // See the LICENSE file in the project root for more information. #nullable enable -using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; @@ -18,6 +17,7 @@ namespace System.Resources #if RESOURCES_EXTENSIONS using ResourceReader = DeserializingResourceReader; #endif + // Provides the default implementation of IResourceReader, reading // .resources file from the system default binary format. This class // can be treated as an enumerator once. diff --git a/src/libraries/System.Private.CoreLib/src/System/Resources/UltimateResourceFallbackLocation.cs b/src/libraries/System.Private.CoreLib/src/System/Resources/UltimateResourceFallbackLocation.cs index 83640ec9fe5..b390cc24c51 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Resources/UltimateResourceFallbackLocation.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Resources/UltimateResourceFallbackLocation.cs @@ -13,8 +13,6 @@ ** ===========================================================*/ -using System; - namespace System.Resources { public enum UltimateResourceFallbackLocation diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncMethodBuilder.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncMethodBuilder.cs index 98a52f5d6e9..ba0b52e2b06 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncMethodBuilder.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncMethodBuilder.cs @@ -13,7 +13,6 @@ using System.Diagnostics; using System.Diagnostics.Tracing; using System.Reflection; -using System.Runtime.ExceptionServices; using System.Threading; using System.Threading.Tasks; using System.Text; diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncValueTaskMethodBuilder.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncValueTaskMethodBuilder.cs index b84652a1044..ffd975389c5 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncValueTaskMethodBuilder.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncValueTaskMethodBuilder.cs @@ -3,7 +3,6 @@ // See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; -using System.Security; using System.Threading.Tasks; namespace System.Runtime.CompilerServices diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/ExtensionAttribute.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/ExtensionAttribute.cs index 92170880f1d..d971d633ef3 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/ExtensionAttribute.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/ExtensionAttribute.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; - namespace System.Runtime.CompilerServices { /// diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Aes.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Aes.cs index 45a3735afd8..20e4a26a76a 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Aes.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Aes.cs @@ -2,9 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.CompilerServices; -using System.Runtime.Intrinsics; namespace System.Runtime.Intrinsics.X86 { diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Avx.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Avx.cs index 29e7011ee80..cf12b20bd21 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Avx.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Avx.cs @@ -2,10 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.CompilerServices; -using System.Runtime.Intrinsics; -using Internal.Runtime.CompilerServices; namespace System.Runtime.Intrinsics.X86 { diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Avx2.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Avx2.cs index f3e5877447d..a3ff0add1b8 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Avx2.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Avx2.cs @@ -2,9 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.CompilerServices; -using System.Runtime.Intrinsics; namespace System.Runtime.Intrinsics.X86 { diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Bmi1.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Bmi1.cs index 496b8aede50..32e72af9ebe 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Bmi1.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Bmi1.cs @@ -2,9 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.CompilerServices; -using System.Runtime.Intrinsics; namespace System.Runtime.Intrinsics.X86 { diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Bmi2.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Bmi2.cs index 1d0f6af1749..3c692e19bfc 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Bmi2.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Bmi2.cs @@ -2,9 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.CompilerServices; -using System.Runtime.Intrinsics; namespace System.Runtime.Intrinsics.X86 { diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Fma.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Fma.cs index 6bbf6a9e1d8..2e096613bea 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Fma.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Fma.cs @@ -2,9 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.CompilerServices; -using System.Runtime.Intrinsics; namespace System.Runtime.Intrinsics.X86 { diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Lzcnt.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Lzcnt.cs index ff1576e6459..63c2bb865f8 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Lzcnt.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Lzcnt.cs @@ -2,9 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.CompilerServices; -using System.Runtime.Intrinsics; namespace System.Runtime.Intrinsics.X86 { diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Pclmulqdq.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Pclmulqdq.cs index 29104b9d242..f9f53d51966 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Pclmulqdq.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Pclmulqdq.cs @@ -2,9 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.CompilerServices; -using System.Runtime.Intrinsics; namespace System.Runtime.Intrinsics.X86 { diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Popcnt.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Popcnt.cs index af918e92d9c..6b5a71973a7 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Popcnt.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Popcnt.cs @@ -2,9 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.CompilerServices; -using System.Runtime.Intrinsics; namespace System.Runtime.Intrinsics.X86 { diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Sse.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Sse.cs index 0d2ba58dd1e..ff847d8305d 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Sse.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Sse.cs @@ -2,9 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.CompilerServices; -using System.Runtime.Intrinsics; namespace System.Runtime.Intrinsics.X86 { diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Sse2.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Sse2.cs index 47583b0aae6..464faffc7df 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Sse2.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Sse2.cs @@ -2,9 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.CompilerServices; -using System.Runtime.Intrinsics; namespace System.Runtime.Intrinsics.X86 { diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Sse3.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Sse3.cs index 6cbf3ae5232..f8e10e17e3c 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Sse3.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Sse3.cs @@ -2,9 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.CompilerServices; -using System.Runtime.Intrinsics; namespace System.Runtime.Intrinsics.X86 { diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Sse41.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Sse41.cs index 9d78feb6359..300b8f0af33 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Sse41.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Sse41.cs @@ -2,9 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.CompilerServices; -using System.Runtime.Intrinsics; namespace System.Runtime.Intrinsics.X86 { diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Sse42.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Sse42.cs index c2318fd113e..fde754ab7e9 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Sse42.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Sse42.cs @@ -2,9 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.CompilerServices; -using System.Runtime.Intrinsics; namespace System.Runtime.Intrinsics.X86 { diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Ssse3.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Ssse3.cs index eda455c2f95..389dd08086f 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Ssse3.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Ssse3.cs @@ -2,9 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Runtime.CompilerServices; -using System.Runtime.Intrinsics; namespace System.Runtime.Intrinsics.X86 { diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/MemoryFailPoint.Windows.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/MemoryFailPoint.Windows.cs index 5d5c707e2f1..0c02ffba34d 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/MemoryFailPoint.Windows.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/MemoryFailPoint.Windows.cs @@ -3,7 +3,6 @@ // See the LICENSE file in the project root for more information. using System.IO; -using System.Runtime.InteropServices; namespace System.Runtime { diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/Serialization/SafeSerializationEventArgs.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/Serialization/SafeSerializationEventArgs.cs index ccc518ff96a..d6613b4ac22 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Runtime/Serialization/SafeSerializationEventArgs.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/Serialization/SafeSerializationEventArgs.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Collections.Generic; - namespace System.Runtime.Serialization { // This type exists for public surface compatibility only. diff --git a/src/libraries/System.Private.CoreLib/src/System/Security/CryptographicException.cs b/src/libraries/System.Private.CoreLib/src/System/Security/CryptographicException.cs index b0793c8d2bc..1f9e7729742 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Security/CryptographicException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Security/CryptographicException.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Globalization; using System.Runtime.Serialization; namespace System.Security.Cryptography diff --git a/src/libraries/System.Private.CoreLib/src/System/Security/Principal/IIdentity.cs b/src/libraries/System.Private.CoreLib/src/System/Security/Principal/IIdentity.cs index c5b7042c70e..cf203af45f9 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Security/Principal/IIdentity.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Security/Principal/IIdentity.cs @@ -6,8 +6,6 @@ // All identities will implement this interface // -using System; - namespace System.Security.Principal { public interface IIdentity diff --git a/src/libraries/System.Private.CoreLib/src/System/Security/Principal/IPrincipal.cs b/src/libraries/System.Private.CoreLib/src/System/Security/Principal/IPrincipal.cs index 2540bff8024..dea0e2b3ef7 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Security/Principal/IPrincipal.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Security/Principal/IPrincipal.cs @@ -6,8 +6,6 @@ // All roles will implement this interface // -using System; - namespace System.Security.Principal { public interface IPrincipal diff --git a/src/libraries/System.Private.CoreLib/src/System/Security/SecurityElement.cs b/src/libraries/System.Private.CoreLib/src/System/Security/SecurityElement.cs index fbdb6c62423..231815ecd2d 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Security/SecurityElement.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Security/SecurityElement.cs @@ -4,8 +4,6 @@ using System.Collections; using System.Diagnostics; -using System.Globalization; -using System.IO; using System.Text; namespace System.Security diff --git a/src/libraries/System.Private.CoreLib/src/System/SpanHelpers.T.cs b/src/libraries/System.Private.CoreLib/src/System/SpanHelpers.T.cs index faf37338ea9..6e14b92168f 100644 --- a/src/libraries/System.Private.CoreLib/src/System/SpanHelpers.T.cs +++ b/src/libraries/System.Private.CoreLib/src/System/SpanHelpers.T.cs @@ -3,8 +3,6 @@ // See the LICENSE file in the project root for more information. using System.Diagnostics; -using System.Runtime.CompilerServices; // Do not remove. This is necessary for netstandard, since this file is mirrored into corefx - #if !netstandard using Internal.Runtime.CompilerServices; #endif diff --git a/src/libraries/System.Private.CoreLib/src/System/String.Manipulation.cs b/src/libraries/System.Private.CoreLib/src/System/String.Manipulation.cs index 010c720c115..c0f73659106 100644 --- a/src/libraries/System.Private.CoreLib/src/System/String.Manipulation.cs +++ b/src/libraries/System.Private.CoreLib/src/System/String.Manipulation.cs @@ -2,12 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Buffers; using System.Collections.Generic; using System.Diagnostics; using System.Globalization; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; using System.Text; using Internal.Runtime.CompilerServices; diff --git a/src/libraries/System.Private.CoreLib/src/System/Text/Decoder.cs b/src/libraries/System.Private.CoreLib/src/System/Text/Decoder.cs index 82c39ea0581..cce80a804cf 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Text/Decoder.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Text/Decoder.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Text; -using System; using System.Diagnostics; using System.Runtime.InteropServices; diff --git a/src/libraries/System.Private.CoreLib/src/System/Text/Encoder.cs b/src/libraries/System.Private.CoreLib/src/System/Text/Encoder.cs index 84953c05e95..aa03e7f9c85 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Text/Encoder.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Text/Encoder.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Text; -using System; using System.Diagnostics; using System.Runtime.InteropServices; diff --git a/src/libraries/System.Private.CoreLib/src/System/Text/EncoderReplacementFallback.cs b/src/libraries/System.Private.CoreLib/src/System/Text/EncoderReplacementFallback.cs index 27aa98e6f73..ff13d691185 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Text/EncoderReplacementFallback.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Text/EncoderReplacementFallback.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Runtime; using System.Diagnostics; namespace System.Text diff --git a/src/libraries/System.Private.CoreLib/src/System/Text/EncodingNLS.cs b/src/libraries/System.Private.CoreLib/src/System/Text/EncodingNLS.cs index 9bcd0ba48b2..4420447ae60 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Text/EncodingNLS.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Text/EncodingNLS.cs @@ -2,12 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections; using System.Diagnostics; -using System.Globalization; using System.Runtime.InteropServices; -using System.Threading; namespace System.Text { diff --git a/src/libraries/System.Private.CoreLib/src/System/Text/EncodingProvider.cs b/src/libraries/System.Private.CoreLib/src/System/Text/EncodingProvider.cs index 3d71b6a8e8c..5fb9f691fa4 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Text/EncodingProvider.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Text/EncodingProvider.cs @@ -2,10 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections; -using System.Collections.Generic; - namespace System.Text { public abstract class EncodingProvider diff --git a/src/libraries/System.Private.CoreLib/src/System/Text/Latin1Encoding.cs b/src/libraries/System.Private.CoreLib/src/System/Text/Latin1Encoding.cs index 278e4131d54..a4124739f01 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Text/Latin1Encoding.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Text/Latin1Encoding.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Diagnostics; namespace System.Text diff --git a/src/libraries/System.Private.CoreLib/src/System/Text/StringBuilder.cs b/src/libraries/System.Private.CoreLib/src/System/Text/StringBuilder.cs index c13f68eaf08..414aa869e04 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Text/StringBuilder.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Text/StringBuilder.cs @@ -2,16 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Text; -using System.Runtime; using System.Runtime.Serialization; -using System; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -using System.Runtime.Versioning; -using System.Security; -using System.Threading; -using System.Globalization; using System.Diagnostics; using System.Collections.Generic; diff --git a/src/libraries/System.Private.CoreLib/src/System/Text/UTF32Encoding.cs b/src/libraries/System.Private.CoreLib/src/System/Text/UTF32Encoding.cs index 0e972854433..1dcdd2a9863 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Text/UTF32Encoding.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Text/UTF32Encoding.cs @@ -6,9 +6,7 @@ // Don't override IsAlwaysNormalized because it is just a Unicode Transformation and could be confused. // -using System; using System.Diagnostics; -using System.Globalization; using System.Runtime.InteropServices; namespace System.Text diff --git a/src/libraries/System.Private.CoreLib/src/System/Text/UTF7Encoding.cs b/src/libraries/System.Private.CoreLib/src/System/Text/UTF7Encoding.cs index c5cff652264..6398f7e40fd 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Text/UTF7Encoding.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Text/UTF7Encoding.cs @@ -6,7 +6,6 @@ // Don't override IsAlwaysNormalized because it is just a Unicode Transformation and could be confused. // -using System; using System.Diagnostics; using System.Runtime.InteropServices; diff --git a/src/libraries/System.Private.CoreLib/src/System/Text/UTF8Encoding.cs b/src/libraries/System.Private.CoreLib/src/System/Text/UTF8Encoding.cs index 61f0507f534..2829ab38b2a 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Text/UTF8Encoding.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Text/UTF8Encoding.cs @@ -10,7 +10,6 @@ // The fast loops attempts to blaze through as fast as possible with optimistic range checks, // processing multiple characters at a time, and falling back to the slow loop for all special cases. -using System; using System.Buffers; using System.Diagnostics; using System.Runtime.CompilerServices; diff --git a/src/libraries/System.Private.CoreLib/src/System/Text/Unicode/Utf8Utility.Transcoding.cs b/src/libraries/System.Private.CoreLib/src/System/Text/Unicode/Utf8Utility.Transcoding.cs index 79265909aba..90e8a8d86de 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Text/Unicode/Utf8Utility.Transcoding.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Text/Unicode/Utf8Utility.Transcoding.cs @@ -6,7 +6,6 @@ using System.Buffers; using System.Buffers.Binary; using System.Diagnostics; using System.Numerics; -using System.Runtime.CompilerServices; using System.Runtime.Intrinsics.X86; using Internal.Runtime.CompilerServices; diff --git a/src/libraries/System.Private.CoreLib/src/System/Text/UnicodeDebug.cs b/src/libraries/System.Private.CoreLib/src/System/Text/UnicodeDebug.cs index dedfbe2254c..0ea7de8c33c 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Text/UnicodeDebug.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Text/UnicodeDebug.cs @@ -3,7 +3,6 @@ // See the LICENSE file in the project root for more information. using System.Diagnostics; -using System.Runtime.InteropServices; namespace System.Text { diff --git a/src/libraries/System.Private.CoreLib/src/System/Text/UnicodeEncoding.cs b/src/libraries/System.Private.CoreLib/src/System/Text/UnicodeEncoding.cs index eaa54acf5dc..e899e2db04c 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Text/UnicodeEncoding.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Text/UnicodeEncoding.cs @@ -10,8 +10,6 @@ // the problem is fastloop-specific. #define FASTLOOP -using System; -using System.Globalization; using System.Diagnostics; using System.Runtime.InteropServices; diff --git a/src/libraries/System.Private.CoreLib/src/System/ThreadStaticAttribute.cs b/src/libraries/System.Private.CoreLib/src/System/ThreadStaticAttribute.cs index ff392dc7873..cb92fc49664 100644 --- a/src/libraries/System.Private.CoreLib/src/System/ThreadStaticAttribute.cs +++ b/src/libraries/System.Private.CoreLib/src/System/ThreadStaticAttribute.cs @@ -13,8 +13,6 @@ ** ===========================================================*/ -using System; - namespace System { [AttributeUsage(AttributeTargets.Field, Inherited = false)] diff --git a/src/libraries/System.Private.CoreLib/src/System/Threading/EventWaitHandle.Windows.cs b/src/libraries/System.Private.CoreLib/src/System/Threading/EventWaitHandle.Windows.cs index 980d0e1a543..a6acc2003b8 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Threading/EventWaitHandle.Windows.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Threading/EventWaitHandle.Windows.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.IO; using System.Runtime.InteropServices; using Microsoft.Win32.SafeHandles; 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 2d8313ccae2..1effbc63bd1 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Threading/Mutex.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Threading/Mutex.cs @@ -2,12 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using Microsoft.Win32; using Microsoft.Win32.SafeHandles; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.IO; -using System.Runtime.InteropServices; namespace System.Threading { diff --git a/src/libraries/System.Private.CoreLib/src/System/Threading/Semaphore.cs b/src/libraries/System.Private.CoreLib/src/System/Threading/Semaphore.cs index f012274760b..94ed6150210 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Threading/Semaphore.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Threading/Semaphore.cs @@ -2,12 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using Microsoft.Win32; -using Microsoft.Win32.SafeHandles; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.IO; -using System.Runtime.InteropServices; namespace System.Threading { diff --git a/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Future.cs b/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Future.cs index 154dae0e235..ff251010e5f 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Future.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Future.cs @@ -10,11 +10,9 @@ // // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -using System.Collections.Generic; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; -using System.Runtime.ExceptionServices; namespace System.Threading.Tasks { diff --git a/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/FutureFactory.cs b/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/FutureFactory.cs index b4b059b9d12..ef47a330e84 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/FutureFactory.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/FutureFactory.cs @@ -3,7 +3,6 @@ // See the LICENSE file in the project root for more information. using System.Diagnostics; -using System.Diagnostics.CodeAnalysis; namespace System.Threading.Tasks { diff --git a/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/TaskCompletionSource.cs b/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/TaskCompletionSource.cs index b312feff6a3..b05d3624392 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/TaskCompletionSource.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/TaskCompletionSource.cs @@ -11,12 +11,7 @@ // // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -using System; -using System.Diagnostics; using System.Collections.Generic; -using System.Runtime.CompilerServices; -using System.Runtime.ExceptionServices; -using System.Threading; namespace System.Threading.Tasks { diff --git a/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/TaskExtensions.cs b/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/TaskExtensions.cs index 1e1f6abcd19..f6576912953 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/TaskExtensions.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/TaskExtensions.cs @@ -2,9 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Collections.Generic; -using System.Runtime.CompilerServices; - namespace System.Threading.Tasks { /// Provides a set of static methods for working with specific kinds of instances. diff --git a/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/TaskFactory.cs b/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/TaskFactory.cs index 3b94259867d..9686abca227 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/TaskFactory.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/TaskFactory.cs @@ -12,11 +12,7 @@ // // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -using System; using System.Collections.Generic; -using System.Security; -using System.Runtime.CompilerServices; -using System.Threading; using System.Diagnostics; namespace System.Threading.Tasks diff --git a/src/libraries/System.Private.CoreLib/src/System/Threading/TimerQueue.Windows.cs b/src/libraries/System.Private.CoreLib/src/System/Threading/TimerQueue.Windows.cs index bd55e4352db..9957abd730e 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Threading/TimerQueue.Windows.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Threading/TimerQueue.Windows.cs @@ -3,7 +3,6 @@ // See the LICENSE file in the project root for more information. using System.Diagnostics; -using System.Runtime.InteropServices; namespace System.Threading { diff --git a/src/libraries/System.Private.CoreLib/src/System/TimeZone.cs b/src/libraries/System.Private.CoreLib/src/System/TimeZone.cs index 4cc5109a219..a659e8d16c2 100644 --- a/src/libraries/System.Private.CoreLib/src/System/TimeZone.cs +++ b/src/libraries/System.Private.CoreLib/src/System/TimeZone.cs @@ -18,10 +18,7 @@ ** ============================================================*/ -using System; -using System.Text; using System.Threading; -using System.Collections; using System.Globalization; 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 48479b1d0f1..8de21aa339d 100644 --- a/src/libraries/System.Private.CoreLib/src/System/TimeZoneInfo.Win32.cs +++ b/src/libraries/System.Private.CoreLib/src/System/TimeZoneInfo.Win32.cs @@ -7,13 +7,11 @@ using System.Diagnostics; using System.Globalization; using System.IO; using System.Security; -using System.Text; using System.Threading; using Microsoft.Win32.SafeHandles; using Internal.Win32; -using Internal.Runtime.CompilerServices; using REG_TZI_FORMAT = Interop.Kernel32.REG_TZI_FORMAT; using TIME_ZONE_INFORMATION = Interop.Kernel32.TIME_ZONE_INFORMATION; diff --git a/src/libraries/System.Private.CoreLib/src/System/TypeInitializationException.cs b/src/libraries/System.Private.CoreLib/src/System/TypeInitializationException.cs index 05d424f6a24..d061cb70678 100644 --- a/src/libraries/System.Private.CoreLib/src/System/TypeInitializationException.cs +++ b/src/libraries/System.Private.CoreLib/src/System/TypeInitializationException.cs @@ -14,7 +14,6 @@ ** =============================================================================*/ -using System.Globalization; using System.Runtime.Serialization; namespace System -- 2.34.1