From 0db6d91ec163eb2ddc005d141fe13ee0df267af0 Mon Sep 17 00:00:00 2001 From: Dan Moseley Date: Sun, 27 Aug 2017 23:41:56 -0700 Subject: [PATCH] Remove dead HResults.cs (#13611) * Fix old copy paste mistake * Remove dead HResults.cs * Rename __HResults to HResults * Rename other two __HResults classes * Combine into single HResults class, to match CoreRT * Make hex consistently uppercase * Sort HResults --- src/coreclr/hosts/corerun/logger.cpp | 2 +- src/mscorlib/System.Private.CoreLib.csproj | 5 +- .../shared/System/ApplicationException.cs | 6 +- .../shared/System/ArgumentException.cs | 10 +- .../shared/System/ArgumentNullException.cs | 8 +- .../System/ArgumentOutOfRangeException.cs | 10 +- .../shared/System/ArithmeticException.cs | 6 +- .../System/ArrayTypeMismatchException.cs | 6 +- .../shared/System/BadImageFormatException.cs | 12 +- .../Generic/KeyNotFoundException.cs | 6 +- .../shared/System/DataMisalignedException.cs | 6 +- .../shared/System/DivideByZeroException.cs | 6 +- .../shared/System/DllNotFoundException.cs | 6 +- .../System/DuplicateWaitObjectException.cs | 8 +- .../System/EntryPointNotFoundException.cs | 6 +- .../shared/System/ExecutionEngineException.cs | 6 +- .../shared/System/FieldAccessException.cs | 6 +- src/mscorlib/shared/System/FormatException.cs | 6 +- .../System/IO/DirectoryNotFoundException.cs | 6 +- .../shared/System/IO/EndOfStreamException.cs | 6 +- .../shared/System/IO/FileLoadException.cs | 10 +- .../shared/System/IO/FileNotFoundException.cs | 12 +- .../shared/System/IO/PathTooLongException.cs | 6 +- .../shared/System/IndexOutOfRangeException.cs | 6 +- .../InsufficientExecutionStackException.cs | 6 +- .../shared/System/InvalidCastException.cs | 6 +- .../System/InvalidOperationException.cs | 6 +- .../shared/System/InvalidProgramException.cs | 6 +- .../shared/System/MemberAccessException.cs | 6 +- .../shared/System/MethodAccessException.cs | 6 +- .../shared/System/MissingMethodException.cs | 6 +- .../System/MulticastNotSupportedException.cs | 6 +- .../shared/System/NotFiniteNumberException.cs | 12 +- .../shared/System/NotImplementedException.cs | 6 +- .../shared/System/NotSupportedException.cs | 6 +- .../shared/System/NullReferenceException.cs | 6 +- .../shared/System/ObjectDisposedException.cs | 4 +- .../System/OperationCanceledException.cs | 6 +- .../shared/System/OverflowException.cs | 6 +- .../System/PlatformNotSupportedException.cs | 6 +- src/mscorlib/shared/System/RankException.cs | 6 +- .../Reflection/AmbiguousMatchException.cs | 6 +- .../CustomAttributeFormatException.cs | 2 +- .../InvalidFilterCriteriaException.cs | 2 +- .../Reflection/ReflectionTypeLoadException.cs | 4 +- .../System/Reflection/TargetException.cs | 2 +- .../Reflection/TargetInvocationException.cs | 4 +- .../TargetParameterCountException.cs | 6 +- .../MissingManifestResourceException.cs | 6 +- .../MissingSatelliteAssemblyException.cs | 8 +- .../InteropServices/ExternalException.cs | 6 +- .../Serialization/SerializationException.cs | 6 +- .../System/Security/SecurityException.cs | 10 +- .../System/Security/VerificationException.cs | 6 +- .../shared/System/StackOverflowException.cs | 6 +- src/mscorlib/shared/System/SystemException.cs | 6 +- .../System/Text/DecoderExceptionFallback.cs | 6 +- .../System/Text/EncoderExceptionFallback.cs | 6 +- .../Threading/AbandonedMutexException.cs | 12 +- .../Threading/SynchronizationLockException.cs | 6 +- .../System/Threading/ThreadAbortException.cs | 2 +- .../System/Threading/ThreadStartException.cs | 4 +- .../System/Threading/ThreadStateException.cs | 6 +- .../WaitHandleCannotBeOpenedException.cs | 6 +- .../shared/System/TimeoutException.cs | 6 +- .../shared/System/TypeAccessException.cs | 6 +- .../System/TypeInitializationException.cs | 6 +- .../shared/System/TypeUnloadedException.cs | 6 +- .../System/UnauthorizedAccessException.cs | 6 +- .../src/System/AccessViolationException.cs | 6 +- .../src/System/AppDomainUnloadedException.cs | 2 +- src/mscorlib/src/System/Exception.cs | 2 +- src/mscorlib/src/System/HResults.cs | 169 ++++-------------- .../src/System/IO/DriveNotFoundException.cs | 4 +- .../System/IO/FileLoadException.CoreCLR.cs | 2 +- src/mscorlib/src/System/IO/IOException.cs | 6 +- src/mscorlib/src/System/IO/__HResults.cs | 31 ---- .../src/System/InsufficientMemoryException.cs | 6 +- .../src/System/MissingFieldException.cs | 6 +- .../src/System/MissingMemberException.cs | 6 +- .../src/System/OutOfMemoryException.cs | 6 +- .../src/System/Resources/ResourceManager.cs | 2 +- .../src/System/Resources/__HResults.cs | 24 --- .../RuntimeWrappedException.cs | 2 +- .../Runtime/InteropServices/COMException.cs | 6 +- .../InvalidComObjectException.cs | 6 +- .../InvalidOleVariantTypeException.cs | 6 +- .../MarshalDirectiveException.cs | 6 +- .../Runtime/InteropServices/SEHException.cs | 6 +- .../SafeArrayRankMismatchException.cs | 6 +- .../SafeArrayTypeMismatchException.cs | 6 +- .../BindableVectorToListAdapter.cs | 8 +- .../WindowsRuntime/CLRIPropertyValueImpl.cs | 46 ++--- .../WindowsRuntime/ConstantSplittableMap.cs | 2 +- .../WindowsRuntime/DictionaryToMapAdapter.cs | 4 +- .../EnumeratorToIteratorAdapter.cs | 4 +- .../IMapViewToIReadOnlyDictionaryAdapter.cs | 4 +- .../IReadOnlyDictionaryToIMapViewAdapter.cs | 2 +- .../IReadOnlyListToIVectorViewAdapter.cs | 4 +- .../IVectorViewToIReadOnlyListAdapter.cs | 2 +- .../IteratorToEnumeratorAdapter.cs | 2 +- .../ListToBindableVectorAdapter.cs | 12 +- .../ListToBindableVectorViewAdapter.cs | 4 +- .../WindowsRuntime/ListToVectorAdapter.cs | 12 +- .../WindowsRuntime/MapToDictionaryAdapter.cs | 4 +- .../WindowsRuntime/VectorToListAdapter.cs | 8 +- .../ClrThreadPoolBoundHandle.Windows.cs | 5 +- .../Threading/ThreadInterruptedException.cs | 6 +- src/mscorlib/src/System/TypeLoadException.cs | 8 +- src/mscorlib/src/System/__HResults.cs | 131 -------------- 110 files changed, 365 insertions(+), 650 deletions(-) delete mode 100644 src/mscorlib/src/System/IO/__HResults.cs delete mode 100644 src/mscorlib/src/System/Resources/__HResults.cs delete mode 100644 src/mscorlib/src/System/__HResults.cs diff --git a/src/coreclr/hosts/corerun/logger.cpp b/src/coreclr/hosts/corerun/logger.cpp index 95eb7c9561..70716258ab 100644 --- a/src/coreclr/hosts/corerun/logger.cpp +++ b/src/coreclr/hosts/corerun/logger.cpp @@ -88,7 +88,7 @@ void PrintAsHResult(int val) { case 0x80131416: str = W("CORSEC_E_POLICY_EXCEPTION"); break; case 0x80131417: str = W("CORSEC_E_MIN_GRANT_FAIL"); break; case 0x80131418: str = W("CORSEC_E_NO_EXEC_PERM"); break; - //case 0x80131418: str = W("CORSEC_E_XMLSYNTAX"); break; + //case 0x80131419: str = W("CORSEC_E_XMLSYNTAX"); break; case 0x80131430: str = W("CORSEC_E_CRYPTO"); break; case 0x80131431: str = W("CORSEC_E_CRYPTO_UNEX_OPER"); break; case 0x80131500: str = W("COR_E_EXCEPTION"); break; diff --git a/src/mscorlib/System.Private.CoreLib.csproj b/src/mscorlib/System.Private.CoreLib.csproj index 609986876b..ec79823bfd 100644 --- a/src/mscorlib/System.Private.CoreLib.csproj +++ b/src/mscorlib/System.Private.CoreLib.csproj @@ -294,8 +294,6 @@ - - @@ -316,6 +314,7 @@ + @@ -498,7 +497,6 @@ - @@ -567,7 +565,6 @@ - diff --git a/src/mscorlib/shared/System/ApplicationException.cs b/src/mscorlib/shared/System/ApplicationException.cs index cb98902de1..83ced79876 100644 --- a/src/mscorlib/shared/System/ApplicationException.cs +++ b/src/mscorlib/shared/System/ApplicationException.cs @@ -31,7 +31,7 @@ namespace System public ApplicationException() : base(SR.Arg_ApplicationException) { - HResult = __HResults.COR_E_APPLICATION; + HResult = HResults.COR_E_APPLICATION; } // Creates a new ApplicationException with its message string set to @@ -41,13 +41,13 @@ namespace System public ApplicationException(String message) : base(message) { - HResult = __HResults.COR_E_APPLICATION; + HResult = HResults.COR_E_APPLICATION; } public ApplicationException(String message, Exception innerException) : base(message, innerException) { - HResult = __HResults.COR_E_APPLICATION; + HResult = HResults.COR_E_APPLICATION; } protected ApplicationException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/src/mscorlib/shared/System/ArgumentException.cs b/src/mscorlib/shared/System/ArgumentException.cs index de2d775c84..fe65d6443a 100644 --- a/src/mscorlib/shared/System/ArgumentException.cs +++ b/src/mscorlib/shared/System/ArgumentException.cs @@ -29,7 +29,7 @@ namespace System public ArgumentException() : base(SR.Arg_ArgumentException) { - HResult = __HResults.COR_E_ARGUMENT; + HResult = HResults.COR_E_ARGUMENT; } // Creates a new ArgumentException with its message @@ -38,27 +38,27 @@ namespace System public ArgumentException(String message) : base(message) { - HResult = __HResults.COR_E_ARGUMENT; + HResult = HResults.COR_E_ARGUMENT; } public ArgumentException(String message, Exception innerException) : base(message, innerException) { - HResult = __HResults.COR_E_ARGUMENT; + HResult = HResults.COR_E_ARGUMENT; } public ArgumentException(String message, String paramName, Exception innerException) : base(message, innerException) { _paramName = paramName; - HResult = __HResults.COR_E_ARGUMENT; + HResult = HResults.COR_E_ARGUMENT; } public ArgumentException(String message, String paramName) : base(message) { _paramName = paramName; - HResult = __HResults.COR_E_ARGUMENT; + HResult = HResults.COR_E_ARGUMENT; } protected ArgumentException(SerializationInfo info, StreamingContext context) diff --git a/src/mscorlib/shared/System/ArgumentNullException.cs b/src/mscorlib/shared/System/ArgumentNullException.cs index 74b39fed8e..9b0732b2d2 100644 --- a/src/mscorlib/shared/System/ArgumentNullException.cs +++ b/src/mscorlib/shared/System/ArgumentNullException.cs @@ -26,25 +26,25 @@ namespace System : base(SR.ArgumentNull_Generic) { // Use E_POINTER - COM used that for null pointers. Description is "invalid pointer" - HResult = __HResults.E_POINTER; + HResult = HResults.E_POINTER; } public ArgumentNullException(String paramName) : base(SR.ArgumentNull_Generic, paramName) { - HResult = __HResults.E_POINTER; + HResult = HResults.E_POINTER; } public ArgumentNullException(String message, Exception innerException) : base(message, innerException) { - HResult = __HResults.E_POINTER; + HResult = HResults.E_POINTER; } public ArgumentNullException(String paramName, String message) : base(message, paramName) { - HResult = __HResults.E_POINTER; + HResult = HResults.E_POINTER; } protected ArgumentNullException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/src/mscorlib/shared/System/ArgumentOutOfRangeException.cs b/src/mscorlib/shared/System/ArgumentOutOfRangeException.cs index 4721a503b6..a25cd57763 100644 --- a/src/mscorlib/shared/System/ArgumentOutOfRangeException.cs +++ b/src/mscorlib/shared/System/ArgumentOutOfRangeException.cs @@ -27,25 +27,25 @@ namespace System public ArgumentOutOfRangeException() : base(SR.Arg_ArgumentOutOfRangeException) { - HResult = __HResults.COR_E_ARGUMENTOUTOFRANGE; + HResult = HResults.COR_E_ARGUMENTOUTOFRANGE; } public ArgumentOutOfRangeException(String paramName) : base(SR.Arg_ArgumentOutOfRangeException, paramName) { - HResult = __HResults.COR_E_ARGUMENTOUTOFRANGE; + HResult = HResults.COR_E_ARGUMENTOUTOFRANGE; } public ArgumentOutOfRangeException(String paramName, String message) : base(message, paramName) { - HResult = __HResults.COR_E_ARGUMENTOUTOFRANGE; + HResult = HResults.COR_E_ARGUMENTOUTOFRANGE; } public ArgumentOutOfRangeException(String message, Exception innerException) : base(message, innerException) { - HResult = __HResults.COR_E_ARGUMENTOUTOFRANGE; + HResult = HResults.COR_E_ARGUMENTOUTOFRANGE; } // We will not use this in the classlibs, but we'll provide it for @@ -55,7 +55,7 @@ namespace System : base(message, paramName) { _actualValue = actualValue; - HResult = __HResults.COR_E_ARGUMENTOUTOFRANGE; + HResult = HResults.COR_E_ARGUMENTOUTOFRANGE; } protected ArgumentOutOfRangeException(SerializationInfo info, StreamingContext context) diff --git a/src/mscorlib/shared/System/ArithmeticException.cs b/src/mscorlib/shared/System/ArithmeticException.cs index 2c8abe51fa..6285c8120e 100644 --- a/src/mscorlib/shared/System/ArithmeticException.cs +++ b/src/mscorlib/shared/System/ArithmeticException.cs @@ -26,7 +26,7 @@ namespace System public ArithmeticException() : base(SR.Arg_ArithmeticException) { - HResult = __HResults.COR_E_ARITHMETIC; + HResult = HResults.COR_E_ARITHMETIC; } // Creates a new ArithmeticException with its message string set to @@ -36,13 +36,13 @@ namespace System public ArithmeticException(String message) : base(message) { - HResult = __HResults.COR_E_ARITHMETIC; + HResult = HResults.COR_E_ARITHMETIC; } public ArithmeticException(String message, Exception innerException) : base(message, innerException) { - HResult = __HResults.COR_E_ARITHMETIC; + HResult = HResults.COR_E_ARITHMETIC; } protected ArithmeticException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/src/mscorlib/shared/System/ArrayTypeMismatchException.cs b/src/mscorlib/shared/System/ArrayTypeMismatchException.cs index d06a450603..6964b1fa12 100644 --- a/src/mscorlib/shared/System/ArrayTypeMismatchException.cs +++ b/src/mscorlib/shared/System/ArrayTypeMismatchException.cs @@ -26,7 +26,7 @@ namespace System public ArrayTypeMismatchException() : base(SR.Arg_ArrayTypeMismatchException) { - HResult = __HResults.COR_E_ARRAYTYPEMISMATCH; + HResult = HResults.COR_E_ARRAYTYPEMISMATCH; } // Creates a new ArrayMismatchException with its message string set to @@ -36,13 +36,13 @@ namespace System public ArrayTypeMismatchException(String message) : base(message) { - HResult = __HResults.COR_E_ARRAYTYPEMISMATCH; + HResult = HResults.COR_E_ARRAYTYPEMISMATCH; } public ArrayTypeMismatchException(String message, Exception innerException) : base(message, innerException) { - HResult = __HResults.COR_E_ARRAYTYPEMISMATCH; + HResult = HResults.COR_E_ARRAYTYPEMISMATCH; } protected ArrayTypeMismatchException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/src/mscorlib/shared/System/BadImageFormatException.cs b/src/mscorlib/shared/System/BadImageFormatException.cs index adedcb2a3f..a4661fc799 100644 --- a/src/mscorlib/shared/System/BadImageFormatException.cs +++ b/src/mscorlib/shared/System/BadImageFormatException.cs @@ -25,31 +25,31 @@ namespace System public BadImageFormatException() : base(SR.Arg_BadImageFormatException) { - HResult = __HResults.COR_E_BADIMAGEFORMAT; + HResult = HResults.COR_E_BADIMAGEFORMAT; } public BadImageFormatException(String message) : base(message) { - HResult = __HResults.COR_E_BADIMAGEFORMAT; + HResult = HResults.COR_E_BADIMAGEFORMAT; } public BadImageFormatException(String message, Exception inner) : base(message, inner) { - HResult = __HResults.COR_E_BADIMAGEFORMAT; + HResult = HResults.COR_E_BADIMAGEFORMAT; } public BadImageFormatException(String message, String fileName) : base(message) { - HResult = __HResults.COR_E_BADIMAGEFORMAT; + HResult = HResults.COR_E_BADIMAGEFORMAT; _fileName = fileName; } public BadImageFormatException(String message, String fileName, Exception inner) : base(message, inner) { - HResult = __HResults.COR_E_BADIMAGEFORMAT; + HResult = HResults.COR_E_BADIMAGEFORMAT; _fileName = fileName; } @@ -78,7 +78,7 @@ namespace System if (_message == null) { if ((_fileName == null) && - (HResult == __HResults.COR_E_EXCEPTION)) + (HResult == HResults.COR_E_EXCEPTION)) _message = SR.Arg_BadImageFormatException; else diff --git a/src/mscorlib/shared/System/Collections/Generic/KeyNotFoundException.cs b/src/mscorlib/shared/System/Collections/Generic/KeyNotFoundException.cs index cdd6faf030..c32bc623ba 100644 --- a/src/mscorlib/shared/System/Collections/Generic/KeyNotFoundException.cs +++ b/src/mscorlib/shared/System/Collections/Generic/KeyNotFoundException.cs @@ -12,19 +12,19 @@ namespace System.Collections.Generic public KeyNotFoundException() : base(SR.Arg_KeyNotFound) { - HResult = __HResults.COR_E_KEYNOTFOUND; + HResult = HResults.COR_E_KEYNOTFOUND; } public KeyNotFoundException(String message) : base(message) { - HResult = __HResults.COR_E_KEYNOTFOUND; + HResult = HResults.COR_E_KEYNOTFOUND; } public KeyNotFoundException(String message, Exception innerException) : base(message, innerException) { - HResult = __HResults.COR_E_KEYNOTFOUND; + HResult = HResults.COR_E_KEYNOTFOUND; } protected KeyNotFoundException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/src/mscorlib/shared/System/DataMisalignedException.cs b/src/mscorlib/shared/System/DataMisalignedException.cs index ff5b29f1cf..d8d36b5cb7 100644 --- a/src/mscorlib/shared/System/DataMisalignedException.cs +++ b/src/mscorlib/shared/System/DataMisalignedException.cs @@ -18,19 +18,19 @@ namespace System public DataMisalignedException() : base(SR.Arg_DataMisalignedException) { - HResult = __HResults.COR_E_DATAMISALIGNED; + HResult = HResults.COR_E_DATAMISALIGNED; } public DataMisalignedException(String message) : base(message) { - HResult = __HResults.COR_E_DATAMISALIGNED; + HResult = HResults.COR_E_DATAMISALIGNED; } public DataMisalignedException(String message, Exception innerException) : base(message, innerException) { - HResult = __HResults.COR_E_DATAMISALIGNED; + HResult = HResults.COR_E_DATAMISALIGNED; } } } diff --git a/src/mscorlib/shared/System/DivideByZeroException.cs b/src/mscorlib/shared/System/DivideByZeroException.cs index 0fad2f8d56..ad74bde0fd 100644 --- a/src/mscorlib/shared/System/DivideByZeroException.cs +++ b/src/mscorlib/shared/System/DivideByZeroException.cs @@ -20,19 +20,19 @@ namespace System public DivideByZeroException() : base(SR.Arg_DivideByZero) { - HResult = __HResults.COR_E_DIVIDEBYZERO; + HResult = HResults.COR_E_DIVIDEBYZERO; } public DivideByZeroException(String message) : base(message) { - HResult = __HResults.COR_E_DIVIDEBYZERO; + HResult = HResults.COR_E_DIVIDEBYZERO; } public DivideByZeroException(String message, Exception innerException) : base(message, innerException) { - HResult = __HResults.COR_E_DIVIDEBYZERO; + HResult = HResults.COR_E_DIVIDEBYZERO; } protected DivideByZeroException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/src/mscorlib/shared/System/DllNotFoundException.cs b/src/mscorlib/shared/System/DllNotFoundException.cs index 8c69e45eda..82d5bdd0c5 100644 --- a/src/mscorlib/shared/System/DllNotFoundException.cs +++ b/src/mscorlib/shared/System/DllNotFoundException.cs @@ -21,19 +21,19 @@ namespace System public DllNotFoundException() : base(SR.Arg_DllNotFoundException) { - HResult = __HResults.COR_E_DLLNOTFOUND; + HResult = HResults.COR_E_DLLNOTFOUND; } public DllNotFoundException(String message) : base(message) { - HResult = __HResults.COR_E_DLLNOTFOUND; + HResult = HResults.COR_E_DLLNOTFOUND; } public DllNotFoundException(String message, Exception inner) : base(message, inner) { - HResult = __HResults.COR_E_DLLNOTFOUND; + HResult = HResults.COR_E_DLLNOTFOUND; } protected DllNotFoundException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/src/mscorlib/shared/System/DuplicateWaitObjectException.cs b/src/mscorlib/shared/System/DuplicateWaitObjectException.cs index 7eadead8c7..95bdedd526 100644 --- a/src/mscorlib/shared/System/DuplicateWaitObjectException.cs +++ b/src/mscorlib/shared/System/DuplicateWaitObjectException.cs @@ -37,25 +37,25 @@ namespace System public DuplicateWaitObjectException() : base(DuplicateWaitObjectMessage) { - HResult = __HResults.COR_E_DUPLICATEWAITOBJECT; + HResult = HResults.COR_E_DUPLICATEWAITOBJECT; } public DuplicateWaitObjectException(String parameterName) : base(DuplicateWaitObjectMessage, parameterName) { - HResult = __HResults.COR_E_DUPLICATEWAITOBJECT; + HResult = HResults.COR_E_DUPLICATEWAITOBJECT; } public DuplicateWaitObjectException(String parameterName, String message) : base(message, parameterName) { - HResult = __HResults.COR_E_DUPLICATEWAITOBJECT; + HResult = HResults.COR_E_DUPLICATEWAITOBJECT; } public DuplicateWaitObjectException(String message, Exception innerException) : base(message, innerException) { - HResult = __HResults.COR_E_DUPLICATEWAITOBJECT; + HResult = HResults.COR_E_DUPLICATEWAITOBJECT; } protected DuplicateWaitObjectException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/src/mscorlib/shared/System/EntryPointNotFoundException.cs b/src/mscorlib/shared/System/EntryPointNotFoundException.cs index 0b881cec05..e62ca0e11d 100644 --- a/src/mscorlib/shared/System/EntryPointNotFoundException.cs +++ b/src/mscorlib/shared/System/EntryPointNotFoundException.cs @@ -21,19 +21,19 @@ namespace System public EntryPointNotFoundException() : base(SR.Arg_EntryPointNotFoundException) { - HResult = __HResults.COR_E_ENTRYPOINTNOTFOUND; + HResult = HResults.COR_E_ENTRYPOINTNOTFOUND; } public EntryPointNotFoundException(String message) : base(message) { - HResult = __HResults.COR_E_ENTRYPOINTNOTFOUND; + HResult = HResults.COR_E_ENTRYPOINTNOTFOUND; } public EntryPointNotFoundException(String message, Exception inner) : base(message, inner) { - HResult = __HResults.COR_E_ENTRYPOINTNOTFOUND; + HResult = HResults.COR_E_ENTRYPOINTNOTFOUND; } protected EntryPointNotFoundException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/src/mscorlib/shared/System/ExecutionEngineException.cs b/src/mscorlib/shared/System/ExecutionEngineException.cs index b89f6d9a8d..c33435875e 100644 --- a/src/mscorlib/shared/System/ExecutionEngineException.cs +++ b/src/mscorlib/shared/System/ExecutionEngineException.cs @@ -26,19 +26,19 @@ namespace System public ExecutionEngineException() : base(SR.Arg_ExecutionEngineException) { - HResult = __HResults.COR_E_EXECUTIONENGINE; + HResult = HResults.COR_E_EXECUTIONENGINE; } public ExecutionEngineException(String message) : base(message) { - HResult = __HResults.COR_E_EXECUTIONENGINE; + HResult = HResults.COR_E_EXECUTIONENGINE; } public ExecutionEngineException(String message, Exception innerException) : base(message, innerException) { - HResult = __HResults.COR_E_EXECUTIONENGINE; + HResult = HResults.COR_E_EXECUTIONENGINE; } } } diff --git a/src/mscorlib/shared/System/FieldAccessException.cs b/src/mscorlib/shared/System/FieldAccessException.cs index b56d749771..883bbd8bc2 100644 --- a/src/mscorlib/shared/System/FieldAccessException.cs +++ b/src/mscorlib/shared/System/FieldAccessException.cs @@ -18,19 +18,19 @@ namespace System public FieldAccessException() : base(SR.Arg_FieldAccessException) { - HResult = __HResults.COR_E_FIELDACCESS; + HResult = HResults.COR_E_FIELDACCESS; } public FieldAccessException(String message) : base(message) { - HResult = __HResults.COR_E_FIELDACCESS; + HResult = HResults.COR_E_FIELDACCESS; } public FieldAccessException(String message, Exception inner) : base(message, inner) { - HResult = __HResults.COR_E_FIELDACCESS; + HResult = HResults.COR_E_FIELDACCESS; } protected FieldAccessException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/src/mscorlib/shared/System/FormatException.cs b/src/mscorlib/shared/System/FormatException.cs index 9baaac2353..4af45cdd94 100644 --- a/src/mscorlib/shared/System/FormatException.cs +++ b/src/mscorlib/shared/System/FormatException.cs @@ -20,19 +20,19 @@ namespace System public FormatException() : base(SR.Arg_FormatException) { - HResult = __HResults.COR_E_FORMAT; + HResult = HResults.COR_E_FORMAT; } public FormatException(String message) : base(message) { - HResult = __HResults.COR_E_FORMAT; + HResult = HResults.COR_E_FORMAT; } public FormatException(String message, Exception innerException) : base(message, innerException) { - HResult = __HResults.COR_E_FORMAT; + HResult = HResults.COR_E_FORMAT; } protected FormatException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/src/mscorlib/shared/System/IO/DirectoryNotFoundException.cs b/src/mscorlib/shared/System/IO/DirectoryNotFoundException.cs index de09760fcb..87e610b86e 100644 --- a/src/mscorlib/shared/System/IO/DirectoryNotFoundException.cs +++ b/src/mscorlib/shared/System/IO/DirectoryNotFoundException.cs @@ -17,19 +17,19 @@ namespace System.IO public DirectoryNotFoundException() : base(SR.Arg_DirectoryNotFoundException) { - HResult = __HResults.COR_E_DIRECTORYNOTFOUND; + HResult = HResults.COR_E_DIRECTORYNOTFOUND; } public DirectoryNotFoundException(string message) : base(message) { - HResult = __HResults.COR_E_DIRECTORYNOTFOUND; + HResult = HResults.COR_E_DIRECTORYNOTFOUND; } public DirectoryNotFoundException(string message, Exception innerException) : base(message, innerException) { - HResult = __HResults.COR_E_DIRECTORYNOTFOUND; + HResult = HResults.COR_E_DIRECTORYNOTFOUND; } protected DirectoryNotFoundException(SerializationInfo info, StreamingContext context) diff --git a/src/mscorlib/shared/System/IO/EndOfStreamException.cs b/src/mscorlib/shared/System/IO/EndOfStreamException.cs index 68e1b2c882..ee37818dc5 100644 --- a/src/mscorlib/shared/System/IO/EndOfStreamException.cs +++ b/src/mscorlib/shared/System/IO/EndOfStreamException.cs @@ -11,19 +11,19 @@ namespace System.IO public EndOfStreamException() : base(SR.Arg_EndOfStreamException) { - HResult = __HResults.COR_E_ENDOFSTREAM; + HResult = HResults.COR_E_ENDOFSTREAM; } public EndOfStreamException(string message) : base(message) { - HResult = __HResults.COR_E_ENDOFSTREAM; + HResult = HResults.COR_E_ENDOFSTREAM; } public EndOfStreamException(string message, Exception innerException) : base(message, innerException) { - HResult = __HResults.COR_E_ENDOFSTREAM; + HResult = HResults.COR_E_ENDOFSTREAM; } protected EndOfStreamException(SerializationInfo info, StreamingContext context) diff --git a/src/mscorlib/shared/System/IO/FileLoadException.cs b/src/mscorlib/shared/System/IO/FileLoadException.cs index 6fdf2d58cf..b126424c22 100644 --- a/src/mscorlib/shared/System/IO/FileLoadException.cs +++ b/src/mscorlib/shared/System/IO/FileLoadException.cs @@ -11,31 +11,31 @@ namespace System.IO public FileLoadException() : base(SR.IO_FileLoad) { - HResult = __HResults.COR_E_FILELOAD; + HResult = HResults.COR_E_FILELOAD; } public FileLoadException(string message) : base(message) { - HResult = __HResults.COR_E_FILELOAD; + HResult = HResults.COR_E_FILELOAD; } public FileLoadException(string message, Exception inner) : base(message, inner) { - HResult = __HResults.COR_E_FILELOAD; + HResult = HResults.COR_E_FILELOAD; } public FileLoadException(string message, string fileName) : base(message) { - HResult = __HResults.COR_E_FILELOAD; + HResult = HResults.COR_E_FILELOAD; FileName = fileName; } public FileLoadException(string message, string fileName, Exception inner) : base(message, inner) { - HResult = __HResults.COR_E_FILELOAD; + HResult = HResults.COR_E_FILELOAD; FileName = fileName; } diff --git a/src/mscorlib/shared/System/IO/FileNotFoundException.cs b/src/mscorlib/shared/System/IO/FileNotFoundException.cs index 374c976055..dc1ccf577a 100644 --- a/src/mscorlib/shared/System/IO/FileNotFoundException.cs +++ b/src/mscorlib/shared/System/IO/FileNotFoundException.cs @@ -12,32 +12,32 @@ namespace System.IO public FileNotFoundException() : base(SR.IO_FileNotFound) { - HResult = __HResults.COR_E_FILENOTFOUND; + HResult = HResults.COR_E_FILENOTFOUND; } public FileNotFoundException(string message) : base(message) { - HResult = __HResults.COR_E_FILENOTFOUND; + HResult = HResults.COR_E_FILENOTFOUND; } public FileNotFoundException(string message, Exception innerException) : base(message, innerException) { - HResult = __HResults.COR_E_FILENOTFOUND; + HResult = HResults.COR_E_FILENOTFOUND; } public FileNotFoundException(string message, string fileName) : base(message) { - HResult = __HResults.COR_E_FILENOTFOUND; + HResult = HResults.COR_E_FILENOTFOUND; FileName = fileName; } public FileNotFoundException(string message, string fileName, Exception innerException) : base(message, innerException) { - HResult = __HResults.COR_E_FILENOTFOUND; + HResult = HResults.COR_E_FILENOTFOUND; FileName = fileName; } @@ -55,7 +55,7 @@ namespace System.IO if (_message == null) { if ((FileName == null) && - (HResult == System.__HResults.COR_E_EXCEPTION)) + (HResult == System.HResults.COR_E_EXCEPTION)) _message = SR.IO_FileNotFound; else if (FileName != null) diff --git a/src/mscorlib/shared/System/IO/PathTooLongException.cs b/src/mscorlib/shared/System/IO/PathTooLongException.cs index 64c8e6c7e6..15f282ebf6 100644 --- a/src/mscorlib/shared/System/IO/PathTooLongException.cs +++ b/src/mscorlib/shared/System/IO/PathTooLongException.cs @@ -13,19 +13,19 @@ namespace System.IO public PathTooLongException() : base(SR.IO_PathTooLong) { - HResult = __HResults.COR_E_PATHTOOLONG; + HResult = HResults.COR_E_PATHTOOLONG; } public PathTooLongException(string message) : base(message) { - HResult = __HResults.COR_E_PATHTOOLONG; + HResult = HResults.COR_E_PATHTOOLONG; } public PathTooLongException(string message, Exception innerException) : base(message, innerException) { - HResult = __HResults.COR_E_PATHTOOLONG; + HResult = HResults.COR_E_PATHTOOLONG; } protected PathTooLongException(SerializationInfo info, StreamingContext context) diff --git a/src/mscorlib/shared/System/IndexOutOfRangeException.cs b/src/mscorlib/shared/System/IndexOutOfRangeException.cs index d5b24b35d5..bec63d73d6 100644 --- a/src/mscorlib/shared/System/IndexOutOfRangeException.cs +++ b/src/mscorlib/shared/System/IndexOutOfRangeException.cs @@ -20,19 +20,19 @@ namespace System public IndexOutOfRangeException() : base(SR.Arg_IndexOutOfRangeException) { - HResult = __HResults.COR_E_INDEXOUTOFRANGE; + HResult = HResults.COR_E_INDEXOUTOFRANGE; } public IndexOutOfRangeException(String message) : base(message) { - HResult = __HResults.COR_E_INDEXOUTOFRANGE; + HResult = HResults.COR_E_INDEXOUTOFRANGE; } public IndexOutOfRangeException(String message, Exception innerException) : base(message, innerException) { - HResult = __HResults.COR_E_INDEXOUTOFRANGE; + HResult = HResults.COR_E_INDEXOUTOFRANGE; } } } diff --git a/src/mscorlib/shared/System/InsufficientExecutionStackException.cs b/src/mscorlib/shared/System/InsufficientExecutionStackException.cs index 41df3ae970..a14cb67150 100644 --- a/src/mscorlib/shared/System/InsufficientExecutionStackException.cs +++ b/src/mscorlib/shared/System/InsufficientExecutionStackException.cs @@ -11,19 +11,19 @@ namespace System public InsufficientExecutionStackException() : base(SR.Arg_InsufficientExecutionStackException) { - HResult = __HResults.COR_E_INSUFFICIENTEXECUTIONSTACK; + HResult = HResults.COR_E_INSUFFICIENTEXECUTIONSTACK; } public InsufficientExecutionStackException(String message) : base(message) { - HResult = __HResults.COR_E_INSUFFICIENTEXECUTIONSTACK; + HResult = HResults.COR_E_INSUFFICIENTEXECUTIONSTACK; } public InsufficientExecutionStackException(String message, Exception innerException) : base(message, innerException) { - HResult = __HResults.COR_E_INSUFFICIENTEXECUTIONSTACK; + HResult = HResults.COR_E_INSUFFICIENTEXECUTIONSTACK; } } } diff --git a/src/mscorlib/shared/System/InvalidCastException.cs b/src/mscorlib/shared/System/InvalidCastException.cs index cf359ac0b5..00b393c60e 100644 --- a/src/mscorlib/shared/System/InvalidCastException.cs +++ b/src/mscorlib/shared/System/InvalidCastException.cs @@ -17,19 +17,19 @@ namespace System public InvalidCastException() : base(SR.Arg_InvalidCastException) { - HResult = __HResults.COR_E_INVALIDCAST; + HResult = HResults.COR_E_INVALIDCAST; } public InvalidCastException(String message) : base(message) { - HResult = __HResults.COR_E_INVALIDCAST; + HResult = HResults.COR_E_INVALIDCAST; } public InvalidCastException(String message, Exception innerException) : base(message, innerException) { - HResult = __HResults.COR_E_INVALIDCAST; + HResult = HResults.COR_E_INVALIDCAST; } public InvalidCastException(String message, int errorCode) diff --git a/src/mscorlib/shared/System/InvalidOperationException.cs b/src/mscorlib/shared/System/InvalidOperationException.cs index ad743e05ff..74a4ffd74a 100644 --- a/src/mscorlib/shared/System/InvalidOperationException.cs +++ b/src/mscorlib/shared/System/InvalidOperationException.cs @@ -21,19 +21,19 @@ namespace System public InvalidOperationException() : base(SR.Arg_InvalidOperationException) { - HResult = __HResults.COR_E_INVALIDOPERATION; + HResult = HResults.COR_E_INVALIDOPERATION; } public InvalidOperationException(String message) : base(message) { - HResult = __HResults.COR_E_INVALIDOPERATION; + HResult = HResults.COR_E_INVALIDOPERATION; } public InvalidOperationException(String message, Exception innerException) : base(message, innerException) { - HResult = __HResults.COR_E_INVALIDOPERATION; + HResult = HResults.COR_E_INVALIDOPERATION; } protected InvalidOperationException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/src/mscorlib/shared/System/InvalidProgramException.cs b/src/mscorlib/shared/System/InvalidProgramException.cs index 47e7325836..e3521574ea 100644 --- a/src/mscorlib/shared/System/InvalidProgramException.cs +++ b/src/mscorlib/shared/System/InvalidProgramException.cs @@ -20,19 +20,19 @@ namespace System public InvalidProgramException() : base(SR.InvalidProgram_Default) { - HResult = __HResults.COR_E_INVALIDPROGRAM; + HResult = HResults.COR_E_INVALIDPROGRAM; } public InvalidProgramException(String message) : base(message) { - HResult = __HResults.COR_E_INVALIDPROGRAM; + HResult = HResults.COR_E_INVALIDPROGRAM; } public InvalidProgramException(String message, Exception inner) : base(message, inner) { - HResult = __HResults.COR_E_INVALIDPROGRAM; + HResult = HResults.COR_E_INVALIDPROGRAM; } } } diff --git a/src/mscorlib/shared/System/MemberAccessException.cs b/src/mscorlib/shared/System/MemberAccessException.cs index abca952f19..bb26d9e3c4 100644 --- a/src/mscorlib/shared/System/MemberAccessException.cs +++ b/src/mscorlib/shared/System/MemberAccessException.cs @@ -23,7 +23,7 @@ namespace System public MemberAccessException() : base(SR.Arg_AccessException) { - HResult = __HResults.COR_E_MEMBERACCESS; + HResult = HResults.COR_E_MEMBERACCESS; } // Creates a new MemberAccessException with its message string set to @@ -33,13 +33,13 @@ namespace System public MemberAccessException(String message) : base(message) { - HResult = __HResults.COR_E_MEMBERACCESS; + HResult = HResults.COR_E_MEMBERACCESS; } public MemberAccessException(String message, Exception inner) : base(message, inner) { - HResult = __HResults.COR_E_MEMBERACCESS; + HResult = HResults.COR_E_MEMBERACCESS; } protected MemberAccessException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/src/mscorlib/shared/System/MethodAccessException.cs b/src/mscorlib/shared/System/MethodAccessException.cs index 2c9c998c15..12691386c5 100644 --- a/src/mscorlib/shared/System/MethodAccessException.cs +++ b/src/mscorlib/shared/System/MethodAccessException.cs @@ -18,19 +18,19 @@ namespace System public MethodAccessException() : base(SR.Arg_MethodAccessException) { - HResult = __HResults.COR_E_METHODACCESS; + HResult = HResults.COR_E_METHODACCESS; } public MethodAccessException(String message) : base(message) { - HResult = __HResults.COR_E_METHODACCESS; + HResult = HResults.COR_E_METHODACCESS; } public MethodAccessException(String message, Exception inner) : base(message, inner) { - HResult = __HResults.COR_E_METHODACCESS; + HResult = HResults.COR_E_METHODACCESS; } protected MethodAccessException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/src/mscorlib/shared/System/MissingMethodException.cs b/src/mscorlib/shared/System/MissingMethodException.cs index 967f434302..4f5e8b6562 100644 --- a/src/mscorlib/shared/System/MissingMethodException.cs +++ b/src/mscorlib/shared/System/MissingMethodException.cs @@ -20,19 +20,19 @@ namespace System public MissingMethodException() : base(SR.Arg_MissingMethodException) { - HResult = __HResults.COR_E_MISSINGMETHOD; + HResult = HResults.COR_E_MISSINGMETHOD; } public MissingMethodException(string message) : base(message) { - HResult = __HResults.COR_E_MISSINGMETHOD; + HResult = HResults.COR_E_MISSINGMETHOD; } public MissingMethodException(string message, Exception inner) : base(message, inner) { - HResult = __HResults.COR_E_MISSINGMETHOD; + HResult = HResults.COR_E_MISSINGMETHOD; } public MissingMethodException(string className, string methodName) diff --git a/src/mscorlib/shared/System/MulticastNotSupportedException.cs b/src/mscorlib/shared/System/MulticastNotSupportedException.cs index 493671e227..56a3ec9c00 100644 --- a/src/mscorlib/shared/System/MulticastNotSupportedException.cs +++ b/src/mscorlib/shared/System/MulticastNotSupportedException.cs @@ -16,19 +16,19 @@ namespace System public MulticastNotSupportedException() : base(SR.Arg_MulticastNotSupportedException) { - HResult = __HResults.COR_E_MULTICASTNOTSUPPORTED; + HResult = HResults.COR_E_MULTICASTNOTSUPPORTED; } public MulticastNotSupportedException(String message) : base(message) { - HResult = __HResults.COR_E_MULTICASTNOTSUPPORTED; + HResult = HResults.COR_E_MULTICASTNOTSUPPORTED; } public MulticastNotSupportedException(String message, Exception inner) : base(message, inner) { - HResult = __HResults.COR_E_MULTICASTNOTSUPPORTED; + HResult = HResults.COR_E_MULTICASTNOTSUPPORTED; } } } diff --git a/src/mscorlib/shared/System/NotFiniteNumberException.cs b/src/mscorlib/shared/System/NotFiniteNumberException.cs index 99882b9eb2..ca47a21e5c 100644 --- a/src/mscorlib/shared/System/NotFiniteNumberException.cs +++ b/src/mscorlib/shared/System/NotFiniteNumberException.cs @@ -14,41 +14,41 @@ namespace System : base(SR.Arg_NotFiniteNumberException) { _offendingNumber = 0; - HResult = __HResults.COR_E_NOTFINITENUMBER; + HResult = HResults.COR_E_NOTFINITENUMBER; } public NotFiniteNumberException(double offendingNumber) : base() { _offendingNumber = offendingNumber; - HResult = __HResults.COR_E_NOTFINITENUMBER; + HResult = HResults.COR_E_NOTFINITENUMBER; } public NotFiniteNumberException(String message) : base(message) { _offendingNumber = 0; - HResult = __HResults.COR_E_NOTFINITENUMBER; + HResult = HResults.COR_E_NOTFINITENUMBER; } public NotFiniteNumberException(String message, double offendingNumber) : base(message) { _offendingNumber = offendingNumber; - HResult = __HResults.COR_E_NOTFINITENUMBER; + HResult = HResults.COR_E_NOTFINITENUMBER; } public NotFiniteNumberException(String message, Exception innerException) : base(message, innerException) { - HResult = __HResults.COR_E_NOTFINITENUMBER; + HResult = HResults.COR_E_NOTFINITENUMBER; } public NotFiniteNumberException(String message, double offendingNumber, Exception innerException) : base(message, innerException) { _offendingNumber = offendingNumber; - HResult = __HResults.COR_E_NOTFINITENUMBER; + HResult = HResults.COR_E_NOTFINITENUMBER; } protected NotFiniteNumberException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/src/mscorlib/shared/System/NotImplementedException.cs b/src/mscorlib/shared/System/NotImplementedException.cs index ae62527fac..98976c19db 100644 --- a/src/mscorlib/shared/System/NotImplementedException.cs +++ b/src/mscorlib/shared/System/NotImplementedException.cs @@ -21,17 +21,17 @@ namespace System public NotImplementedException() : base(SR.Arg_NotImplementedException) { - HResult = __HResults.E_NOTIMPL; + HResult = HResults.E_NOTIMPL; } public NotImplementedException(String message) : base(message) { - HResult = __HResults.E_NOTIMPL; + HResult = HResults.E_NOTIMPL; } public NotImplementedException(String message, Exception inner) : base(message, inner) { - HResult = __HResults.E_NOTIMPL; + HResult = HResults.E_NOTIMPL; } protected NotImplementedException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/src/mscorlib/shared/System/NotSupportedException.cs b/src/mscorlib/shared/System/NotSupportedException.cs index 8532e5ad2f..dc43261fbd 100644 --- a/src/mscorlib/shared/System/NotSupportedException.cs +++ b/src/mscorlib/shared/System/NotSupportedException.cs @@ -20,19 +20,19 @@ namespace System public NotSupportedException() : base(SR.Arg_NotSupportedException) { - HResult = __HResults.COR_E_NOTSUPPORTED; + HResult = HResults.COR_E_NOTSUPPORTED; } public NotSupportedException(String message) : base(message) { - HResult = __HResults.COR_E_NOTSUPPORTED; + HResult = HResults.COR_E_NOTSUPPORTED; } public NotSupportedException(String message, Exception innerException) : base(message, innerException) { - HResult = __HResults.COR_E_NOTSUPPORTED; + HResult = HResults.COR_E_NOTSUPPORTED; } protected NotSupportedException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/src/mscorlib/shared/System/NullReferenceException.cs b/src/mscorlib/shared/System/NullReferenceException.cs index f689345654..eb6d709dbf 100644 --- a/src/mscorlib/shared/System/NullReferenceException.cs +++ b/src/mscorlib/shared/System/NullReferenceException.cs @@ -20,19 +20,19 @@ namespace System public NullReferenceException() : base(SR.Arg_NullReferenceException) { - HResult = __HResults.COR_E_NULLREFERENCE; + HResult = HResults.COR_E_NULLREFERENCE; } public NullReferenceException(String message) : base(message) { - HResult = __HResults.COR_E_NULLREFERENCE; + HResult = HResults.COR_E_NULLREFERENCE; } public NullReferenceException(String message, Exception innerException) : base(message, innerException) { - HResult = __HResults.COR_E_NULLREFERENCE; + HResult = HResults.COR_E_NULLREFERENCE; } protected NullReferenceException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/src/mscorlib/shared/System/ObjectDisposedException.cs b/src/mscorlib/shared/System/ObjectDisposedException.cs index 6e8e6b2d74..3d7ba5df15 100644 --- a/src/mscorlib/shared/System/ObjectDisposedException.cs +++ b/src/mscorlib/shared/System/ObjectDisposedException.cs @@ -28,14 +28,14 @@ namespace System public ObjectDisposedException(String objectName, String message) : base(message) { - HResult = __HResults.COR_E_OBJECTDISPOSED; + HResult = HResults.COR_E_OBJECTDISPOSED; _objectName = objectName; } public ObjectDisposedException(String message, Exception innerException) : base(message, innerException) { - HResult = __HResults.COR_E_OBJECTDISPOSED; + HResult = HResults.COR_E_OBJECTDISPOSED; } protected ObjectDisposedException(SerializationInfo info, StreamingContext context) diff --git a/src/mscorlib/shared/System/OperationCanceledException.cs b/src/mscorlib/shared/System/OperationCanceledException.cs index 2c7654854f..44a0427c58 100644 --- a/src/mscorlib/shared/System/OperationCanceledException.cs +++ b/src/mscorlib/shared/System/OperationCanceledException.cs @@ -31,19 +31,19 @@ namespace System public OperationCanceledException() : base(SR.OperationCanceled) { - HResult = __HResults.COR_E_OPERATIONCANCELED; + HResult = HResults.COR_E_OPERATIONCANCELED; } public OperationCanceledException(String message) : base(message) { - HResult = __HResults.COR_E_OPERATIONCANCELED; + HResult = HResults.COR_E_OPERATIONCANCELED; } public OperationCanceledException(String message, Exception innerException) : base(message, innerException) { - HResult = __HResults.COR_E_OPERATIONCANCELED; + HResult = HResults.COR_E_OPERATIONCANCELED; } diff --git a/src/mscorlib/shared/System/OverflowException.cs b/src/mscorlib/shared/System/OverflowException.cs index 4052e41a18..bf6676ca2c 100644 --- a/src/mscorlib/shared/System/OverflowException.cs +++ b/src/mscorlib/shared/System/OverflowException.cs @@ -20,19 +20,19 @@ namespace System public OverflowException() : base(SR.Arg_OverflowException) { - HResult = __HResults.COR_E_OVERFLOW; + HResult = HResults.COR_E_OVERFLOW; } public OverflowException(String message) : base(message) { - HResult = __HResults.COR_E_OVERFLOW; + HResult = HResults.COR_E_OVERFLOW; } public OverflowException(String message, Exception innerException) : base(message, innerException) { - HResult = __HResults.COR_E_OVERFLOW; + HResult = HResults.COR_E_OVERFLOW; } protected OverflowException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/src/mscorlib/shared/System/PlatformNotSupportedException.cs b/src/mscorlib/shared/System/PlatformNotSupportedException.cs index f679ac9454..4403c1da06 100644 --- a/src/mscorlib/shared/System/PlatformNotSupportedException.cs +++ b/src/mscorlib/shared/System/PlatformNotSupportedException.cs @@ -20,19 +20,19 @@ namespace System public PlatformNotSupportedException() : base(SR.Arg_PlatformNotSupported) { - HResult = __HResults.COR_E_PLATFORMNOTSUPPORTED; + HResult = HResults.COR_E_PLATFORMNOTSUPPORTED; } public PlatformNotSupportedException(String message) : base(message) { - HResult = __HResults.COR_E_PLATFORMNOTSUPPORTED; + HResult = HResults.COR_E_PLATFORMNOTSUPPORTED; } public PlatformNotSupportedException(String message, Exception inner) : base(message, inner) { - HResult = __HResults.COR_E_PLATFORMNOTSUPPORTED; + HResult = HResults.COR_E_PLATFORMNOTSUPPORTED; } protected PlatformNotSupportedException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/src/mscorlib/shared/System/RankException.cs b/src/mscorlib/shared/System/RankException.cs index 15759ea75d..f2c5d06548 100644 --- a/src/mscorlib/shared/System/RankException.cs +++ b/src/mscorlib/shared/System/RankException.cs @@ -21,19 +21,19 @@ namespace System public RankException() : base(SR.Arg_RankException) { - HResult = __HResults.COR_E_RANK; + HResult = HResults.COR_E_RANK; } public RankException(String message) : base(message) { - HResult = __HResults.COR_E_RANK; + HResult = HResults.COR_E_RANK; } public RankException(String message, Exception innerException) : base(message, innerException) { - HResult = __HResults.COR_E_RANK; + HResult = HResults.COR_E_RANK; } protected RankException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/src/mscorlib/shared/System/Reflection/AmbiguousMatchException.cs b/src/mscorlib/shared/System/Reflection/AmbiguousMatchException.cs index a0075bbc0b..c4aeca704d 100644 --- a/src/mscorlib/shared/System/Reflection/AmbiguousMatchException.cs +++ b/src/mscorlib/shared/System/Reflection/AmbiguousMatchException.cs @@ -11,19 +11,19 @@ namespace System.Reflection public AmbiguousMatchException() : base(SR.RFLCT_Ambiguous) { - HResult = __HResults.COR_E_AMBIGUOUSMATCH; + HResult = HResults.COR_E_AMBIGUOUSMATCH; } public AmbiguousMatchException(string message) : base(message) { - HResult = __HResults.COR_E_AMBIGUOUSMATCH; + HResult = HResults.COR_E_AMBIGUOUSMATCH; } public AmbiguousMatchException(string message, Exception inner) : base(message, inner) { - HResult = __HResults.COR_E_AMBIGUOUSMATCH; + HResult = HResults.COR_E_AMBIGUOUSMATCH; } } } diff --git a/src/mscorlib/shared/System/Reflection/CustomAttributeFormatException.cs b/src/mscorlib/shared/System/Reflection/CustomAttributeFormatException.cs index 13766ae8d0..ae67158a53 100644 --- a/src/mscorlib/shared/System/Reflection/CustomAttributeFormatException.cs +++ b/src/mscorlib/shared/System/Reflection/CustomAttributeFormatException.cs @@ -21,7 +21,7 @@ namespace System.Reflection public CustomAttributeFormatException(string message, Exception inner) : base(message, inner) { - HResult = __HResults.COR_E_CUSTOMATTRIBUTEFORMAT; + HResult = HResults.COR_E_CUSTOMATTRIBUTEFORMAT; } protected CustomAttributeFormatException(SerializationInfo info, StreamingContext context) diff --git a/src/mscorlib/shared/System/Reflection/InvalidFilterCriteriaException.cs b/src/mscorlib/shared/System/Reflection/InvalidFilterCriteriaException.cs index 07880a768d..85a447707c 100644 --- a/src/mscorlib/shared/System/Reflection/InvalidFilterCriteriaException.cs +++ b/src/mscorlib/shared/System/Reflection/InvalidFilterCriteriaException.cs @@ -21,7 +21,7 @@ namespace System.Reflection public InvalidFilterCriteriaException(string message, Exception inner) : base(message, inner) { - HResult = __HResults.COR_E_INVALIDFILTERCRITERIA; + HResult = HResults.COR_E_INVALIDFILTERCRITERIA; } protected InvalidFilterCriteriaException(SerializationInfo info, StreamingContext context) diff --git a/src/mscorlib/shared/System/Reflection/ReflectionTypeLoadException.cs b/src/mscorlib/shared/System/Reflection/ReflectionTypeLoadException.cs index ca0c6ab0db..0e86d34056 100644 --- a/src/mscorlib/shared/System/Reflection/ReflectionTypeLoadException.cs +++ b/src/mscorlib/shared/System/Reflection/ReflectionTypeLoadException.cs @@ -13,7 +13,7 @@ namespace System.Reflection { Types = classes; LoaderExceptions = exceptions; - HResult = __HResults.COR_E_REFLECTIONTYPELOAD; + HResult = HResults.COR_E_REFLECTIONTYPELOAD; } public ReflectionTypeLoadException(Type[] classes, Exception[] exceptions, string message) @@ -21,7 +21,7 @@ namespace System.Reflection { Types = classes; LoaderExceptions = exceptions; - HResult = __HResults.COR_E_REFLECTIONTYPELOAD; + HResult = HResults.COR_E_REFLECTIONTYPELOAD; } public override void GetObjectData(SerializationInfo info, StreamingContext context) diff --git a/src/mscorlib/shared/System/Reflection/TargetException.cs b/src/mscorlib/shared/System/Reflection/TargetException.cs index 6e43f56fa4..2309daace1 100644 --- a/src/mscorlib/shared/System/Reflection/TargetException.cs +++ b/src/mscorlib/shared/System/Reflection/TargetException.cs @@ -21,7 +21,7 @@ namespace System.Reflection public TargetException(string message, Exception inner) : base(message, inner) { - HResult = __HResults.COR_E_TARGET; + HResult = HResults.COR_E_TARGET; } protected TargetException(SerializationInfo info, StreamingContext context) diff --git a/src/mscorlib/shared/System/Reflection/TargetInvocationException.cs b/src/mscorlib/shared/System/Reflection/TargetInvocationException.cs index 8d0bfef40d..7c4f60a03e 100644 --- a/src/mscorlib/shared/System/Reflection/TargetInvocationException.cs +++ b/src/mscorlib/shared/System/Reflection/TargetInvocationException.cs @@ -11,13 +11,13 @@ namespace System.Reflection public TargetInvocationException(Exception inner) : base(SR.Arg_TargetInvocationException, inner) { - HResult = __HResults.COR_E_TARGETINVOCATION; + HResult = HResults.COR_E_TARGETINVOCATION; } public TargetInvocationException(string message, Exception inner) : base(message, inner) { - HResult = __HResults.COR_E_TARGETINVOCATION; + HResult = HResults.COR_E_TARGETINVOCATION; } } } diff --git a/src/mscorlib/shared/System/Reflection/TargetParameterCountException.cs b/src/mscorlib/shared/System/Reflection/TargetParameterCountException.cs index e200cdb94f..f31758b7ba 100644 --- a/src/mscorlib/shared/System/Reflection/TargetParameterCountException.cs +++ b/src/mscorlib/shared/System/Reflection/TargetParameterCountException.cs @@ -11,19 +11,19 @@ namespace System.Reflection public TargetParameterCountException() : base(SR.Arg_TargetParameterCountException) { - HResult = __HResults.COR_E_TARGETPARAMCOUNT; + HResult = HResults.COR_E_TARGETPARAMCOUNT; } public TargetParameterCountException(string message) : base(message) { - HResult = __HResults.COR_E_TARGETPARAMCOUNT; + HResult = HResults.COR_E_TARGETPARAMCOUNT; } public TargetParameterCountException(string message, Exception inner) : base(message, inner) { - HResult = __HResults.COR_E_TARGETPARAMCOUNT; + HResult = HResults.COR_E_TARGETPARAMCOUNT; } } } diff --git a/src/mscorlib/shared/System/Resources/MissingManifestResourceException.cs b/src/mscorlib/shared/System/Resources/MissingManifestResourceException.cs index ec814393d0..e11d15d200 100644 --- a/src/mscorlib/shared/System/Resources/MissingManifestResourceException.cs +++ b/src/mscorlib/shared/System/Resources/MissingManifestResourceException.cs @@ -12,19 +12,19 @@ namespace System.Resources public MissingManifestResourceException() : base(SR.Arg_MissingManifestResourceException) { - HResult = System.__HResults.COR_E_MISSINGMANIFESTRESOURCE; + HResult = System.HResults.COR_E_MISSINGMANIFESTRESOURCE; } public MissingManifestResourceException(string message) : base(message) { - HResult = System.__HResults.COR_E_MISSINGMANIFESTRESOURCE; + HResult = System.HResults.COR_E_MISSINGMANIFESTRESOURCE; } public MissingManifestResourceException(string message, Exception inner) : base(message, inner) { - HResult = System.__HResults.COR_E_MISSINGMANIFESTRESOURCE; + HResult = System.HResults.COR_E_MISSINGMANIFESTRESOURCE; } protected MissingManifestResourceException(SerializationInfo info, StreamingContext context) diff --git a/src/mscorlib/shared/System/Resources/MissingSatelliteAssemblyException.cs b/src/mscorlib/shared/System/Resources/MissingSatelliteAssemblyException.cs index d2ddc992ac..615aed6a8c 100644 --- a/src/mscorlib/shared/System/Resources/MissingSatelliteAssemblyException.cs +++ b/src/mscorlib/shared/System/Resources/MissingSatelliteAssemblyException.cs @@ -27,26 +27,26 @@ namespace System.Resources public MissingSatelliteAssemblyException() : base(SR.MissingSatelliteAssembly_Default) { - HResult = System.__HResults.COR_E_MISSINGSATELLITEASSEMBLY; + HResult = System.HResults.COR_E_MISSINGSATELLITEASSEMBLY; } public MissingSatelliteAssemblyException(string message) : base(message) { - HResult = System.__HResults.COR_E_MISSINGSATELLITEASSEMBLY; + HResult = System.HResults.COR_E_MISSINGSATELLITEASSEMBLY; } public MissingSatelliteAssemblyException(string message, String cultureName) : base(message) { - HResult = System.__HResults.COR_E_MISSINGSATELLITEASSEMBLY; + HResult = System.HResults.COR_E_MISSINGSATELLITEASSEMBLY; _cultureName = cultureName; } public MissingSatelliteAssemblyException(string message, Exception inner) : base(message, inner) { - HResult = System.__HResults.COR_E_MISSINGSATELLITEASSEMBLY; + HResult = System.HResults.COR_E_MISSINGSATELLITEASSEMBLY; } protected MissingSatelliteAssemblyException(SerializationInfo info, StreamingContext context) diff --git a/src/mscorlib/shared/System/Runtime/InteropServices/ExternalException.cs b/src/mscorlib/shared/System/Runtime/InteropServices/ExternalException.cs index 81b9a46928..0861d19362 100644 --- a/src/mscorlib/shared/System/Runtime/InteropServices/ExternalException.cs +++ b/src/mscorlib/shared/System/Runtime/InteropServices/ExternalException.cs @@ -26,19 +26,19 @@ namespace System.Runtime.InteropServices public ExternalException() : base(SR.Arg_ExternalException) { - HResult = __HResults.E_FAIL; + HResult = HResults.E_FAIL; } public ExternalException(string message) : base(message) { - HResult = __HResults.E_FAIL; + HResult = HResults.E_FAIL; } public ExternalException(string message, Exception inner) : base(message, inner) { - HResult = __HResults.E_FAIL; + HResult = HResults.E_FAIL; } public ExternalException(string message, int errorCode) diff --git a/src/mscorlib/shared/System/Runtime/Serialization/SerializationException.cs b/src/mscorlib/shared/System/Runtime/Serialization/SerializationException.cs index bfe3313659..3e0af092c0 100644 --- a/src/mscorlib/shared/System/Runtime/Serialization/SerializationException.cs +++ b/src/mscorlib/shared/System/Runtime/Serialization/SerializationException.cs @@ -15,19 +15,19 @@ namespace System.Runtime.Serialization public SerializationException() : base(s_nullMessage) { - HResult = __HResults.COR_E_SERIALIZATION; + HResult = HResults.COR_E_SERIALIZATION; } public SerializationException(String message) : base(message) { - HResult = __HResults.COR_E_SERIALIZATION; + HResult = HResults.COR_E_SERIALIZATION; } public SerializationException(String message, Exception innerException) : base(message, innerException) { - HResult = __HResults.COR_E_SERIALIZATION; + HResult = HResults.COR_E_SERIALIZATION; } protected SerializationException(SerializationInfo info, StreamingContext context) diff --git a/src/mscorlib/shared/System/Security/SecurityException.cs b/src/mscorlib/shared/System/Security/SecurityException.cs index 538f475343..2866a4780c 100644 --- a/src/mscorlib/shared/System/Security/SecurityException.cs +++ b/src/mscorlib/shared/System/Security/SecurityException.cs @@ -12,32 +12,32 @@ namespace System.Security public SecurityException() : base(SR.Arg_SecurityException) { - HResult = __HResults.COR_E_SECURITY; + HResult = HResults.COR_E_SECURITY; } public SecurityException(string message) : base(message) { - HResult = __HResults.COR_E_SECURITY; + HResult = HResults.COR_E_SECURITY; } public SecurityException(string message, Exception inner) : base(message, inner) { - HResult = __HResults.COR_E_SECURITY; + HResult = HResults.COR_E_SECURITY; } public SecurityException(string message, Type type) : base(message) { - HResult = __HResults.COR_E_SECURITY; + HResult = HResults.COR_E_SECURITY; PermissionType = type; } public SecurityException(string message, Type type, string state) : base(message) { - HResult = __HResults.COR_E_SECURITY; + HResult = HResults.COR_E_SECURITY; PermissionType = type; PermissionState = state; } diff --git a/src/mscorlib/shared/System/Security/VerificationException.cs b/src/mscorlib/shared/System/Security/VerificationException.cs index ea5a75906e..bd095f3df4 100644 --- a/src/mscorlib/shared/System/Security/VerificationException.cs +++ b/src/mscorlib/shared/System/Security/VerificationException.cs @@ -11,19 +11,19 @@ namespace System.Security public VerificationException() : base(SR.Verification_Exception) { - HResult = __HResults.COR_E_VERIFICATION; + HResult = HResults.COR_E_VERIFICATION; } public VerificationException(string message) : base(message) { - HResult = __HResults.COR_E_VERIFICATION; + HResult = HResults.COR_E_VERIFICATION; } public VerificationException(string message, Exception innerException) : base(message, innerException) { - HResult = __HResults.COR_E_VERIFICATION; + HResult = HResults.COR_E_VERIFICATION; } protected VerificationException(SerializationInfo info, StreamingContext context) diff --git a/src/mscorlib/shared/System/StackOverflowException.cs b/src/mscorlib/shared/System/StackOverflowException.cs index fb0e88246c..8b21eb769a 100644 --- a/src/mscorlib/shared/System/StackOverflowException.cs +++ b/src/mscorlib/shared/System/StackOverflowException.cs @@ -20,19 +20,19 @@ namespace System public StackOverflowException() : base(SR.Arg_StackOverflowException) { - HResult = __HResults.COR_E_STACKOVERFLOW; + HResult = HResults.COR_E_STACKOVERFLOW; } public StackOverflowException(String message) : base(message) { - HResult = __HResults.COR_E_STACKOVERFLOW; + HResult = HResults.COR_E_STACKOVERFLOW; } public StackOverflowException(String message, Exception innerException) : base(message, innerException) { - HResult = __HResults.COR_E_STACKOVERFLOW; + HResult = HResults.COR_E_STACKOVERFLOW; } } } diff --git a/src/mscorlib/shared/System/SystemException.cs b/src/mscorlib/shared/System/SystemException.cs index d5bcde7efc..64a4b9ca31 100644 --- a/src/mscorlib/shared/System/SystemException.cs +++ b/src/mscorlib/shared/System/SystemException.cs @@ -11,19 +11,19 @@ namespace System public SystemException() : base(SR.Arg_SystemException) { - HResult = __HResults.COR_E_SYSTEM; + HResult = HResults.COR_E_SYSTEM; } public SystemException(String message) : base(message) { - HResult = __HResults.COR_E_SYSTEM; + HResult = HResults.COR_E_SYSTEM; } public SystemException(String message, Exception innerException) : base(message, innerException) { - HResult = __HResults.COR_E_SYSTEM; + HResult = HResults.COR_E_SYSTEM; } protected SystemException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/src/mscorlib/shared/System/Text/DecoderExceptionFallback.cs b/src/mscorlib/shared/System/Text/DecoderExceptionFallback.cs index b465aa68ef..26d604a919 100644 --- a/src/mscorlib/shared/System/Text/DecoderExceptionFallback.cs +++ b/src/mscorlib/shared/System/Text/DecoderExceptionFallback.cs @@ -106,19 +106,19 @@ namespace System.Text public DecoderFallbackException() : base(SR.Arg_ArgumentException) { - HResult = __HResults.COR_E_ARGUMENT; + HResult = HResults.COR_E_ARGUMENT; } public DecoderFallbackException(String message) : base(message) { - HResult = __HResults.COR_E_ARGUMENT; + HResult = HResults.COR_E_ARGUMENT; } public DecoderFallbackException(String message, Exception innerException) : base(message, innerException) { - HResult = __HResults.COR_E_ARGUMENT; + HResult = HResults.COR_E_ARGUMENT; } public DecoderFallbackException(String message, byte[] bytesUnknown, int index) diff --git a/src/mscorlib/shared/System/Text/EncoderExceptionFallback.cs b/src/mscorlib/shared/System/Text/EncoderExceptionFallback.cs index 98eff25b94..71426e5f31 100644 --- a/src/mscorlib/shared/System/Text/EncoderExceptionFallback.cs +++ b/src/mscorlib/shared/System/Text/EncoderExceptionFallback.cs @@ -108,19 +108,19 @@ namespace System.Text public EncoderFallbackException() : base(SR.Arg_ArgumentException) { - HResult = __HResults.COR_E_ARGUMENT; + HResult = HResults.COR_E_ARGUMENT; } public EncoderFallbackException(String message) : base(message) { - HResult = __HResults.COR_E_ARGUMENT; + HResult = HResults.COR_E_ARGUMENT; } public EncoderFallbackException(String message, Exception innerException) : base(message, innerException) { - HResult = __HResults.COR_E_ARGUMENT; + HResult = HResults.COR_E_ARGUMENT; } internal EncoderFallbackException( diff --git a/src/mscorlib/shared/System/Threading/AbandonedMutexException.cs b/src/mscorlib/shared/System/Threading/AbandonedMutexException.cs index 15bc5a7341..c43148d22a 100644 --- a/src/mscorlib/shared/System/Threading/AbandonedMutexException.cs +++ b/src/mscorlib/shared/System/Threading/AbandonedMutexException.cs @@ -22,39 +22,39 @@ namespace System.Threading public AbandonedMutexException() : base(SR.Threading_AbandonedMutexException) { - HResult = __HResults.COR_E_ABANDONEDMUTEX; + HResult = HResults.COR_E_ABANDONEDMUTEX; } public AbandonedMutexException(String message) : base(message) { - HResult = __HResults.COR_E_ABANDONEDMUTEX; + HResult = HResults.COR_E_ABANDONEDMUTEX; } public AbandonedMutexException(String message, Exception inner) : base(message, inner) { - HResult = __HResults.COR_E_ABANDONEDMUTEX; + HResult = HResults.COR_E_ABANDONEDMUTEX; } public AbandonedMutexException(int location, WaitHandle handle) : base(SR.Threading_AbandonedMutexException) { - HResult = __HResults.COR_E_ABANDONEDMUTEX; + HResult = HResults.COR_E_ABANDONEDMUTEX; SetupException(location, handle); } public AbandonedMutexException(String message, int location, WaitHandle handle) : base(message) { - HResult = __HResults.COR_E_ABANDONEDMUTEX; + HResult = HResults.COR_E_ABANDONEDMUTEX; SetupException(location, handle); } public AbandonedMutexException(String message, Exception inner, int location, WaitHandle handle) : base(message, inner) { - HResult = __HResults.COR_E_ABANDONEDMUTEX; + HResult = HResults.COR_E_ABANDONEDMUTEX; SetupException(location, handle); } diff --git a/src/mscorlib/shared/System/Threading/SynchronizationLockException.cs b/src/mscorlib/shared/System/Threading/SynchronizationLockException.cs index c64fc9ced8..5ab186ec9a 100644 --- a/src/mscorlib/shared/System/Threading/SynchronizationLockException.cs +++ b/src/mscorlib/shared/System/Threading/SynchronizationLockException.cs @@ -21,19 +21,19 @@ namespace System.Threading public SynchronizationLockException() : base(SR.Arg_SynchronizationLockException) { - HResult = __HResults.COR_E_SYNCHRONIZATIONLOCK; + HResult = HResults.COR_E_SYNCHRONIZATIONLOCK; } public SynchronizationLockException(String message) : base(message) { - HResult = __HResults.COR_E_SYNCHRONIZATIONLOCK; + HResult = HResults.COR_E_SYNCHRONIZATIONLOCK; } public SynchronizationLockException(String message, Exception innerException) : base(message, innerException) { - HResult = __HResults.COR_E_SYNCHRONIZATIONLOCK; + HResult = HResults.COR_E_SYNCHRONIZATIONLOCK; } protected SynchronizationLockException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/src/mscorlib/shared/System/Threading/ThreadAbortException.cs b/src/mscorlib/shared/System/Threading/ThreadAbortException.cs index ebbc29a702..01fdf1317b 100644 --- a/src/mscorlib/shared/System/Threading/ThreadAbortException.cs +++ b/src/mscorlib/shared/System/Threading/ThreadAbortException.cs @@ -22,7 +22,7 @@ namespace System.Threading { internal ThreadAbortException() { - HResult = __HResults.COR_E_THREADABORTED; + HResult = HResults.COR_E_THREADABORTED; } public object ExceptionState => null; diff --git a/src/mscorlib/shared/System/Threading/ThreadStartException.cs b/src/mscorlib/shared/System/Threading/ThreadStartException.cs index 7a87943ed1..35930d1d2d 100644 --- a/src/mscorlib/shared/System/Threading/ThreadStartException.cs +++ b/src/mscorlib/shared/System/Threading/ThreadStartException.cs @@ -11,13 +11,13 @@ namespace System.Threading internal ThreadStartException() : base(SR.Arg_ThreadStartException) { - HResult = __HResults.COR_E_THREADSTART; + HResult = HResults.COR_E_THREADSTART; } internal ThreadStartException(Exception reason) : base(SR.Arg_ThreadStartException, reason) { - HResult = __HResults.COR_E_THREADSTART; + HResult = HResults.COR_E_THREADSTART; } } } diff --git a/src/mscorlib/shared/System/Threading/ThreadStateException.cs b/src/mscorlib/shared/System/Threading/ThreadStateException.cs index 9477cb1ae4..d8f97a4f3b 100644 --- a/src/mscorlib/shared/System/Threading/ThreadStateException.cs +++ b/src/mscorlib/shared/System/Threading/ThreadStateException.cs @@ -21,19 +21,19 @@ namespace System.Threading public ThreadStateException() : base(SR.Arg_ThreadStateException) { - HResult = __HResults.COR_E_THREADSTATE; + HResult = HResults.COR_E_THREADSTATE; } public ThreadStateException(String message) : base(message) { - HResult = __HResults.COR_E_THREADSTATE; + HResult = HResults.COR_E_THREADSTATE; } public ThreadStateException(String message, Exception innerException) : base(message, innerException) { - HResult = __HResults.COR_E_THREADSTATE; + HResult = HResults.COR_E_THREADSTATE; } protected ThreadStateException(SerializationInfo info, StreamingContext context) diff --git a/src/mscorlib/shared/System/Threading/WaitHandleCannotBeOpenedException.cs b/src/mscorlib/shared/System/Threading/WaitHandleCannotBeOpenedException.cs index 770e70d7ab..47e127191d 100644 --- a/src/mscorlib/shared/System/Threading/WaitHandleCannotBeOpenedException.cs +++ b/src/mscorlib/shared/System/Threading/WaitHandleCannotBeOpenedException.cs @@ -10,17 +10,17 @@ namespace System.Threading { public WaitHandleCannotBeOpenedException() : base(SR.Threading_WaitHandleCannotBeOpenedException) { - HResult = __HResults.COR_E_WAITHANDLECANNOTBEOPENED; + HResult = HResults.COR_E_WAITHANDLECANNOTBEOPENED; } public WaitHandleCannotBeOpenedException(String message) : base(message) { - HResult = __HResults.COR_E_WAITHANDLECANNOTBEOPENED; + HResult = HResults.COR_E_WAITHANDLECANNOTBEOPENED; } public WaitHandleCannotBeOpenedException(String message, Exception innerException) : base(message, innerException) { - HResult = __HResults.COR_E_WAITHANDLECANNOTBEOPENED; + HResult = HResults.COR_E_WAITHANDLECANNOTBEOPENED; } protected WaitHandleCannotBeOpenedException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/src/mscorlib/shared/System/TimeoutException.cs b/src/mscorlib/shared/System/TimeoutException.cs index 4ba95bc47b..b50ae2f902 100644 --- a/src/mscorlib/shared/System/TimeoutException.cs +++ b/src/mscorlib/shared/System/TimeoutException.cs @@ -20,19 +20,19 @@ namespace System public TimeoutException() : base(SR.Arg_TimeoutException) { - HResult = __HResults.COR_E_TIMEOUT; + HResult = HResults.COR_E_TIMEOUT; } public TimeoutException(String message) : base(message) { - HResult = __HResults.COR_E_TIMEOUT; + HResult = HResults.COR_E_TIMEOUT; } public TimeoutException(String message, Exception innerException) : base(message, innerException) { - HResult = __HResults.COR_E_TIMEOUT; + HResult = HResults.COR_E_TIMEOUT; } protected TimeoutException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/src/mscorlib/shared/System/TypeAccessException.cs b/src/mscorlib/shared/System/TypeAccessException.cs index 302dcb1ac1..ff081582b6 100644 --- a/src/mscorlib/shared/System/TypeAccessException.cs +++ b/src/mscorlib/shared/System/TypeAccessException.cs @@ -13,19 +13,19 @@ namespace System public TypeAccessException() : base(SR.Arg_TypeAccessException) { - HResult = __HResults.COR_E_TYPEACCESS; + HResult = HResults.COR_E_TYPEACCESS; } public TypeAccessException(string message) : base(message) { - HResult = __HResults.COR_E_TYPEACCESS; + HResult = HResults.COR_E_TYPEACCESS; } public TypeAccessException(string message, Exception inner) : base(message, inner) { - HResult = __HResults.COR_E_TYPEACCESS; + HResult = HResults.COR_E_TYPEACCESS; } protected TypeAccessException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/src/mscorlib/shared/System/TypeInitializationException.cs b/src/mscorlib/shared/System/TypeInitializationException.cs index 8d0b8a9f79..03a1bad3a7 100644 --- a/src/mscorlib/shared/System/TypeInitializationException.cs +++ b/src/mscorlib/shared/System/TypeInitializationException.cs @@ -28,7 +28,7 @@ namespace System private TypeInitializationException() : base(SR.TypeInitialization_Default) { - HResult = __HResults.COR_E_TYPEINITIALIZATION; + HResult = HResults.COR_E_TYPEINITIALIZATION; } @@ -41,14 +41,14 @@ namespace System // for Interop only, though it's not particularly useful. internal TypeInitializationException(String message) : base(message) { - HResult = __HResults.COR_E_TYPEINITIALIZATION; + HResult = HResults.COR_E_TYPEINITIALIZATION; } internal TypeInitializationException(String fullTypeName, String message, Exception innerException) : base(message, innerException) { _typeName = fullTypeName; - HResult = __HResults.COR_E_TYPEINITIALIZATION; + HResult = HResults.COR_E_TYPEINITIALIZATION; } public override void GetObjectData(SerializationInfo info, StreamingContext context) diff --git a/src/mscorlib/shared/System/TypeUnloadedException.cs b/src/mscorlib/shared/System/TypeUnloadedException.cs index c7ed71c9cb..97039bb8f1 100644 --- a/src/mscorlib/shared/System/TypeUnloadedException.cs +++ b/src/mscorlib/shared/System/TypeUnloadedException.cs @@ -11,19 +11,19 @@ namespace System public TypeUnloadedException() : base(SR.Arg_TypeUnloadedException) { - HResult = __HResults.COR_E_TYPEUNLOADED; + HResult = HResults.COR_E_TYPEUNLOADED; } public TypeUnloadedException(string message) : base(message) { - HResult = __HResults.COR_E_TYPEUNLOADED; + HResult = HResults.COR_E_TYPEUNLOADED; } public TypeUnloadedException(string message, Exception innerException) : base(message, innerException) { - HResult = __HResults.COR_E_TYPEUNLOADED; + HResult = HResults.COR_E_TYPEUNLOADED; } protected TypeUnloadedException(SerializationInfo info, StreamingContext context) diff --git a/src/mscorlib/shared/System/UnauthorizedAccessException.cs b/src/mscorlib/shared/System/UnauthorizedAccessException.cs index 667d576292..679a1a762d 100644 --- a/src/mscorlib/shared/System/UnauthorizedAccessException.cs +++ b/src/mscorlib/shared/System/UnauthorizedAccessException.cs @@ -24,19 +24,19 @@ namespace System public UnauthorizedAccessException() : base(SR.Arg_UnauthorizedAccessException) { - HResult = __HResults.COR_E_UNAUTHORIZEDACCESS; + HResult = HResults.COR_E_UNAUTHORIZEDACCESS; } public UnauthorizedAccessException(String message) : base(message) { - HResult = __HResults.COR_E_UNAUTHORIZEDACCESS; + HResult = HResults.COR_E_UNAUTHORIZEDACCESS; } public UnauthorizedAccessException(String message, Exception inner) : base(message, inner) { - HResult = __HResults.COR_E_UNAUTHORIZEDACCESS; + HResult = HResults.COR_E_UNAUTHORIZEDACCESS; } protected UnauthorizedAccessException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/src/mscorlib/src/System/AccessViolationException.cs b/src/mscorlib/src/System/AccessViolationException.cs index 23d086fb42..103a4c0a9d 100644 --- a/src/mscorlib/src/System/AccessViolationException.cs +++ b/src/mscorlib/src/System/AccessViolationException.cs @@ -21,19 +21,19 @@ namespace System public AccessViolationException() : base(SR.Arg_AccessViolationException) { - HResult = __HResults.E_POINTER; + HResult = HResults.E_POINTER; } public AccessViolationException(String message) : base(message) { - HResult = __HResults.E_POINTER; + HResult = HResults.E_POINTER; } public AccessViolationException(String message, Exception innerException) : base(message, innerException) { - HResult = __HResults.E_POINTER; + HResult = HResults.E_POINTER; } protected AccessViolationException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/src/mscorlib/src/System/AppDomainUnloadedException.cs b/src/mscorlib/src/System/AppDomainUnloadedException.cs index a5e74e2b23..b673d8c998 100644 --- a/src/mscorlib/src/System/AppDomainUnloadedException.cs +++ b/src/mscorlib/src/System/AppDomainUnloadedException.cs @@ -21,7 +21,7 @@ namespace System public AppDomainUnloadedException() : base(SR.Arg_AppDomainUnloadedException) { - HResult = __HResults.COR_E_APPDOMAINUNLOADED; + HResult = HResults.COR_E_APPDOMAINUNLOADED; } // diff --git a/src/mscorlib/src/System/Exception.cs b/src/mscorlib/src/System/Exception.cs index 7f886aebcb..785637d1ba 100644 --- a/src/mscorlib/src/System/Exception.cs +++ b/src/mscorlib/src/System/Exception.cs @@ -36,7 +36,7 @@ namespace System _message = null; _stackTrace = null; _dynamicMethods = null; - HResult = __HResults.COR_E_EXCEPTION; + HResult = HResults.COR_E_EXCEPTION; _xcode = _COMPlusExceptionCode; _xptrs = (IntPtr)0; diff --git a/src/mscorlib/src/System/HResults.cs b/src/mscorlib/src/System/HResults.cs index d733ad4b21..1e39df7970 100644 --- a/src/mscorlib/src/System/HResults.cs +++ b/src/mscorlib/src/System/HResults.cs @@ -9,35 +9,24 @@ // // //===========================================================================*/ +// Note: FACILITY_URT is defined as 0x13 (0x8013xxxx). Within that +// range, 0x1yyy is for Runtime errors (used for Security, Metadata, etc). +// In that subrange, 0x15zz and 0x16zz have been allocated for classlib-type +// HResults. Also note that some of our HResults have to map to certain +// COM HR's, etc. + +// Another arbitrary decision... Feel free to change this, as long as you +// renumber the HResults yourself (and update rexcep.h). +// Reflection will use 0x1600 -> 0x161f. IO will use 0x1620 -> 0x163f. +// Security will use 0x1640 -> 0x165f + using System; namespace System { - // Note: FACILITY_URT is defined as 0x13 (0x8013xxxx). Within that - // range, 0x1yyy is for Runtime errors (used for Security, Metadata, etc). - // In that subrange, 0x15zz and 0x16zz have been allocated for classlib-type - // HResults. Also note that some of our HResults have to map to certain - // COM HR's, etc. - - // Another arbitrary decision... Feel free to change this, as long as you - // renumber the HResults yourself (and update rexcep.h). - // Reflection will use 0x1600 -> 0x161f. IO will use 0x1620 -> 0x163f. - // Security will use 0x1640 -> 0x165f - - // There are HResults files in the IO, Remoting, Reflection & - // Security/Util directories as well, so choose your HResults carefully. internal static class HResults { - internal const int APPMODEL_ERROR_NO_PACKAGE = unchecked((int)0x80073D54); - internal const int CLDB_E_FILE_CORRUPT = unchecked((int)0x8013110e); - internal const int CLDB_E_FILE_OLDVER = unchecked((int)0x80131107); - internal const int CLDB_E_INDEX_NOTFOUND = unchecked((int)0x80131124); - internal const int CLR_E_BIND_ASSEMBLY_NOT_FOUND = unchecked((int)0x80132004); - internal const int CLR_E_BIND_ASSEMBLY_PUBLIC_KEY_MISMATCH = unchecked((int)0x80132001); - internal const int CLR_E_BIND_ASSEMBLY_VERSION_TOO_LOW = unchecked((int)0x80132000); - internal const int CLR_E_BIND_TYPE_NOT_FOUND = unchecked((int)0x80132005); - internal const int CLR_E_BIND_UNRECOGNIZED_IDENTITY_FORMAT = unchecked((int)0x80132003); internal const int COR_E_ABANDONEDMUTEX = unchecked((int)0x8013152D); internal const int COR_E_AMBIGUOUSMATCH = unchecked((int)0x8000211D); internal const int COR_E_APPDOMAINUNLOADED = unchecked((int)0x80131014); @@ -46,30 +35,36 @@ namespace System internal const int COR_E_ARGUMENTOUTOFRANGE = unchecked((int)0x80131502); internal const int COR_E_ARITHMETIC = unchecked((int)0x80070216); internal const int COR_E_ARRAYTYPEMISMATCH = unchecked((int)0x80131503); - internal const int COR_E_ASSEMBLYEXPECTED = unchecked((int)0x80131018); + internal const int COR_E_BADEXEFORMAT = unchecked((int)0x800700C1); internal const int COR_E_BADIMAGEFORMAT = unchecked((int)0x8007000B); internal const int COR_E_CANNOTUNLOADAPPDOMAIN = unchecked((int)0x80131015); - internal const int COR_E_CODECONTRACTFAILED = unchecked((int)0x80131542); + internal const int COR_E_COMEMULATE = unchecked((int)0x80131535); internal const int COR_E_CONTEXTMARSHAL = unchecked((int)0x80131504); internal const int COR_E_CUSTOMATTRIBUTEFORMAT = unchecked((int)0x80131605); internal const int COR_E_DATAMISALIGNED = unchecked((int)0x80131541); + internal const int COR_E_DIRECTORYNOTFOUND = unchecked((int)0x80070003); internal const int COR_E_DIVIDEBYZERO = unchecked((int)0x80020012); // DISP_E_DIVBYZERO internal const int COR_E_DLLNOTFOUND = unchecked((int)0x80131524); internal const int COR_E_DUPLICATEWAITOBJECT = unchecked((int)0x80131529); + internal const int COR_E_ENDOFSTREAM = unchecked((int)0x80070026); // OS defined internal const int COR_E_ENTRYPOINTNOTFOUND = unchecked((int)0x80131523); internal const int COR_E_EXCEPTION = unchecked((int)0x80131500); internal const int COR_E_EXECUTIONENGINE = unchecked((int)0x80131506); internal const int COR_E_FIELDACCESS = unchecked((int)0x80131507); - internal const int COR_E_FIXUPSINEXE = unchecked((int)0x80131019); + internal const int COR_E_FILELOAD = unchecked((int)0x80131621); + internal const int COR_E_FILENOTFOUND = unchecked((int)0x80070002); internal const int COR_E_FORMAT = unchecked((int)0x80131537); + internal const int COR_E_HOSTPROTECTION = unchecked((int)0x80131640); internal const int COR_E_INDEXOUTOFRANGE = unchecked((int)0x80131508); internal const int COR_E_INSUFFICIENTEXECUTIONSTACK = unchecked((int)0x80131578); + internal const int COR_E_INSUFFICIENTMEMORY = unchecked((int)0x8013153D); internal const int COR_E_INVALIDCAST = unchecked((int)0x80004002); internal const int COR_E_INVALIDCOMOBJECT = unchecked((int)0x80131527); internal const int COR_E_INVALIDFILTERCRITERIA = unchecked((int)0x80131601); internal const int COR_E_INVALIDOLEVARIANTTYPE = unchecked((int)0x80131531); internal const int COR_E_INVALIDOPERATION = unchecked((int)0x80131509); - internal const int COR_E_INVALIDPROGRAM = unchecked((int)0x8013153a); + internal const int COR_E_INVALIDPROGRAM = unchecked((int)0x8013153A); + internal const int COR_E_IO = unchecked((int)0x80131620); internal const int COR_E_KEYNOTFOUND = unchecked((int)0x80131577); internal const int COR_E_MARSHALDIRECTIVE = unchecked((int)0x80131535); internal const int COR_E_MEMBERACCESS = unchecked((int)0x8013151A); @@ -79,9 +74,7 @@ namespace System internal const int COR_E_MISSINGMEMBER = unchecked((int)0x80131512); internal const int COR_E_MISSINGMETHOD = unchecked((int)0x80131513); internal const int COR_E_MISSINGSATELLITEASSEMBLY = unchecked((int)0x80131536); - internal const int COR_E_MODULE_HASH_CHECK_FAILED = unchecked((int)0x80131039); internal const int COR_E_MULTICASTNOTSUPPORTED = unchecked((int)0x80131514); - internal const int COR_E_NEWER_RUNTIME = unchecked((int)0x8013101b); internal const int COR_E_NOTFINITENUMBER = unchecked((int)0x80131528); internal const int COR_E_NOTSUPPORTED = unchecked((int)0x80131515); internal const int COR_E_NULLREFERENCE = unchecked((int)0x80004003); @@ -89,147 +82,57 @@ namespace System internal const int COR_E_OPERATIONCANCELED = unchecked((int)0x8013153B); internal const int COR_E_OUTOFMEMORY = unchecked((int)0x8007000E); internal const int COR_E_OVERFLOW = unchecked((int)0x80131516); + internal const int COR_E_PATHTOOLONG = unchecked((int)0x800700CE); internal const int COR_E_PLATFORMNOTSUPPORTED = unchecked((int)0x80131539); internal const int COR_E_RANK = unchecked((int)0x80131517); internal const int COR_E_REFLECTIONTYPELOAD = unchecked((int)0x80131602); - internal const int COR_E_REMOTING = unchecked((int)0x8013150b); - internal const int COR_E_RUNTIMEWRAPPED = unchecked((int)0x8013153e); + internal const int COR_E_RUNTIMEWRAPPED = unchecked((int)0x8013153E); internal const int COR_E_SAFEARRAYRANKMISMATCH = unchecked((int)0x80131538); internal const int COR_E_SAFEARRAYTYPEMISMATCH = unchecked((int)0x80131533); + internal const int COR_E_SAFEHANDLEMISSINGATTRIBUTE = unchecked((int)0x80131623); internal const int COR_E_SECURITY = unchecked((int)0x8013150A); + internal const int COR_E_SEMAPHOREFULL = unchecked((int)0x8013152B); internal const int COR_E_SERIALIZATION = unchecked((int)0x8013150C); - internal const int COR_E_SERVER = unchecked((int)0x8013150e); internal const int COR_E_STACKOVERFLOW = unchecked((int)0x800703E9); internal const int COR_E_SYNCHRONIZATIONLOCK = unchecked((int)0x80131518); internal const int COR_E_SYSTEM = unchecked((int)0x80131501); internal const int COR_E_TARGET = unchecked((int)0x80131603); internal const int COR_E_TARGETINVOCATION = unchecked((int)0x80131604); - internal const int COR_E_TARGETPARAMCOUNT = unchecked((int)0x8002000e); + internal const int COR_E_TARGETPARAMCOUNT = unchecked((int)0x8002000E); internal const int COR_E_THREADABORTED = unchecked((int)0x80131530); internal const int COR_E_THREADINTERRUPTED = unchecked((int)0x80131519); internal const int COR_E_THREADSTART = unchecked((int)0x80131525); internal const int COR_E_THREADSTATE = unchecked((int)0x80131520); + internal const int COR_E_THREADSTOP = unchecked((int)0x80131521); internal const int COR_E_TIMEOUT = unchecked((int)0x80131505); internal const int COR_E_TYPEACCESS = unchecked((int)0x80131543); internal const int COR_E_TYPEINITIALIZATION = unchecked((int)0x80131534); internal const int COR_E_TYPELOAD = unchecked((int)0x80131522); internal const int COR_E_TYPEUNLOADED = unchecked((int)0x80131013); internal const int COR_E_UNAUTHORIZEDACCESS = unchecked((int)0x80070005); + internal const int COR_E_UNSUPPORTEDFORMAT = unchecked((int)0x80131523); internal const int COR_E_VERIFICATION = unchecked((int)0x8013150D); internal const int COR_E_WAITHANDLECANNOTBEOPENED = unchecked((int)0x8013152C); internal const int CORSEC_E_CRYPTO = unchecked((int)0x80131430); internal const int CORSEC_E_CRYPTO_UNEX_OPER = unchecked((int)0x80131431); - internal const int CORSEC_E_INVALID_IMAGE_FORMAT = unchecked((int)0x8013141d); - internal const int CORSEC_E_INVALID_PUBLICKEY = unchecked((int)0x8013141e); - internal const int CORSEC_E_INVALID_STRONGNAME = unchecked((int)0x8013141a); internal const int CORSEC_E_MIN_GRANT_FAIL = unchecked((int)0x80131417); - internal const int CORSEC_E_MISSING_STRONGNAME = unchecked((int)0x8013141b); internal const int CORSEC_E_NO_EXEC_PERM = unchecked((int)0x80131418); internal const int CORSEC_E_POLICY_EXCEPTION = unchecked((int)0x80131416); - internal const int CORSEC_E_SIGNATURE_MISMATCH = unchecked((int)0x80131420); internal const int CORSEC_E_XMLSYNTAX = unchecked((int)0x80131419); - internal const int CTL_E_DEVICEIOERROR = unchecked((int)0x800A0039); - internal const int CTL_E_DIVISIONBYZERO = unchecked((int)0x800A000B); - internal const int CTL_E_FILENOTFOUND = unchecked((int)0x800A0035); - internal const int CTL_E_OUTOFMEMORY = unchecked((int)0x800A0007); - internal const int CTL_E_OUTOFSTACKSPACE = unchecked((int)0x800A001C); - internal const int CTL_E_OVERFLOW = unchecked((int)0x800A0006); - internal const int CTL_E_PATHFILEACCESSERROR = unchecked((int)0x800A004B); - internal const int CTL_E_PATHNOTFOUND = unchecked((int)0x800A004C); - internal const int CTL_E_PERMISSIONDENIED = unchecked((int)0x800A0046); - internal const int E_ELEMENTNOTAVAILABLE = unchecked((int)0x802B001F); - internal const int E_ELEMENTNOTENABLED = unchecked((int)0x802B001E); + internal const int DISP_E_OVERFLOW = unchecked((int)0x8002000A); + internal const int E_BOUNDS = unchecked((int)0x8000000B); + internal const int E_CHANGED_STATE = unchecked((int)0x8000000C); internal const int E_FAIL = unchecked((int)0x80004005); internal const int E_HANDLE = unchecked((int)0x80070006); - internal const int E_ILLEGAL_DELEGATE_ASSIGNMENT = unchecked((int)0x80000018); - internal const int E_ILLEGAL_METHOD_CALL = unchecked((int)0x8000000E); - internal const int E_ILLEGAL_STATE_CHANGE = unchecked((int)0x8000000D); internal const int E_INVALIDARG = unchecked((int)0x80070057); - internal const int E_LAYOUTCYCLE = unchecked((int)0x802B0014); internal const int E_NOTIMPL = unchecked((int)0x80004001); - internal const int E_OUTOFMEMORY = unchecked((int)0x8007000E); - internal const int E_POINTER = unchecked((int)0x80004003L); - internal const int E_XAMLPARSEFAILED = unchecked((int)0x802B000A); - internal const int ERROR_BAD_EXE_FORMAT = unchecked((int)0x800700C1); - internal const int ERROR_BAD_NET_NAME = unchecked((int)0x80070043); - internal const int ERROR_BAD_NETPATH = unchecked((int)0x80070035); - internal const int ERROR_DISK_CORRUPT = unchecked((int)0x80070571); - internal const int ERROR_DLL_INIT_FAILED = unchecked((int)0x8007045A); - internal const int ERROR_DLL_NOT_FOUND = unchecked((int)0x80070485); - internal const int ERROR_EXE_MARKED_INVALID = unchecked((int)0x800700C0); - internal const int ERROR_FILE_CORRUPT = unchecked((int)0x80070570); - internal const int ERROR_FILE_INVALID = unchecked((int)0x800703EE); - internal const int ERROR_FILE_NOT_FOUND = unchecked((int)0x80070002); - internal const int ERROR_INVALID_DLL = unchecked((int)0x80070482); - internal const int ERROR_INVALID_NAME = unchecked((int)0x8007007B); - internal const int ERROR_INVALID_ORDINAL = unchecked((int)0x800700B6); - internal const int ERROR_INVALID_PARAMETER = unchecked((int)0x80070057); - internal const int ERROR_LOCK_VIOLATION = unchecked((int)0x80070021); - internal const int ERROR_MOD_NOT_FOUND = unchecked((int)0x8007007E); - internal const int ERROR_NO_UNICODE_TRANSLATION = unchecked((int)0x80070459); - internal const int ERROR_NOACCESS = unchecked((int)0x800703E6); - internal const int ERROR_NOT_READY = unchecked((int)0x80070015); - internal const int ERROR_OPEN_FAILED = unchecked((int)0x8007006E); - internal const int ERROR_PATH_NOT_FOUND = unchecked((int)0x80070003); - internal const int ERROR_SHARING_VIOLATION = unchecked((int)0x80070020); - internal const int ERROR_TOO_MANY_OPEN_FILES = unchecked((int)0x80070004); - internal const int ERROR_UNRECOGNIZED_VOLUME = unchecked((int)0x800703ED); - internal const int ERROR_WRONG_TARGET_NAME = unchecked((int)0x80070574); - internal const int FUSION_E_ASM_MODULE_MISSING = unchecked((int)0x80131042); - internal const int FUSION_E_CACHEFILE_FAILED = unchecked((int)0x80131052); - internal const int FUSION_E_CODE_DOWNLOAD_DISABLED = unchecked((int)0x80131048); - internal const int FUSION_E_HOST_GAC_ASM_MISMATCH = unchecked((int)0x80131050); + internal const int E_POINTER = unchecked((int)0x80004003); + internal const int ERROR_MRM_MAP_NOT_FOUND = unchecked((int)0x80073B1F); internal const int FUSION_E_INVALID_NAME = unchecked((int)0x80131047); - internal const int FUSION_E_INVALID_PRIVATE_ASM_LOCATION = unchecked((int)0x80131041); - internal const int FUSION_E_LOADFROM_BLOCKED = unchecked((int)0x80131051); - internal const int FUSION_E_PRIVATE_ASM_DISALLOWED = unchecked((int)0x80131044); internal const int FUSION_E_REF_DEF_MISMATCH = unchecked((int)0x80131040); - internal const int FUSION_E_SIGNATURE_CHECK_FAILED = unchecked((int)0x80131045); - internal const int INET_E_CANNOT_CONNECT = unchecked((int)0x800C0004); - internal const int INET_E_CONNECTION_TIMEOUT = unchecked((int)0x800C000B); - internal const int INET_E_DATA_NOT_AVAILABLE = unchecked((int)0x800C0007); - internal const int INET_E_DOWNLOAD_FAILURE = unchecked((int)0x800C0008); - internal const int INET_E_OBJECT_NOT_FOUND = unchecked((int)0x800C0006); - internal const int INET_E_RESOURCE_NOT_FOUND = unchecked((int)0x800C0005); - internal const int INET_E_UNKNOWN_PROTOCOL = unchecked((int)0x800C000D); - internal const int ISS_E_ALLOC_TOO_LARGE = unchecked((int)0x80131484); - internal const int ISS_E_BLOCK_SIZE_TOO_SMALL = unchecked((int)0x80131483); - internal const int ISS_E_CALLER = unchecked((int)0x801314A1); - internal const int ISS_E_CORRUPTED_STORE_FILE = unchecked((int)0x80131480); - internal const int ISS_E_CREATE_DIR = unchecked((int)0x80131468); - internal const int ISS_E_CREATE_MUTEX = unchecked((int)0x80131464); - internal const int ISS_E_DEPRECATE = unchecked((int)0x801314A0); - internal const int ISS_E_FILE_NOT_MAPPED = unchecked((int)0x80131482); - internal const int ISS_E_FILE_WRITE = unchecked((int)0x80131466); - internal const int ISS_E_GET_FILE_SIZE = unchecked((int)0x80131463); - internal const int ISS_E_ISOSTORE = unchecked((int)0x80131450); - internal const int ISS_E_LOCK_FAILED = unchecked((int)0x80131465); - internal const int ISS_E_MACHINE = unchecked((int)0x801314A3); - internal const int ISS_E_MACHINE_DACL = unchecked((int)0x801314A4); - internal const int ISS_E_MAP_VIEW_OF_FILE = unchecked((int)0x80131462); - internal const int ISS_E_OPEN_FILE_MAPPING = unchecked((int)0x80131461); - internal const int ISS_E_OPEN_STORE_FILE = unchecked((int)0x80131460); - internal const int ISS_E_PATH_LENGTH = unchecked((int)0x801314A2); - internal const int ISS_E_SET_FILE_POINTER = unchecked((int)0x80131467); - internal const int ISS_E_STORE_NOT_OPEN = unchecked((int)0x80131469); - internal const int ISS_E_STORE_VERSION = unchecked((int)0x80131481); - internal const int ISS_E_TABLE_ROW_NOT_FOUND = unchecked((int)0x80131486); - internal const int ISS_E_USAGE_WILL_EXCEED_QUOTA = unchecked((int)0x80131485); - internal const int META_E_BAD_SIGNATURE = unchecked((int)0x80131192); - internal const int META_E_CA_FRIENDS_SN_REQUIRED = unchecked((int)0x801311e6); - internal const int MSEE_E_ASSEMBLYLOADINPROGRESS = unchecked((int)0x80131016); + internal const int NTE_FAIL = unchecked((int)0x80090020); + internal const int REGDB_E_CLASSNOTREG = unchecked((int)0x80040154); internal const int RO_E_CLOSED = unchecked((int)0x80000013); - internal const int E_BOUNDS = unchecked((int)0x8000000B); - internal const int RO_E_METADATA_NAME_NOT_FOUND = unchecked((int)0x8000000F); - internal const int SECURITY_E_INCOMPATIBLE_EVIDENCE = unchecked((int)0x80131403); - internal const int SECURITY_E_INCOMPATIBLE_SHARE = unchecked((int)0x80131401); - internal const int SECURITY_E_UNVERIFIABLE = unchecked((int)0x80131402); - internal const int STG_E_PATHNOTFOUND = unchecked((int)0x80030003); - public const int COR_E_DIRECTORYNOTFOUND = unchecked((int)0x80070003); - public const int COR_E_ENDOFSTREAM = unchecked((int)0x80070026); // OS defined - public const int COR_E_FILELOAD = unchecked((int)0x80131621); - public const int COR_E_FILENOTFOUND = unchecked((int)0x80070002); - public const int COR_E_IO = unchecked((int)0x80131620); - public const int COR_E_PATHTOOLONG = unchecked((int)0x800700CE); + internal const int TYPE_E_TYPEMISMATCH = unchecked((int)0x80028CA0); } } diff --git a/src/mscorlib/src/System/IO/DriveNotFoundException.cs b/src/mscorlib/src/System/IO/DriveNotFoundException.cs index 7e9b0c9f36..fb7001d14b 100644 --- a/src/mscorlib/src/System/IO/DriveNotFoundException.cs +++ b/src/mscorlib/src/System/IO/DriveNotFoundException.cs @@ -22,13 +22,13 @@ namespace System.IO public DriveNotFoundException() : base(SR.Arg_DriveNotFoundException) { - HResult = __HResults.COR_E_DIRECTORYNOTFOUND; + HResult = HResults.COR_E_DIRECTORYNOTFOUND; } public DriveNotFoundException(String message) : base(message) { - HResult = __HResults.COR_E_DIRECTORYNOTFOUND; + HResult = HResults.COR_E_DIRECTORYNOTFOUND; } protected DriveNotFoundException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/src/mscorlib/src/System/IO/FileLoadException.CoreCLR.cs b/src/mscorlib/src/System/IO/FileLoadException.CoreCLR.cs index d4ce9a9ab9..bd3504580b 100644 --- a/src/mscorlib/src/System/IO/FileLoadException.CoreCLR.cs +++ b/src/mscorlib/src/System/IO/FileLoadException.CoreCLR.cs @@ -27,7 +27,7 @@ namespace System.IO GetFileLoadExceptionMessage(hResult, JitHelpers.GetStringHandleOnStack(ref format)); string message = null; - if (hResult == System.__HResults.COR_E_BADEXEFORMAT) + if (hResult == System.HResults.COR_E_BADEXEFORMAT) message = SR.Arg_BadImageFormatException; else GetMessageForHR(hResult, JitHelpers.GetStringHandleOnStack(ref message)); diff --git a/src/mscorlib/src/System/IO/IOException.cs b/src/mscorlib/src/System/IO/IOException.cs index 65504de863..169df95ac6 100644 --- a/src/mscorlib/src/System/IO/IOException.cs +++ b/src/mscorlib/src/System/IO/IOException.cs @@ -34,13 +34,13 @@ namespace System.IO public IOException() : base(SR.Arg_IOException) { - HResult = __HResults.COR_E_IO; + HResult = HResults.COR_E_IO; } public IOException(String message) : base(message) { - HResult = __HResults.COR_E_IO; + HResult = HResults.COR_E_IO; } public IOException(String message, int hresult) @@ -62,7 +62,7 @@ namespace System.IO public IOException(String message, Exception innerException) : base(message, innerException) { - HResult = __HResults.COR_E_IO; + HResult = HResults.COR_E_IO; } protected IOException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/src/mscorlib/src/System/IO/__HResults.cs b/src/mscorlib/src/System/IO/__HResults.cs deleted file mode 100644 index 633c3538c5..0000000000 --- a/src/mscorlib/src/System/IO/__HResults.cs +++ /dev/null @@ -1,31 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -//============================================================================= -// -// -// -// -// Purpose: Define HResult constants. Every exception has one of these. -// -// -//===========================================================================*/ - -using System; - -namespace System.IO -{ - // Only static data no need to serialize - internal static class __HResults - { - // These use an error code from WinError.h - public const int COR_E_ENDOFSTREAM = unchecked((int)0x80070026); // OS defined - public const int COR_E_FILELOAD = unchecked((int)0x80131621); - public const int COR_E_FILENOTFOUND = unchecked((int)0x80070002); - public const int COR_E_DIRECTORYNOTFOUND = unchecked((int)0x80070003); - public const int COR_E_PATHTOOLONG = unchecked((int)0x800700CE); - - public const int COR_E_IO = unchecked((int)0x80131620); - } -} diff --git a/src/mscorlib/src/System/InsufficientMemoryException.cs b/src/mscorlib/src/System/InsufficientMemoryException.cs index 8f7aa96ff7..b4bc588f18 100644 --- a/src/mscorlib/src/System/InsufficientMemoryException.cs +++ b/src/mscorlib/src/System/InsufficientMemoryException.cs @@ -27,19 +27,19 @@ namespace System public InsufficientMemoryException() : base(GetMessageFromNativeResources(ExceptionMessageKind.OutOfMemory)) { - HResult = __HResults.COR_E_INSUFFICIENTMEMORY; + HResult = HResults.COR_E_INSUFFICIENTMEMORY; } public InsufficientMemoryException(String message) : base(message) { - HResult = __HResults.COR_E_INSUFFICIENTMEMORY; + HResult = HResults.COR_E_INSUFFICIENTMEMORY; } public InsufficientMemoryException(String message, Exception innerException) : base(message, innerException) { - HResult = __HResults.COR_E_INSUFFICIENTMEMORY; + HResult = HResults.COR_E_INSUFFICIENTMEMORY; } } } diff --git a/src/mscorlib/src/System/MissingFieldException.cs b/src/mscorlib/src/System/MissingFieldException.cs index 668d5f2a31..31931bf91c 100644 --- a/src/mscorlib/src/System/MissingFieldException.cs +++ b/src/mscorlib/src/System/MissingFieldException.cs @@ -22,19 +22,19 @@ namespace System public MissingFieldException() : base(SR.Arg_MissingFieldException) { - HResult = __HResults.COR_E_MISSINGFIELD; + HResult = HResults.COR_E_MISSINGFIELD; } public MissingFieldException(String message) : base(message) { - HResult = __HResults.COR_E_MISSINGFIELD; + HResult = HResults.COR_E_MISSINGFIELD; } public MissingFieldException(String message, Exception inner) : base(message, inner) { - HResult = __HResults.COR_E_MISSINGFIELD; + HResult = HResults.COR_E_MISSINGFIELD; } protected MissingFieldException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/src/mscorlib/src/System/MissingMemberException.cs b/src/mscorlib/src/System/MissingMemberException.cs index 1fb0c55e40..def3c39824 100644 --- a/src/mscorlib/src/System/MissingMemberException.cs +++ b/src/mscorlib/src/System/MissingMemberException.cs @@ -26,19 +26,19 @@ namespace System public MissingMemberException() : base(SR.Arg_MissingMemberException) { - HResult = __HResults.COR_E_MISSINGMEMBER; + HResult = HResults.COR_E_MISSINGMEMBER; } public MissingMemberException(String message) : base(message) { - HResult = __HResults.COR_E_MISSINGMEMBER; + HResult = HResults.COR_E_MISSINGMEMBER; } public MissingMemberException(String message, Exception inner) : base(message, inner) { - HResult = __HResults.COR_E_MISSINGMEMBER; + HResult = HResults.COR_E_MISSINGMEMBER; } protected MissingMemberException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/src/mscorlib/src/System/OutOfMemoryException.cs b/src/mscorlib/src/System/OutOfMemoryException.cs index 3bec542077..8ef2d7b265 100644 --- a/src/mscorlib/src/System/OutOfMemoryException.cs +++ b/src/mscorlib/src/System/OutOfMemoryException.cs @@ -22,19 +22,19 @@ namespace System public OutOfMemoryException() : base(GetMessageFromNativeResources(ExceptionMessageKind.OutOfMemory)) { - HResult = __HResults.COR_E_OUTOFMEMORY; + HResult = HResults.COR_E_OUTOFMEMORY; } public OutOfMemoryException(String message) : base(message) { - HResult = __HResults.COR_E_OUTOFMEMORY; + HResult = HResults.COR_E_OUTOFMEMORY; } public OutOfMemoryException(String message, Exception innerException) : base(message, innerException) { - HResult = __HResults.COR_E_OUTOFMEMORY; + HResult = HResults.COR_E_OUTOFMEMORY; } protected OutOfMemoryException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/src/mscorlib/src/System/Resources/ResourceManager.cs b/src/mscorlib/src/System/Resources/ResourceManager.cs index f171239857..30222b4aae 100644 --- a/src/mscorlib/src/System/Resources/ResourceManager.cs +++ b/src/mscorlib/src/System/Resources/ResourceManager.cs @@ -1035,7 +1035,7 @@ namespace System.Resources // In this case _PRIExceptionInfo is now null and we will just throw the generic // MissingManifestResource_NoPRIresources exception. // See the implementation of GetString for more details. - if (e.HResult != __HResults.ERROR_MRM_MAP_NOT_FOUND) + if (e.HResult != HResults.ERROR_MRM_MAP_NOT_FOUND) throw; // Unexpected exception code. Bubble it up to the caller. } diff --git a/src/mscorlib/src/System/Resources/__HResults.cs b/src/mscorlib/src/System/Resources/__HResults.cs deleted file mode 100644 index 5817161665..0000000000 --- a/src/mscorlib/src/System/Resources/__HResults.cs +++ /dev/null @@ -1,24 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -//============================================================================= -// -// -// -// Purpose: Define HResult constants returned by the Windows Modern Resource Manager -// and consumed by System.Resources.ResourceManager. -// -//===========================================================================*/ -#if FEATURE_APPX -namespace System.Resources -{ - using System; - // Only static data no need to serialize - internal static class __HResults - { - // From WinError.h - public const int ERROR_MRM_MAP_NOT_FOUND = unchecked((int)0x80073B1F); - } -} -#endif diff --git a/src/mscorlib/src/System/Runtime/CompilerServices/RuntimeWrappedException.cs b/src/mscorlib/src/System/Runtime/CompilerServices/RuntimeWrappedException.cs index df52f301e4..4a73e43136 100644 --- a/src/mscorlib/src/System/Runtime/CompilerServices/RuntimeWrappedException.cs +++ b/src/mscorlib/src/System/Runtime/CompilerServices/RuntimeWrappedException.cs @@ -22,7 +22,7 @@ namespace System.Runtime.CompilerServices private RuntimeWrappedException(Object thrownObject) : base(SR.RuntimeWrappedException) { - HResult = System.__HResults.COR_E_RUNTIMEWRAPPED; + HResult = System.HResults.COR_E_RUNTIMEWRAPPED; m_wrappedException = thrownObject; } diff --git a/src/mscorlib/src/System/Runtime/InteropServices/COMException.cs b/src/mscorlib/src/System/Runtime/InteropServices/COMException.cs index 8ee10ed349..6d9927fd97 100644 --- a/src/mscorlib/src/System/Runtime/InteropServices/COMException.cs +++ b/src/mscorlib/src/System/Runtime/InteropServices/COMException.cs @@ -27,19 +27,19 @@ namespace System.Runtime.InteropServices public COMException() : base(SR.Arg_COMException) { - HResult = __HResults.E_FAIL; + HResult = HResults.E_FAIL; } public COMException(String message) : base(message) { - HResult = __HResults.E_FAIL; + HResult = HResults.E_FAIL; } public COMException(String message, Exception inner) : base(message, inner) { - HResult = __HResults.E_FAIL; + HResult = HResults.E_FAIL; } public COMException(String message, int errorCode) diff --git a/src/mscorlib/src/System/Runtime/InteropServices/InvalidComObjectException.cs b/src/mscorlib/src/System/Runtime/InteropServices/InvalidComObjectException.cs index bf89df94bb..c3ce68df4b 100644 --- a/src/mscorlib/src/System/Runtime/InteropServices/InvalidComObjectException.cs +++ b/src/mscorlib/src/System/Runtime/InteropServices/InvalidComObjectException.cs @@ -22,19 +22,19 @@ namespace System.Runtime.InteropServices public InvalidComObjectException() : base(SR.Arg_InvalidComObjectException) { - HResult = __HResults.COR_E_INVALIDCOMOBJECT; + HResult = HResults.COR_E_INVALIDCOMOBJECT; } public InvalidComObjectException(String message) : base(message) { - HResult = __HResults.COR_E_INVALIDCOMOBJECT; + HResult = HResults.COR_E_INVALIDCOMOBJECT; } public InvalidComObjectException(String message, Exception inner) : base(message, inner) { - HResult = __HResults.COR_E_INVALIDCOMOBJECT; + HResult = HResults.COR_E_INVALIDCOMOBJECT; } protected InvalidComObjectException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/src/mscorlib/src/System/Runtime/InteropServices/InvalidOleVariantTypeException.cs b/src/mscorlib/src/System/Runtime/InteropServices/InvalidOleVariantTypeException.cs index 412853920e..f61010cda3 100644 --- a/src/mscorlib/src/System/Runtime/InteropServices/InvalidOleVariantTypeException.cs +++ b/src/mscorlib/src/System/Runtime/InteropServices/InvalidOleVariantTypeException.cs @@ -21,19 +21,19 @@ namespace System.Runtime.InteropServices public InvalidOleVariantTypeException() : base(SR.Arg_InvalidOleVariantTypeException) { - HResult = __HResults.COR_E_INVALIDOLEVARIANTTYPE; + HResult = HResults.COR_E_INVALIDOLEVARIANTTYPE; } public InvalidOleVariantTypeException(String message) : base(message) { - HResult = __HResults.COR_E_INVALIDOLEVARIANTTYPE; + HResult = HResults.COR_E_INVALIDOLEVARIANTTYPE; } public InvalidOleVariantTypeException(String message, Exception inner) : base(message, inner) { - HResult = __HResults.COR_E_INVALIDOLEVARIANTTYPE; + HResult = HResults.COR_E_INVALIDOLEVARIANTTYPE; } protected InvalidOleVariantTypeException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/src/mscorlib/src/System/Runtime/InteropServices/MarshalDirectiveException.cs b/src/mscorlib/src/System/Runtime/InteropServices/MarshalDirectiveException.cs index 75b291af30..48e2dcf411 100644 --- a/src/mscorlib/src/System/Runtime/InteropServices/MarshalDirectiveException.cs +++ b/src/mscorlib/src/System/Runtime/InteropServices/MarshalDirectiveException.cs @@ -22,19 +22,19 @@ namespace System.Runtime.InteropServices public MarshalDirectiveException() : base(SR.Arg_MarshalDirectiveException) { - HResult = __HResults.COR_E_MARSHALDIRECTIVE; + HResult = HResults.COR_E_MARSHALDIRECTIVE; } public MarshalDirectiveException(String message) : base(message) { - HResult = __HResults.COR_E_MARSHALDIRECTIVE; + HResult = HResults.COR_E_MARSHALDIRECTIVE; } public MarshalDirectiveException(String message, Exception inner) : base(message, inner) { - HResult = __HResults.COR_E_MARSHALDIRECTIVE; + HResult = HResults.COR_E_MARSHALDIRECTIVE; } protected MarshalDirectiveException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/src/mscorlib/src/System/Runtime/InteropServices/SEHException.cs b/src/mscorlib/src/System/Runtime/InteropServices/SEHException.cs index d61e79757c..832c4d289e 100644 --- a/src/mscorlib/src/System/Runtime/InteropServices/SEHException.cs +++ b/src/mscorlib/src/System/Runtime/InteropServices/SEHException.cs @@ -24,19 +24,19 @@ namespace System.Runtime.InteropServices public SEHException() : base() { - HResult = __HResults.E_FAIL; + HResult = HResults.E_FAIL; } public SEHException(String message) : base(message) { - HResult = __HResults.E_FAIL; + HResult = HResults.E_FAIL; } public SEHException(String message, Exception inner) : base(message, inner) { - HResult = __HResults.E_FAIL; + HResult = HResults.E_FAIL; } protected SEHException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/src/mscorlib/src/System/Runtime/InteropServices/SafeArrayRankMismatchException.cs b/src/mscorlib/src/System/Runtime/InteropServices/SafeArrayRankMismatchException.cs index 9df858f0b1..7109b4fe51 100644 --- a/src/mscorlib/src/System/Runtime/InteropServices/SafeArrayRankMismatchException.cs +++ b/src/mscorlib/src/System/Runtime/InteropServices/SafeArrayRankMismatchException.cs @@ -21,19 +21,19 @@ namespace System.Runtime.InteropServices public SafeArrayRankMismatchException() : base(SR.Arg_SafeArrayRankMismatchException) { - HResult = __HResults.COR_E_SAFEARRAYRANKMISMATCH; + HResult = HResults.COR_E_SAFEARRAYRANKMISMATCH; } public SafeArrayRankMismatchException(String message) : base(message) { - HResult = __HResults.COR_E_SAFEARRAYRANKMISMATCH; + HResult = HResults.COR_E_SAFEARRAYRANKMISMATCH; } public SafeArrayRankMismatchException(String message, Exception inner) : base(message, inner) { - HResult = __HResults.COR_E_SAFEARRAYRANKMISMATCH; + HResult = HResults.COR_E_SAFEARRAYRANKMISMATCH; } protected SafeArrayRankMismatchException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/src/mscorlib/src/System/Runtime/InteropServices/SafeArrayTypeMismatchException.cs b/src/mscorlib/src/System/Runtime/InteropServices/SafeArrayTypeMismatchException.cs index 4b03691e82..13a6cf62a8 100644 --- a/src/mscorlib/src/System/Runtime/InteropServices/SafeArrayTypeMismatchException.cs +++ b/src/mscorlib/src/System/Runtime/InteropServices/SafeArrayTypeMismatchException.cs @@ -22,19 +22,19 @@ namespace System.Runtime.InteropServices public SafeArrayTypeMismatchException() : base(SR.Arg_SafeArrayTypeMismatchException) { - HResult = __HResults.COR_E_SAFEARRAYTYPEMISMATCH; + HResult = HResults.COR_E_SAFEARRAYTYPEMISMATCH; } public SafeArrayTypeMismatchException(String message) : base(message) { - HResult = __HResults.COR_E_SAFEARRAYTYPEMISMATCH; + HResult = HResults.COR_E_SAFEARRAYTYPEMISMATCH; } public SafeArrayTypeMismatchException(String message, Exception inner) : base(message, inner) { - HResult = __HResults.COR_E_SAFEARRAYTYPEMISMATCH; + HResult = HResults.COR_E_SAFEARRAYTYPEMISMATCH; } protected SafeArrayTypeMismatchException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/BindableVectorToListAdapter.cs b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/BindableVectorToListAdapter.cs index 539b8020b8..f0be957f8c 100644 --- a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/BindableVectorToListAdapter.cs +++ b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/BindableVectorToListAdapter.cs @@ -167,7 +167,7 @@ namespace System.Runtime.InteropServices.WindowsRuntime } catch (Exception ex) { - if (__HResults.E_BOUNDS == ex._HResult) + if (HResults.E_BOUNDS == ex._HResult) throw new ArgumentOutOfRangeException(nameof(index)); throw; @@ -185,7 +185,7 @@ namespace System.Runtime.InteropServices.WindowsRuntime } catch (Exception ex) { - if (__HResults.E_BOUNDS == ex._HResult) + if (HResults.E_BOUNDS == ex._HResult) throw new ArgumentOutOfRangeException(nameof(index)); throw; @@ -203,7 +203,7 @@ namespace System.Runtime.InteropServices.WindowsRuntime } catch (Exception ex) { - if (__HResults.E_BOUNDS == ex._HResult) + if (HResults.E_BOUNDS == ex._HResult) throw new ArgumentOutOfRangeException(nameof(index)); throw; @@ -221,7 +221,7 @@ namespace System.Runtime.InteropServices.WindowsRuntime } catch (Exception ex) { - if (__HResults.E_BOUNDS == ex._HResult) + if (HResults.E_BOUNDS == ex._HResult) throw new ArgumentOutOfRangeException(nameof(index)); throw; diff --git a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/CLRIPropertyValueImpl.cs b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/CLRIPropertyValueImpl.cs index aa0f3ba056..75774caae2 100644 --- a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/CLRIPropertyValueImpl.cs +++ b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/CLRIPropertyValueImpl.cs @@ -134,7 +134,7 @@ namespace System.Runtime.InteropServices.WindowsRuntime public char GetChar16() { if (this.Type != PropertyType.Char16) - throw new InvalidCastException(SR.Format(SR.InvalidCast_WinRTIPropertyValueElement, this.Type, "Char16"), __HResults.TYPE_E_TYPEMISMATCH); + throw new InvalidCastException(SR.Format(SR.InvalidCast_WinRTIPropertyValueElement, this.Type, "Char16"), HResults.TYPE_E_TYPEMISMATCH); Contract.EndContractBlock(); return (char)_data; } @@ -143,7 +143,7 @@ namespace System.Runtime.InteropServices.WindowsRuntime public Boolean GetBoolean() { if (this.Type != PropertyType.Boolean) - throw new InvalidCastException(SR.Format(SR.InvalidCast_WinRTIPropertyValueElement, this.Type, "Boolean"), __HResults.TYPE_E_TYPEMISMATCH); + throw new InvalidCastException(SR.Format(SR.InvalidCast_WinRTIPropertyValueElement, this.Type, "Boolean"), HResults.TYPE_E_TYPEMISMATCH); Contract.EndContractBlock(); return (bool)_data; } @@ -166,7 +166,7 @@ namespace System.Runtime.InteropServices.WindowsRuntime public DateTimeOffset GetDateTime() { if (this.Type != PropertyType.DateTime) - throw new InvalidCastException(SR.Format(SR.InvalidCast_WinRTIPropertyValueElement, this.Type, "DateTime"), __HResults.TYPE_E_TYPEMISMATCH); + throw new InvalidCastException(SR.Format(SR.InvalidCast_WinRTIPropertyValueElement, this.Type, "DateTime"), HResults.TYPE_E_TYPEMISMATCH); Contract.EndContractBlock(); return (DateTimeOffset)_data; } @@ -175,7 +175,7 @@ namespace System.Runtime.InteropServices.WindowsRuntime public TimeSpan GetTimeSpan() { if (this.Type != PropertyType.TimeSpan) - throw new InvalidCastException(SR.Format(SR.InvalidCast_WinRTIPropertyValueElement, this.Type, "TimeSpan"), __HResults.TYPE_E_TYPEMISMATCH); + throw new InvalidCastException(SR.Format(SR.InvalidCast_WinRTIPropertyValueElement, this.Type, "TimeSpan"), HResults.TYPE_E_TYPEMISMATCH); Contract.EndContractBlock(); return (TimeSpan)_data; } @@ -184,7 +184,7 @@ namespace System.Runtime.InteropServices.WindowsRuntime public Point GetPoint() { if (this.Type != PropertyType.Point) - throw new InvalidCastException(SR.Format(SR.InvalidCast_WinRTIPropertyValueElement, this.Type, "Point"), __HResults.TYPE_E_TYPEMISMATCH); + throw new InvalidCastException(SR.Format(SR.InvalidCast_WinRTIPropertyValueElement, this.Type, "Point"), HResults.TYPE_E_TYPEMISMATCH); Contract.EndContractBlock(); return Unbox(IReferenceFactory.s_pointType); @@ -194,7 +194,7 @@ namespace System.Runtime.InteropServices.WindowsRuntime public Size GetSize() { if (this.Type != PropertyType.Size) - throw new InvalidCastException(SR.Format(SR.InvalidCast_WinRTIPropertyValueElement, this.Type, "Size"), __HResults.TYPE_E_TYPEMISMATCH); + throw new InvalidCastException(SR.Format(SR.InvalidCast_WinRTIPropertyValueElement, this.Type, "Size"), HResults.TYPE_E_TYPEMISMATCH); Contract.EndContractBlock(); return Unbox(IReferenceFactory.s_sizeType); @@ -204,7 +204,7 @@ namespace System.Runtime.InteropServices.WindowsRuntime public Rect GetRect() { if (this.Type != PropertyType.Rect) - throw new InvalidCastException(SR.Format(SR.InvalidCast_WinRTIPropertyValueElement, this.Type, "Rect"), __HResults.TYPE_E_TYPEMISMATCH); + throw new InvalidCastException(SR.Format(SR.InvalidCast_WinRTIPropertyValueElement, this.Type, "Rect"), HResults.TYPE_E_TYPEMISMATCH); Contract.EndContractBlock(); return Unbox(IReferenceFactory.s_rectType); @@ -268,7 +268,7 @@ namespace System.Runtime.InteropServices.WindowsRuntime public char[] GetChar16Array() { if (this.Type != PropertyType.Char16Array) - throw new InvalidCastException(SR.Format(SR.InvalidCast_WinRTIPropertyValueElement, this.Type, "Char16[]"), __HResults.TYPE_E_TYPEMISMATCH); + throw new InvalidCastException(SR.Format(SR.InvalidCast_WinRTIPropertyValueElement, this.Type, "Char16[]"), HResults.TYPE_E_TYPEMISMATCH); Contract.EndContractBlock(); return (char[])_data; } @@ -277,7 +277,7 @@ namespace System.Runtime.InteropServices.WindowsRuntime public Boolean[] GetBooleanArray() { if (this.Type != PropertyType.BooleanArray) - throw new InvalidCastException(SR.Format(SR.InvalidCast_WinRTIPropertyValueElement, this.Type, "Boolean[]"), __HResults.TYPE_E_TYPEMISMATCH); + throw new InvalidCastException(SR.Format(SR.InvalidCast_WinRTIPropertyValueElement, this.Type, "Boolean[]"), HResults.TYPE_E_TYPEMISMATCH); Contract.EndContractBlock(); return (bool[])_data; } @@ -292,7 +292,7 @@ namespace System.Runtime.InteropServices.WindowsRuntime public Object[] GetInspectableArray() { if (this.Type != PropertyType.InspectableArray) - throw new InvalidCastException(SR.Format(SR.InvalidCast_WinRTIPropertyValueElement, this.Type, "Inspectable[]"), __HResults.TYPE_E_TYPEMISMATCH); + throw new InvalidCastException(SR.Format(SR.InvalidCast_WinRTIPropertyValueElement, this.Type, "Inspectable[]"), HResults.TYPE_E_TYPEMISMATCH); Contract.EndContractBlock(); return (Object[])_data; } @@ -307,7 +307,7 @@ namespace System.Runtime.InteropServices.WindowsRuntime public DateTimeOffset[] GetDateTimeArray() { if (this.Type != PropertyType.DateTimeArray) - throw new InvalidCastException(SR.Format(SR.InvalidCast_WinRTIPropertyValueElement, this.Type, "DateTimeOffset[]"), __HResults.TYPE_E_TYPEMISMATCH); + throw new InvalidCastException(SR.Format(SR.InvalidCast_WinRTIPropertyValueElement, this.Type, "DateTimeOffset[]"), HResults.TYPE_E_TYPEMISMATCH); Contract.EndContractBlock(); return (DateTimeOffset[])_data; } @@ -316,7 +316,7 @@ namespace System.Runtime.InteropServices.WindowsRuntime public TimeSpan[] GetTimeSpanArray() { if (this.Type != PropertyType.TimeSpanArray) - throw new InvalidCastException(SR.Format(SR.InvalidCast_WinRTIPropertyValueElement, this.Type, "TimeSpan[]"), __HResults.TYPE_E_TYPEMISMATCH); + throw new InvalidCastException(SR.Format(SR.InvalidCast_WinRTIPropertyValueElement, this.Type, "TimeSpan[]"), HResults.TYPE_E_TYPEMISMATCH); Contract.EndContractBlock(); return (TimeSpan[])_data; } @@ -325,7 +325,7 @@ namespace System.Runtime.InteropServices.WindowsRuntime public Point[] GetPointArray() { if (this.Type != PropertyType.PointArray) - throw new InvalidCastException(SR.Format(SR.InvalidCast_WinRTIPropertyValueElement, this.Type, "Point[]"), __HResults.TYPE_E_TYPEMISMATCH); + throw new InvalidCastException(SR.Format(SR.InvalidCast_WinRTIPropertyValueElement, this.Type, "Point[]"), HResults.TYPE_E_TYPEMISMATCH); Contract.EndContractBlock(); return UnboxArray(IReferenceFactory.s_pointType); @@ -335,7 +335,7 @@ namespace System.Runtime.InteropServices.WindowsRuntime public Size[] GetSizeArray() { if (this.Type != PropertyType.SizeArray) - throw new InvalidCastException(SR.Format(SR.InvalidCast_WinRTIPropertyValueElement, this.Type, "Size[]"), __HResults.TYPE_E_TYPEMISMATCH); + throw new InvalidCastException(SR.Format(SR.InvalidCast_WinRTIPropertyValueElement, this.Type, "Size[]"), HResults.TYPE_E_TYPEMISMATCH); Contract.EndContractBlock(); @@ -346,7 +346,7 @@ namespace System.Runtime.InteropServices.WindowsRuntime public Rect[] GetRectArray() { if (this.Type != PropertyType.RectArray) - throw new InvalidCastException(SR.Format(SR.InvalidCast_WinRTIPropertyValueElement, this.Type, "Rect[]"), __HResults.TYPE_E_TYPEMISMATCH); + throw new InvalidCastException(SR.Format(SR.InvalidCast_WinRTIPropertyValueElement, this.Type, "Rect[]"), HResults.TYPE_E_TYPEMISMATCH); Contract.EndContractBlock(); return UnboxArray(IReferenceFactory.s_rectType); @@ -364,7 +364,7 @@ namespace System.Runtime.InteropServices.WindowsRuntime Array dataArray = _data as Array; if (dataArray == null) { - throw new InvalidCastException(SR.Format(SR.InvalidCast_WinRTIPropertyValueElement, this.Type, typeof (T).MakeArrayType().Name), __HResults.TYPE_E_TYPEMISMATCH); + throw new InvalidCastException(SR.Format(SR.InvalidCast_WinRTIPropertyValueElement, this.Type, typeof (T).MakeArrayType().Name), HResults.TYPE_E_TYPEMISMATCH); } // Array types are 1024 larger than their equivilent scalar counterpart @@ -408,7 +408,7 @@ namespace System.Runtime.InteropServices.WindowsRuntime // should not attempt coersion, even if the underlying value is technically convertable if (!IsCoercable(type, value) && type != PropertyType.Inspectable) { - throw new InvalidCastException(SR.Format(SR.InvalidCast_WinRTIPropertyValueElement, type, typeof (T).Name), __HResults.TYPE_E_TYPEMISMATCH); + throw new InvalidCastException(SR.Format(SR.InvalidCast_WinRTIPropertyValueElement, type, typeof (T).Name), HResults.TYPE_E_TYPEMISMATCH); } try @@ -438,15 +438,15 @@ namespace System.Runtime.InteropServices.WindowsRuntime } catch (FormatException) { - throw new InvalidCastException(SR.Format(SR.InvalidCast_WinRTIPropertyValueElement, type, typeof (T).Name), __HResults.TYPE_E_TYPEMISMATCH); + throw new InvalidCastException(SR.Format(SR.InvalidCast_WinRTIPropertyValueElement, type, typeof (T).Name), HResults.TYPE_E_TYPEMISMATCH); } catch (InvalidCastException) { - throw new InvalidCastException(SR.Format(SR.InvalidCast_WinRTIPropertyValueElement, type, typeof (T).Name), __HResults.TYPE_E_TYPEMISMATCH); + throw new InvalidCastException(SR.Format(SR.InvalidCast_WinRTIPropertyValueElement, type, typeof (T).Name), HResults.TYPE_E_TYPEMISMATCH); } catch (OverflowException) { - throw new InvalidCastException(SR.Format(SR.InvalidCast_WinRTIPropertyValueCoersion, type, value, typeof (T).Name), __HResults.DISP_E_OVERFLOW); + throw new InvalidCastException(SR.Format(SR.InvalidCast_WinRTIPropertyValueCoersion, type, value, typeof (T).Name), HResults.DISP_E_OVERFLOW); } // If the property type is IInspectable, and we have a nested IPropertyValue, then we need @@ -497,7 +497,7 @@ namespace System.Runtime.InteropServices.WindowsRuntime } // Otherwise, this is an invalid coersion - throw new InvalidCastException(SR.Format(SR.InvalidCast_WinRTIPropertyValueElement, type, typeof (T).Name), __HResults.TYPE_E_TYPEMISMATCH); + throw new InvalidCastException(SR.Format(SR.InvalidCast_WinRTIPropertyValueElement, type, typeof (T).Name), HResults.TYPE_E_TYPEMISMATCH); } private static bool IsCoercable(PropertyType type, object data) @@ -539,7 +539,7 @@ namespace System.Runtime.InteropServices.WindowsRuntime if (_data.GetType() != expectedBoxedType) { - throw new InvalidCastException(SR.Format(SR.InvalidCast_WinRTIPropertyValueElement, _data.GetType(), expectedBoxedType.Name), __HResults.TYPE_E_TYPEMISMATCH); + throw new InvalidCastException(SR.Format(SR.InvalidCast_WinRTIPropertyValueElement, _data.GetType(), expectedBoxedType.Name), HResults.TYPE_E_TYPEMISMATCH); } T unboxed = new T(); @@ -563,7 +563,7 @@ namespace System.Runtime.InteropServices.WindowsRuntime Array dataArray = _data as Array; if (dataArray == null || _data.GetType().GetElementType() != expectedArrayElementType) { - throw new InvalidCastException(SR.Format(SR.InvalidCast_WinRTIPropertyValueElement, _data.GetType(), expectedArrayElementType.MakeArrayType().Name), __HResults.TYPE_E_TYPEMISMATCH); + throw new InvalidCastException(SR.Format(SR.InvalidCast_WinRTIPropertyValueElement, _data.GetType(), expectedArrayElementType.MakeArrayType().Name), HResults.TYPE_E_TYPEMISMATCH); } T[] converted = new T[dataArray.Length]; diff --git a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/ConstantSplittableMap.cs b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/ConstantSplittableMap.cs index 0ed0bb3f7b..5a4a5e8a7b 100644 --- a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/ConstantSplittableMap.cs +++ b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/ConstantSplittableMap.cs @@ -102,7 +102,7 @@ namespace System.Runtime.InteropServices.WindowsRuntime if (!found) { Exception e = new KeyNotFoundException(SR.Arg_KeyNotFound); - e.SetErrorCode(__HResults.E_BOUNDS); + e.SetErrorCode(HResults.E_BOUNDS); throw e; } diff --git a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/DictionaryToMapAdapter.cs b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/DictionaryToMapAdapter.cs index bb54d49b60..3a1f8c4f4a 100644 --- a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/DictionaryToMapAdapter.cs +++ b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/DictionaryToMapAdapter.cs @@ -42,7 +42,7 @@ namespace System.Runtime.InteropServices.WindowsRuntime if (!keyFound) { Exception e = new KeyNotFoundException(SR.Arg_KeyNotFound); - e.SetErrorCode(__HResults.E_BOUNDS); + e.SetErrorCode(HResults.E_BOUNDS); throw e; } @@ -97,7 +97,7 @@ namespace System.Runtime.InteropServices.WindowsRuntime if (!removed) { Exception e = new KeyNotFoundException(SR.Arg_KeyNotFound); - e.SetErrorCode(__HResults.E_BOUNDS); + e.SetErrorCode(HResults.E_BOUNDS); throw e; } } diff --git a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/EnumeratorToIteratorAdapter.cs b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/EnumeratorToIteratorAdapter.cs index 75b8480eeb..70a9da6974 100644 --- a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/EnumeratorToIteratorAdapter.cs +++ b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/EnumeratorToIteratorAdapter.cs @@ -92,7 +92,7 @@ namespace System.Runtime.InteropServices.WindowsRuntime if (!m_hasCurrent) { - throw WindowsRuntimeMarshal.GetExceptionForHR(__HResults.E_BOUNDS, null); + throw WindowsRuntimeMarshal.GetExceptionForHR(HResults.E_BOUNDS, null); } return m_enumerator.Current; @@ -131,7 +131,7 @@ namespace System.Runtime.InteropServices.WindowsRuntime } catch (InvalidOperationException e) { - throw WindowsRuntimeMarshal.GetExceptionForHR(__HResults.E_CHANGED_STATE, e); + throw WindowsRuntimeMarshal.GetExceptionForHR(HResults.E_CHANGED_STATE, e); } return m_hasCurrent; diff --git a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/IMapViewToIReadOnlyDictionaryAdapter.cs b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/IMapViewToIReadOnlyDictionaryAdapter.cs index 0900012338..04958c3bd5 100644 --- a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/IMapViewToIReadOnlyDictionaryAdapter.cs +++ b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/IMapViewToIReadOnlyDictionaryAdapter.cs @@ -92,7 +92,7 @@ namespace System.Runtime.InteropServices.WindowsRuntime } catch (Exception ex) // Still may hit this case due to a race condition { - if (__HResults.E_BOUNDS == ex._HResult) + if (HResults.E_BOUNDS == ex._HResult) { value = default(V); return false; @@ -113,7 +113,7 @@ namespace System.Runtime.InteropServices.WindowsRuntime } catch (Exception ex) { - if (__HResults.E_BOUNDS == ex._HResult) + if (HResults.E_BOUNDS == ex._HResult) throw new KeyNotFoundException(SR.Arg_KeyNotFound); throw; } diff --git a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/IReadOnlyDictionaryToIMapViewAdapter.cs b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/IReadOnlyDictionaryToIMapViewAdapter.cs index 73daf876cd..eaf5f471de 100644 --- a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/IReadOnlyDictionaryToIMapViewAdapter.cs +++ b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/IReadOnlyDictionaryToIMapViewAdapter.cs @@ -41,7 +41,7 @@ namespace System.Runtime.InteropServices.WindowsRuntime if (!keyFound) { Exception e = new KeyNotFoundException(SR.Arg_KeyNotFound); - e.SetErrorCode(__HResults.E_BOUNDS); + e.SetErrorCode(HResults.E_BOUNDS); throw e; } diff --git a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/IReadOnlyListToIVectorViewAdapter.cs b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/IReadOnlyListToIVectorViewAdapter.cs index 5dce7dfc8d..9b87bee372 100644 --- a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/IReadOnlyListToIVectorViewAdapter.cs +++ b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/IReadOnlyListToIVectorViewAdapter.cs @@ -43,7 +43,7 @@ namespace System.Runtime.InteropServices.WindowsRuntime } catch (ArgumentOutOfRangeException ex) { - ex.SetErrorCode(__HResults.E_BOUNDS); + ex.SetErrorCode(HResults.E_BOUNDS); throw; } } @@ -127,7 +127,7 @@ namespace System.Runtime.InteropServices.WindowsRuntime if (((uint)Int32.MaxValue) <= index || index >= (uint)listCapacity) { Exception e = new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_IndexLargerThanMaxValue); - e.SetErrorCode(__HResults.E_BOUNDS); + e.SetErrorCode(HResults.E_BOUNDS); throw e; } } diff --git a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/IVectorViewToIReadOnlyListAdapter.cs b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/IVectorViewToIReadOnlyListAdapter.cs index 76b0fff00d..5090323572 100644 --- a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/IVectorViewToIReadOnlyListAdapter.cs +++ b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/IVectorViewToIReadOnlyListAdapter.cs @@ -50,7 +50,7 @@ namespace System.Runtime.InteropServices.WindowsRuntime } catch (Exception ex) { - if (__HResults.E_BOUNDS == ex._HResult) + if (HResults.E_BOUNDS == ex._HResult) throw new ArgumentOutOfRangeException(nameof(index)); throw; diff --git a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/IteratorToEnumeratorAdapter.cs b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/IteratorToEnumeratorAdapter.cs index 417476dbbe..ccef9d92bf 100644 --- a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/IteratorToEnumeratorAdapter.cs +++ b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/IteratorToEnumeratorAdapter.cs @@ -182,7 +182,7 @@ namespace System.Runtime.InteropServices.WindowsRuntime catch (Exception e) { // Translate E_CHANGED_STATE into an InvalidOperationException for an updated enumeration - if (Marshal.GetHRForException(e) == __HResults.E_CHANGED_STATE) + if (Marshal.GetHRForException(e) == HResults.E_CHANGED_STATE) { ThrowHelper.ThrowInvalidOperationException_InvalidOperation_EnumFailedVersion(); } diff --git a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/ListToBindableVectorAdapter.cs b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/ListToBindableVectorAdapter.cs index 5f12322ea8..09fdc3b49e 100644 --- a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/ListToBindableVectorAdapter.cs +++ b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/ListToBindableVectorAdapter.cs @@ -44,7 +44,7 @@ namespace System.Runtime.InteropServices.WindowsRuntime } catch (ArgumentOutOfRangeException ex) { - throw WindowsRuntimeMarshal.GetExceptionForHR(__HResults.E_BOUNDS, ex, "ArgumentOutOfRange_IndexOutOfRange"); + throw WindowsRuntimeMarshal.GetExceptionForHR(HResults.E_BOUNDS, ex, "ArgumentOutOfRange_IndexOutOfRange"); } } @@ -90,7 +90,7 @@ namespace System.Runtime.InteropServices.WindowsRuntime } catch (ArgumentOutOfRangeException ex) { - throw WindowsRuntimeMarshal.GetExceptionForHR(__HResults.E_BOUNDS, ex, "ArgumentOutOfRange_IndexOutOfRange"); + throw WindowsRuntimeMarshal.GetExceptionForHR(HResults.E_BOUNDS, ex, "ArgumentOutOfRange_IndexOutOfRange"); } } @@ -110,7 +110,7 @@ namespace System.Runtime.InteropServices.WindowsRuntime catch (ArgumentOutOfRangeException ex) { // Change error code to match what WinRT expects - ex.SetErrorCode(__HResults.E_BOUNDS); + ex.SetErrorCode(HResults.E_BOUNDS); throw; } } @@ -128,7 +128,7 @@ namespace System.Runtime.InteropServices.WindowsRuntime catch (ArgumentOutOfRangeException ex) { // Change error code to match what WinRT expects - ex.SetErrorCode(__HResults.E_BOUNDS); + ex.SetErrorCode(HResults.E_BOUNDS); throw; } } @@ -147,7 +147,7 @@ namespace System.Runtime.InteropServices.WindowsRuntime if (_this.Count == 0) { Exception e = new InvalidOperationException(SR.InvalidOperation_CannotRemoveLastFromEmptyCollection); - e.SetErrorCode(__HResults.E_BOUNDS); + e.SetErrorCode(HResults.E_BOUNDS); throw e; } @@ -171,7 +171,7 @@ namespace System.Runtime.InteropServices.WindowsRuntime if (((uint)Int32.MaxValue) <= index || index >= (uint)listCapacity) { Exception e = new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_IndexLargerThanMaxValue); - e.SetErrorCode(__HResults.E_BOUNDS); + e.SetErrorCode(HResults.E_BOUNDS); throw e; } } diff --git a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/ListToBindableVectorViewAdapter.cs b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/ListToBindableVectorViewAdapter.cs index fc02bedfa6..75c9b9d086 100644 --- a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/ListToBindableVectorViewAdapter.cs +++ b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/ListToBindableVectorViewAdapter.cs @@ -39,7 +39,7 @@ namespace System.Runtime.InteropServices.WindowsRuntime if (((uint)Int32.MaxValue) <= index || index >= (uint)listCapacity) { Exception e = new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_IndexLargerThanMaxValue); - e.SetErrorCode(__HResults.E_BOUNDS); + e.SetErrorCode(HResults.E_BOUNDS); throw e; } } @@ -64,7 +64,7 @@ namespace System.Runtime.InteropServices.WindowsRuntime } catch (ArgumentOutOfRangeException ex) { - throw WindowsRuntimeMarshal.GetExceptionForHR(__HResults.E_BOUNDS, ex, "ArgumentOutOfRange_IndexOutOfRange"); + throw WindowsRuntimeMarshal.GetExceptionForHR(HResults.E_BOUNDS, ex, "ArgumentOutOfRange_IndexOutOfRange"); } } diff --git a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/ListToVectorAdapter.cs b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/ListToVectorAdapter.cs index 87330e2559..03c48b546b 100644 --- a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/ListToVectorAdapter.cs +++ b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/ListToVectorAdapter.cs @@ -44,7 +44,7 @@ namespace System.Runtime.InteropServices.WindowsRuntime } catch (ArgumentOutOfRangeException ex) { - throw WindowsRuntimeMarshal.GetExceptionForHR(__HResults.E_BOUNDS, ex, "ArgumentOutOfRange_IndexOutOfRange"); + throw WindowsRuntimeMarshal.GetExceptionForHR(HResults.E_BOUNDS, ex, "ArgumentOutOfRange_IndexOutOfRange"); } } @@ -99,7 +99,7 @@ namespace System.Runtime.InteropServices.WindowsRuntime } catch (ArgumentOutOfRangeException ex) { - throw WindowsRuntimeMarshal.GetExceptionForHR(__HResults.E_BOUNDS, ex, "ArgumentOutOfRange_IndexOutOfRange"); + throw WindowsRuntimeMarshal.GetExceptionForHR(HResults.E_BOUNDS, ex, "ArgumentOutOfRange_IndexOutOfRange"); } } @@ -119,7 +119,7 @@ namespace System.Runtime.InteropServices.WindowsRuntime catch (ArgumentOutOfRangeException ex) { // Change error code to match what WinRT expects - ex.SetErrorCode(__HResults.E_BOUNDS); + ex.SetErrorCode(HResults.E_BOUNDS); throw; } } @@ -137,7 +137,7 @@ namespace System.Runtime.InteropServices.WindowsRuntime catch (ArgumentOutOfRangeException ex) { // Change error code to match what WinRT expects - ex.SetErrorCode(__HResults.E_BOUNDS); + ex.SetErrorCode(HResults.E_BOUNDS); throw; } } @@ -156,7 +156,7 @@ namespace System.Runtime.InteropServices.WindowsRuntime if (_this.Count == 0) { Exception e = new InvalidOperationException(SR.InvalidOperation_CannotRemoveLastFromEmptyCollection); - e.SetErrorCode(__HResults.E_BOUNDS); + e.SetErrorCode(HResults.E_BOUNDS); throw e; } @@ -202,7 +202,7 @@ namespace System.Runtime.InteropServices.WindowsRuntime if (((uint)Int32.MaxValue) <= index || index >= (uint)listCapacity) { Exception e = new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_IndexLargerThanMaxValue); - e.SetErrorCode(__HResults.E_BOUNDS); + e.SetErrorCode(HResults.E_BOUNDS); throw e; } } diff --git a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/MapToDictionaryAdapter.cs b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/MapToDictionaryAdapter.cs index 224a266b07..13d1aeb8bc 100644 --- a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/MapToDictionaryAdapter.cs +++ b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/MapToDictionaryAdapter.cs @@ -113,7 +113,7 @@ namespace System.Runtime.InteropServices.WindowsRuntime } catch (Exception ex) { - if (__HResults.E_BOUNDS == ex._HResult) + if (HResults.E_BOUNDS == ex._HResult) return false; throw; @@ -157,7 +157,7 @@ namespace System.Runtime.InteropServices.WindowsRuntime } catch (Exception ex) { - if (__HResults.E_BOUNDS == ex._HResult) + if (HResults.E_BOUNDS == ex._HResult) throw new KeyNotFoundException(SR.Arg_KeyNotFound); throw; } diff --git a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/VectorToListAdapter.cs b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/VectorToListAdapter.cs index 56e62a25e7..90381f6be2 100644 --- a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/VectorToListAdapter.cs +++ b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/VectorToListAdapter.cs @@ -102,7 +102,7 @@ namespace System.Runtime.InteropServices.WindowsRuntime } catch (Exception ex) { - if (__HResults.E_BOUNDS == ex._HResult) + if (HResults.E_BOUNDS == ex._HResult) throw new ArgumentOutOfRangeException(nameof(index)); throw; @@ -120,7 +120,7 @@ namespace System.Runtime.InteropServices.WindowsRuntime } catch (Exception ex) { - if (__HResults.E_BOUNDS == ex._HResult) + if (HResults.E_BOUNDS == ex._HResult) throw new ArgumentOutOfRangeException(nameof(index)); throw; @@ -138,7 +138,7 @@ namespace System.Runtime.InteropServices.WindowsRuntime } catch (Exception ex) { - if (__HResults.E_BOUNDS == ex._HResult) + if (HResults.E_BOUNDS == ex._HResult) throw new ArgumentOutOfRangeException(nameof(index)); throw; @@ -156,7 +156,7 @@ namespace System.Runtime.InteropServices.WindowsRuntime } catch (Exception ex) { - if (__HResults.E_BOUNDS == ex._HResult) + if (HResults.E_BOUNDS == ex._HResult) throw new ArgumentOutOfRangeException(nameof(index)); throw; diff --git a/src/mscorlib/src/System/Threading/ClrThreadPoolBoundHandle.Windows.cs b/src/mscorlib/src/System/Threading/ClrThreadPoolBoundHandle.Windows.cs index 21c1c5f4a4..a40661c1b6 100644 --- a/src/mscorlib/src/System/Threading/ClrThreadPoolBoundHandle.Windows.cs +++ b/src/mscorlib/src/System/Threading/ClrThreadPoolBoundHandle.Windows.cs @@ -2,6 +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; @@ -27,10 +28,10 @@ namespace System.Threading // We do not let either of these leak and convert them to ArgumentException to // indicate that the specified handles are invalid. - if (ex.HResult == System.HResults.E_HANDLE) // Bad handle + if (ex.HResult == HResults.E_HANDLE) // Bad handle throw new ArgumentException(SR.Argument_InvalidHandle, nameof(handle)); - if (ex.HResult == System.HResults.E_INVALIDARG) // Handle already bound or sync handle + if (ex.HResult == HResults.E_INVALIDARG) // Handle already bound or sync handle throw new ArgumentException(SR.Argument_AlreadyBoundOrSyncHandle, nameof(handle)); throw; diff --git a/src/mscorlib/src/System/Threading/ThreadInterruptedException.cs b/src/mscorlib/src/System/Threading/ThreadInterruptedException.cs index fb72110fdc..db42b77ca4 100644 --- a/src/mscorlib/src/System/Threading/ThreadInterruptedException.cs +++ b/src/mscorlib/src/System/Threading/ThreadInterruptedException.cs @@ -24,19 +24,19 @@ namespace System.Threading public ThreadInterruptedException() : base(GetMessageFromNativeResources(ExceptionMessageKind.ThreadInterrupted)) { - HResult = __HResults.COR_E_THREADINTERRUPTED; + HResult = HResults.COR_E_THREADINTERRUPTED; } public ThreadInterruptedException(String message) : base(message) { - HResult = __HResults.COR_E_THREADINTERRUPTED; + HResult = HResults.COR_E_THREADINTERRUPTED; } public ThreadInterruptedException(String message, Exception innerException) : base(message, innerException) { - HResult = __HResults.COR_E_THREADINTERRUPTED; + HResult = HResults.COR_E_THREADINTERRUPTED; } protected ThreadInterruptedException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/src/mscorlib/src/System/TypeLoadException.cs b/src/mscorlib/src/System/TypeLoadException.cs index 5e748a6c58..840d97702b 100644 --- a/src/mscorlib/src/System/TypeLoadException.cs +++ b/src/mscorlib/src/System/TypeLoadException.cs @@ -27,19 +27,19 @@ namespace System public TypeLoadException() : base(SR.Arg_TypeLoadException) { - HResult = __HResults.COR_E_TYPELOAD; + HResult = HResults.COR_E_TYPELOAD; } public TypeLoadException(String message) : base(message) { - HResult = __HResults.COR_E_TYPELOAD; + HResult = HResults.COR_E_TYPELOAD; } public TypeLoadException(String message, Exception inner) : base(message, inner) { - HResult = __HResults.COR_E_TYPELOAD; + HResult = HResults.COR_E_TYPELOAD; } public override String Message @@ -91,7 +91,7 @@ namespace System int resourceId) : base(null) { - HResult = __HResults.COR_E_TYPELOAD; + HResult = HResults.COR_E_TYPELOAD; ClassName = className; AssemblyName = assemblyName; MessageArg = messageArg; diff --git a/src/mscorlib/src/System/__HResults.cs b/src/mscorlib/src/System/__HResults.cs deleted file mode 100644 index 0592d814ef..0000000000 --- a/src/mscorlib/src/System/__HResults.cs +++ /dev/null @@ -1,131 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -//============================================================================= -// -// -// Purpose: Define HResult constants. Every exception has one of these. -// -// -//===========================================================================*/ -// Note: FACILITY_URT is defined as 0x13 (0x8013xxxx). Within that -// range, 0x1yyy is for Runtime errors (used for Security, Metadata, etc). -// In that subrange, 0x15zz and 0x16zz have been allocated for classlib-type -// HResults. Also note that some of our HResults have to map to certain -// COM HR's, etc. - -// Another arbitrary decision... Feel free to change this, as long as you -// renumber the HResults yourself (and update rexcep.h). -// Reflection will use 0x1600 -> 0x161f. IO will use 0x1620 -> 0x163f. -// Security will use 0x1640 -> 0x165f - -// There are __HResults files in the IO, Remoting, Reflection & -// Security/Util directories as well, so choose your HResults carefully. - -using System; - -namespace System -{ - internal static class __HResults - { - internal const int RO_E_CLOSED = unchecked((int)0x80000013); - internal const int E_BOUNDS = unchecked((int)0x8000000B); - internal const int E_CHANGED_STATE = unchecked((int)0x8000000C); - internal const int E_FAIL = unchecked((int)0x80004005); - internal const int E_POINTER = unchecked((int)0x80004003); - internal const int E_NOTIMPL = unchecked((int)0x80004001); - internal const int REGDB_E_CLASSNOTREG = unchecked((int)0x80040154); - internal const int COR_E_AMBIGUOUSMATCH = unchecked((int)0x8000211D); - internal const int COR_E_APPDOMAINUNLOADED = unchecked((int)0x80131014); - internal const int COR_E_APPLICATION = unchecked((int)0x80131600); - internal const int COR_E_ARGUMENT = unchecked((int)0x80070057); - internal const int COR_E_ARGUMENTOUTOFRANGE = unchecked((int)0x80131502); - internal const int COR_E_ARITHMETIC = unchecked((int)0x80070216); - internal const int COR_E_ARRAYTYPEMISMATCH = unchecked((int)0x80131503); - internal const int COR_E_BADIMAGEFORMAT = unchecked((int)0x8007000B); - internal const int COR_E_BADEXEFORMAT = unchecked((int)0x800700C1); - internal const int COR_E_TYPEUNLOADED = unchecked((int)0x80131013); - internal const int COR_E_CANNOTUNLOADAPPDOMAIN = unchecked((int)0x80131015); - internal const int COR_E_COMEMULATE = unchecked((int)0x80131535); - internal const int COR_E_CONTEXTMARSHAL = unchecked((int)0x80131504); - internal const int COR_E_DATAMISALIGNED = unchecked((int)0x80131541); - internal const int COR_E_TIMEOUT = unchecked((int)0x80131505); - internal const int COR_E_CUSTOMATTRIBUTEFORMAT = unchecked((int)0x80131605); - internal const int COR_E_DIVIDEBYZERO = unchecked((int)0x80020012); // DISP_E_DIVBYZERO - internal const int COR_E_DUPLICATEWAITOBJECT = unchecked((int)0x80131529); - internal const int COR_E_EXCEPTION = unchecked((int)0x80131500); - internal const int COR_E_EXECUTIONENGINE = unchecked((int)0x80131506); - internal const int COR_E_FIELDACCESS = unchecked((int)0x80131507); - internal const int COR_E_FORMAT = unchecked((int)0x80131537); - internal const int COR_E_INDEXOUTOFRANGE = unchecked((int)0x80131508); - internal const int COR_E_INSUFFICIENTMEMORY = unchecked((int)0x8013153D); - internal const int COR_E_INSUFFICIENTEXECUTIONSTACK = unchecked((int)0x80131578); - internal const int COR_E_INVALIDCAST = unchecked((int)0x80004002); - internal const int COR_E_INVALIDCOMOBJECT = unchecked((int)0x80131527); - internal const int COR_E_INVALIDFILTERCRITERIA = unchecked((int)0x80131601); - internal const int COR_E_INVALIDOLEVARIANTTYPE = unchecked((int)0x80131531); - internal const int COR_E_INVALIDOPERATION = unchecked((int)0x80131509); - internal const int COR_E_INVALIDPROGRAM = unchecked((int)0x8013153A); - internal const int COR_E_KEYNOTFOUND = unchecked((int)0x80131577); - internal const int COR_E_MARSHALDIRECTIVE = unchecked((int)0x80131535); - internal const int COR_E_MEMBERACCESS = unchecked((int)0x8013151A); - internal const int COR_E_METHODACCESS = unchecked((int)0x80131510); - internal const int COR_E_MISSINGFIELD = unchecked((int)0x80131511); - internal const int COR_E_MISSINGMANIFESTRESOURCE = unchecked((int)0x80131532); - internal const int COR_E_MISSINGMEMBER = unchecked((int)0x80131512); - internal const int COR_E_MISSINGMETHOD = unchecked((int)0x80131513); - internal const int COR_E_MISSINGSATELLITEASSEMBLY = unchecked((int)0x80131536); - internal const int COR_E_MULTICASTNOTSUPPORTED = unchecked((int)0x80131514); - internal const int COR_E_NOTFINITENUMBER = unchecked((int)0x80131528); - internal const int COR_E_PLATFORMNOTSUPPORTED = unchecked((int)0x80131539); - internal const int COR_E_NOTSUPPORTED = unchecked((int)0x80131515); - internal const int COR_E_NULLREFERENCE = unchecked((int)0x80004003); - internal const int COR_E_OBJECTDISPOSED = unchecked((int)0x80131622); - internal const int COR_E_OPERATIONCANCELED = unchecked((int)0x8013153B); - internal const int COR_E_OUTOFMEMORY = unchecked((int)0x8007000E); - internal const int COR_E_OVERFLOW = unchecked((int)0x80131516); - internal const int COR_E_RANK = unchecked((int)0x80131517); - internal const int COR_E_REFLECTIONTYPELOAD = unchecked((int)0x80131602); - internal const int COR_E_RUNTIMEWRAPPED = unchecked((int)0x8013153E); - internal const int COR_E_SAFEARRAYRANKMISMATCH = unchecked((int)0x80131538); - internal const int COR_E_SAFEARRAYTYPEMISMATCH = unchecked((int)0x80131533); - internal const int COR_E_SAFEHANDLEMISSINGATTRIBUTE = unchecked((int)0x80131623); - internal const int COR_E_SECURITY = unchecked((int)0x8013150A); - internal const int COR_E_SERIALIZATION = unchecked((int)0x8013150C); - internal const int COR_E_SEMAPHOREFULL = unchecked((int)0x8013152B); - internal const int COR_E_WAITHANDLECANNOTBEOPENED = unchecked((int)0x8013152C); - internal const int COR_E_ABANDONEDMUTEX = unchecked((int)0x8013152D); - internal const int COR_E_STACKOVERFLOW = unchecked((int)0x800703E9); - internal const int COR_E_SYNCHRONIZATIONLOCK = unchecked((int)0x80131518); - internal const int COR_E_SYSTEM = unchecked((int)0x80131501); - internal const int COR_E_TARGET = unchecked((int)0x80131603); - internal const int COR_E_TARGETINVOCATION = unchecked((int)0x80131604); - internal const int COR_E_TARGETPARAMCOUNT = unchecked((int)0x8002000e); - internal const int COR_E_THREADABORTED = unchecked((int)0x80131530); - internal const int COR_E_THREADINTERRUPTED = unchecked((int)0x80131519); - internal const int COR_E_THREADSTATE = unchecked((int)0x80131520); - internal const int COR_E_THREADSTOP = unchecked((int)0x80131521); - internal const int COR_E_THREADSTART = unchecked((int)0x80131525); - internal const int COR_E_TYPEACCESS = unchecked((int)0x80131543); - internal const int COR_E_TYPEINITIALIZATION = unchecked((int)0x80131534); - internal const int COR_E_TYPELOAD = unchecked((int)0x80131522); - internal const int COR_E_ENTRYPOINTNOTFOUND = unchecked((int)0x80131523); - internal const int COR_E_DLLNOTFOUND = unchecked((int)0x80131524); - internal const int COR_E_UNAUTHORIZEDACCESS = unchecked((int)0x80070005); - internal const int COR_E_UNSUPPORTEDFORMAT = unchecked((int)0x80131523); - internal const int COR_E_VERIFICATION = unchecked((int)0x8013150D); - internal const int COR_E_HOSTPROTECTION = unchecked((int)0x80131640); - internal const int CORSEC_E_MIN_GRANT_FAIL = unchecked((int)0x80131417); - internal const int CORSEC_E_NO_EXEC_PERM = unchecked((int)0x80131418); - internal const int CORSEC_E_POLICY_EXCEPTION = unchecked((int)0x80131416); - internal const int CORSEC_E_XMLSYNTAX = unchecked((int)0x80131418); - internal const int NTE_FAIL = unchecked((int)0x80090020); - internal const int CORSEC_E_CRYPTO = unchecked((int)0x80131430); - internal const int CORSEC_E_CRYPTO_UNEX_OPER = unchecked((int)0x80131431); - internal const int DISP_E_OVERFLOW = unchecked((int)0x8002000a); - internal const int FUSION_E_REF_DEF_MISMATCH = unchecked((int)0x80131040); - internal const int FUSION_E_INVALID_NAME = unchecked((int)0x80131047); - internal const int TYPE_E_TYPEMISMATCH = unchecked((int)0x80028ca0); - } -} -- 2.34.1