Remove dead HResults.cs (#13611)
authorDan Moseley <danmose@microsoft.com>
Mon, 28 Aug 2017 06:41:56 +0000 (23:41 -0700)
committerGitHub <noreply@github.com>
Mon, 28 Aug 2017 06:41:56 +0000 (23:41 -0700)
* 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

110 files changed:
src/coreclr/hosts/corerun/logger.cpp
src/mscorlib/System.Private.CoreLib.csproj
src/mscorlib/shared/System/ApplicationException.cs
src/mscorlib/shared/System/ArgumentException.cs
src/mscorlib/shared/System/ArgumentNullException.cs
src/mscorlib/shared/System/ArgumentOutOfRangeException.cs
src/mscorlib/shared/System/ArithmeticException.cs
src/mscorlib/shared/System/ArrayTypeMismatchException.cs
src/mscorlib/shared/System/BadImageFormatException.cs
src/mscorlib/shared/System/Collections/Generic/KeyNotFoundException.cs
src/mscorlib/shared/System/DataMisalignedException.cs
src/mscorlib/shared/System/DivideByZeroException.cs
src/mscorlib/shared/System/DllNotFoundException.cs
src/mscorlib/shared/System/DuplicateWaitObjectException.cs
src/mscorlib/shared/System/EntryPointNotFoundException.cs
src/mscorlib/shared/System/ExecutionEngineException.cs
src/mscorlib/shared/System/FieldAccessException.cs
src/mscorlib/shared/System/FormatException.cs
src/mscorlib/shared/System/IO/DirectoryNotFoundException.cs
src/mscorlib/shared/System/IO/EndOfStreamException.cs
src/mscorlib/shared/System/IO/FileLoadException.cs
src/mscorlib/shared/System/IO/FileNotFoundException.cs
src/mscorlib/shared/System/IO/PathTooLongException.cs
src/mscorlib/shared/System/IndexOutOfRangeException.cs
src/mscorlib/shared/System/InsufficientExecutionStackException.cs
src/mscorlib/shared/System/InvalidCastException.cs
src/mscorlib/shared/System/InvalidOperationException.cs
src/mscorlib/shared/System/InvalidProgramException.cs
src/mscorlib/shared/System/MemberAccessException.cs
src/mscorlib/shared/System/MethodAccessException.cs
src/mscorlib/shared/System/MissingMethodException.cs
src/mscorlib/shared/System/MulticastNotSupportedException.cs
src/mscorlib/shared/System/NotFiniteNumberException.cs
src/mscorlib/shared/System/NotImplementedException.cs
src/mscorlib/shared/System/NotSupportedException.cs
src/mscorlib/shared/System/NullReferenceException.cs
src/mscorlib/shared/System/ObjectDisposedException.cs
src/mscorlib/shared/System/OperationCanceledException.cs
src/mscorlib/shared/System/OverflowException.cs
src/mscorlib/shared/System/PlatformNotSupportedException.cs
src/mscorlib/shared/System/RankException.cs
src/mscorlib/shared/System/Reflection/AmbiguousMatchException.cs
src/mscorlib/shared/System/Reflection/CustomAttributeFormatException.cs
src/mscorlib/shared/System/Reflection/InvalidFilterCriteriaException.cs
src/mscorlib/shared/System/Reflection/ReflectionTypeLoadException.cs
src/mscorlib/shared/System/Reflection/TargetException.cs
src/mscorlib/shared/System/Reflection/TargetInvocationException.cs
src/mscorlib/shared/System/Reflection/TargetParameterCountException.cs
src/mscorlib/shared/System/Resources/MissingManifestResourceException.cs
src/mscorlib/shared/System/Resources/MissingSatelliteAssemblyException.cs
src/mscorlib/shared/System/Runtime/InteropServices/ExternalException.cs
src/mscorlib/shared/System/Runtime/Serialization/SerializationException.cs
src/mscorlib/shared/System/Security/SecurityException.cs
src/mscorlib/shared/System/Security/VerificationException.cs
src/mscorlib/shared/System/StackOverflowException.cs
src/mscorlib/shared/System/SystemException.cs
src/mscorlib/shared/System/Text/DecoderExceptionFallback.cs
src/mscorlib/shared/System/Text/EncoderExceptionFallback.cs
src/mscorlib/shared/System/Threading/AbandonedMutexException.cs
src/mscorlib/shared/System/Threading/SynchronizationLockException.cs
src/mscorlib/shared/System/Threading/ThreadAbortException.cs
src/mscorlib/shared/System/Threading/ThreadStartException.cs
src/mscorlib/shared/System/Threading/ThreadStateException.cs
src/mscorlib/shared/System/Threading/WaitHandleCannotBeOpenedException.cs
src/mscorlib/shared/System/TimeoutException.cs
src/mscorlib/shared/System/TypeAccessException.cs
src/mscorlib/shared/System/TypeInitializationException.cs
src/mscorlib/shared/System/TypeUnloadedException.cs
src/mscorlib/shared/System/UnauthorizedAccessException.cs
src/mscorlib/src/System/AccessViolationException.cs
src/mscorlib/src/System/AppDomainUnloadedException.cs
src/mscorlib/src/System/Exception.cs
src/mscorlib/src/System/HResults.cs
src/mscorlib/src/System/IO/DriveNotFoundException.cs
src/mscorlib/src/System/IO/FileLoadException.CoreCLR.cs
src/mscorlib/src/System/IO/IOException.cs
src/mscorlib/src/System/IO/__HResults.cs [deleted file]
src/mscorlib/src/System/InsufficientMemoryException.cs
src/mscorlib/src/System/MissingFieldException.cs
src/mscorlib/src/System/MissingMemberException.cs
src/mscorlib/src/System/OutOfMemoryException.cs
src/mscorlib/src/System/Resources/ResourceManager.cs
src/mscorlib/src/System/Resources/__HResults.cs [deleted file]
src/mscorlib/src/System/Runtime/CompilerServices/RuntimeWrappedException.cs
src/mscorlib/src/System/Runtime/InteropServices/COMException.cs
src/mscorlib/src/System/Runtime/InteropServices/InvalidComObjectException.cs
src/mscorlib/src/System/Runtime/InteropServices/InvalidOleVariantTypeException.cs
src/mscorlib/src/System/Runtime/InteropServices/MarshalDirectiveException.cs
src/mscorlib/src/System/Runtime/InteropServices/SEHException.cs
src/mscorlib/src/System/Runtime/InteropServices/SafeArrayRankMismatchException.cs
src/mscorlib/src/System/Runtime/InteropServices/SafeArrayTypeMismatchException.cs
src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/BindableVectorToListAdapter.cs
src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/CLRIPropertyValueImpl.cs
src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/ConstantSplittableMap.cs
src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/DictionaryToMapAdapter.cs
src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/EnumeratorToIteratorAdapter.cs
src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/IMapViewToIReadOnlyDictionaryAdapter.cs
src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/IReadOnlyDictionaryToIMapViewAdapter.cs
src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/IReadOnlyListToIVectorViewAdapter.cs
src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/IVectorViewToIReadOnlyListAdapter.cs
src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/IteratorToEnumeratorAdapter.cs
src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/ListToBindableVectorAdapter.cs
src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/ListToBindableVectorViewAdapter.cs
src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/ListToVectorAdapter.cs
src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/MapToDictionaryAdapter.cs
src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/VectorToListAdapter.cs
src/mscorlib/src/System/Threading/ClrThreadPoolBoundHandle.Windows.cs
src/mscorlib/src/System/Threading/ThreadInterruptedException.cs
src/mscorlib/src/System/TypeLoadException.cs
src/mscorlib/src/System/__HResults.cs [deleted file]

index 95eb7c9561deb204d5fc51c69eedbd98c9abd753..70716258ab25ad59100a04acd4b09d7e021795f3 100644 (file)
@@ -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;
index 609986876bcfbfd6a9cd141116b0d15bb1869b17..ec79823bfd2164b9b725e568106c041c36ad6da9 100644 (file)
     <Compile Include="$(BclSourcesRoot)\System\OutOfMemoryException.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Delegate.cs" />
     <Compile Include="$(BclSourcesRoot)\System\MulticastDelegate.cs" />
-    <Compile Include="$(BclSourcesRoot)\System\__HResults.cs" />
-    <Compile Include="$(BclSourcesRoot)\System\HResults.cs" />
     <Compile Include="$(BclSourcesRoot)\System\BCLDebug.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Activator.cs" />
     <Compile Include="$(BclSourcesRoot)\System\AccessViolationException.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Environment.cs" />
     <Compile Include="$(BclSourcesRoot)\System\GC.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Guid.CoreCLR.cs" />
+    <Compile Include="$(BclSourcesRoot)\System\HResults.cs" />
     <Compile Include="$(BclSourcesRoot)\System\InsufficientMemoryException.cs" />
     <Compile Include="$(BclSourcesRoot)\System\IntPtr.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Internal.cs" />
   </ItemGroup>
   <ItemGroup>
     <Compile Include="$(BclSourcesRoot)\System\IO\__Error.cs" />
-    <Compile Include="$(BclSourcesRoot)\System\IO\__HResults.cs" />
     <Compile Include="$(BclSourcesRoot)\System\IO\BinaryReader.cs" />
     <Compile Include="$(BclSourcesRoot)\System\IO\Directory.cs" />
     <Compile Include="$(BclSourcesRoot)\System\IO\SearchOption.cs" />
   </ItemGroup>
   <ItemGroup>
     <Compile Include="$(BclSourcesRoot)\System\Resources\__FastResourceComparer.cs" />
-    <Compile Include="$(BclSourcesRoot)\System\Resources\__HResults.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Resources\FileBasedResourceGroveler.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Resources\IResourceGroveler.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Resources\ManifestBasedResourceGroveler.cs" />
index cb98902de1aa0c7d5ac0608774830619c6179ce5..83ced79876422514dd2e2cc501c0900f47564b40 100644 (file)
@@ -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)
index de2d775c8478ba9413caa6018aed4b4e8904aaff..fe65d6443a8612948d27cfb88b2b6103f463e574 100644 (file)
@@ -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)
index 74b39fed8e465241339b4a4814caf00551228bcb..9b0732b2d2cc923cf13c230496f859a9fcc21086 100644 (file)
@@ -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)
index 4721a503b6d0fdfeaf33bfd6b2377e854b5023b7..a25cd577631fd72fa10cc8b0de4d608735e0e85f 100644 (file)
@@ -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)
index 2c8abe51faa445a9a96af8cceadc12aa1279fadf..6285c8120e2279f83c4df3441989c5a937e22f39 100644 (file)
@@ -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)
index d06a4506037e09554d18aa475fc0849ef438da24..6964b1fa120d7fc34ab9958f1873a6174e3016ab 100644 (file)
@@ -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)
index adedcb2a3f2d5b63bbea368c39173b0864f3bf0d..a4661fc799df194cfe087ab11d7b4b72889614f1 100644 (file)
@@ -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
index cdd6faf03087aec14825dfea4fe50a117aec372d..c32bc623ba892f64f7e60587331d240333f8d9da 100644 (file)
@@ -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)
index ff5b29f1cf414b06145597f73354bddbc8927c03..d8d36b5cb707ecfb7c527209c9ec8c19554f6947 100644 (file)
@@ -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;
         }
     }
 }
index 0fad2f8d56b2971f251e0a2bf35c87f9063121e0..ad74bde0fde3811e1ff5cd3e8a023eac19fbb6fa 100644 (file)
@@ -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)
index 8c69e45eda753d4586da30b3cc164b802cbf7beb..82d5bdd0c593bcd251f961e185e0ba8b9d327aa5 100644 (file)
@@ -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)
index 7eadead8c783bff4c87fe37885efd98552628837..95bdedd5261fe98760eed01f01232eae8cfae126 100644 (file)
@@ -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)
index 0b881cec0549f5ea574241f703047e24ab7760ae..e62ca0e11dd2a98764f2b896ad032b7186399222 100644 (file)
@@ -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)
index b89f6d9a8d459a6a3a5df3e95639c7a6caf77387..c33435875e448658ce2084412d99a344d21d5b97 100644 (file)
@@ -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;
         }
     }
 }
index b56d7497713eb10f5dcfe50865a4b89ec617d91c..883bbd8bc2a374e6f25b26f702acaeba80ba4d69 100644 (file)
@@ -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)
index 9baaac235307fddc2f74512d76354c481e902485..4af45cdd94d8439b6026d147a2ceeca7bc4d18a9 100644 (file)
@@ -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)
index de09760fcb4a8863546ebcf218e8b992f7bec7d0..87e610b86eb1c9e51325f367b14d178eaff7c4f7 100644 (file)
@@ -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)
index 68e1b2c882285be54bf9b684611c12c863eb96e4..ee37818dc5a4b9123ff40c4e9b49a3623bcbc5e8 100644 (file)
@@ -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)
index 6fdf2d58cf82077a990606fdf40b5dcf894644fe..b126424c2271cbec0814f354fb4fec2a4d4e0418 100644 (file)
@@ -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;
         }
 
index 374c976055943f7db13a29eb8119222b21f56f76..dc1ccf577aded7ee34883b342742b0b3d35a900f 100644 (file)
@@ -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)
index 64c8e6c7e6e87e41b3b43d74b4e5058b326757c2..15f282ebf6652bf649a7e9559ea870635a627375 100644 (file)
@@ -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)
index d5b24b35d531da798955c4dcb4219816d16770a8..bec63d73d62c5b6bf22ef7c27c9cf5122374e90d 100644 (file)
@@ -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;
         }
     }
 }
index 41df3ae970f0ff012a9e3dedb09a740a3c7b8f35..a14cb67150ee2ac293da3404d4051a0a84b0969d 100644 (file)
@@ -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;
         }
     }
 }
index cf359ac0b5b41b5c7c5f1979606fc83cc300206a..00b393c60e8bdfe7cb1639f337260e3fccdbcf1c 100644 (file)
@@ -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)
index ad743e05ff955f7797ec0012fbaad6bf7155e738..74a4ffd74aef5fc43dab567115824ee402b5277d 100644 (file)
@@ -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)
index 47e7325836fe9482823ef600db0c200c81659b22..e3521574ea2f0bb7e314586a6b9d45a964a892f6 100644 (file)
@@ -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;
         }
     }
 }
index abca952f19789f9150f21521c459e6d24c27f2b8..bb26d9e3c4cceaab7d54983314df435320fb7ca1 100644 (file)
@@ -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)
index 2c9c998c15d29a313e32f94ccf6253ede42a8765..12691386c5ba16ecb1fc0e41eb7a724b0a16566d 100644 (file)
@@ -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)
index 967f434302bbcdafecd3312bd827d222005fd017..4f5e8b656256f67e1e367c0f3dd95f5778aa141e 100644 (file)
@@ -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)
index 493671e227c9208fd1aae14827d6b55f97f7f752..56a3ec9c00470bea0cfe1b2bf891a05b909f21e0 100644 (file)
@@ -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;
         }
     }
 }
index 99882b9eb2e7a4cd2a2b41c12386ba3c57a6bc9f..ca47a21e5c9a491375f1eb837d8a306c86915922 100644 (file)
@@ -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)
index ae62527fac67ecd2880bc1780f77a9b760f7e325..98976c19db2039709f9fbcbeb545dcd55fb99fd0 100644 (file)
@@ -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)
index 8532e5ad2f4e168a6c0c6e9fbb1cd2c86991b8eb..dc43261fbd06dbbb1a0a545ac481ea0c0e20ccc0 100644 (file)
@@ -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)
index f689345654d9da6c23924e5e654bfc69c3d19370..eb6d709dbf6d5b59a7b949d8e2a9347161b9cf46 100644 (file)
@@ -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)
index 6e8e6b2d74b0730213cbbd011c329c599a48acb0..3d7ba5df158ad8d1778d6bde159cda7c8b05a78e 100644 (file)
@@ -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)
index 2c7654854f8b3e1095090b387774ae409496b404..44a0427c58d35b8d5ddee9ab56c0a4c8c22a1072 100644 (file)
@@ -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;
         }
 
 
index 4052e41a186f1bb9334f913fab7931b862677af1..bf6676ca2cb7484d0652ba17ade17f05940b0665 100644 (file)
@@ -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)
index f679ac94544d337bfe1dc4b662879c02bce24695..4403c1da061413cc7c01b5de99123e07b569e1d4 100644 (file)
@@ -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)
index 15759ea75d59b5a41941320921acc345c8d2222e..f2c5d06548aaec54f84f80da28e4c39e248c791f 100644 (file)
@@ -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)
index a0075bbc0b51c23dbea7b6b7dd9222758cf8edaf..c4aeca704db037ff81df361671d51d472d0d53cc 100644 (file)
@@ -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;
         }
     }
 }
index 13766ae8d0dbef91d8ad8c90c290723b9323fbb1..ae67158a53b80bbf2322229fd4186c95b3c2c94a 100644 (file)
@@ -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)
index 07880a768dff6aa98e19dda76d72d6c6dedeb19a..85a447707cd16f4d56432ce6407c9f954e71a3ca 100644 (file)
@@ -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)
index ca0c6ab0db567b45fabacf4ceca59ac97701f5ce..0e86d340566f4ff353c14fd9d589512a92961115 100644 (file)
@@ -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)
index 6e43f56fa44d17f9b141b73ce6228e1391f02b57..2309daace1b27fd5ed2b46044e1ec86b2200c709 100644 (file)
@@ -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)
index 8d0bfef40df23ae0f1146f9dc6bcc64dfcf5418d..7c4f60a03ed7b1e93832e616afc5c0b9fefaceb3 100644 (file)
@@ -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;
         }
     }
 }
index e200cdb94fa66348a69b2f5773d378637e2e7009..f31758b7ba9ecd989880ba74e638a8cde22e3f39 100644 (file)
@@ -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;
         }
     }
 }
index ec814393d078783268af18f82c2ef32e77e0d4ef..e11d15d20078fc0f618f48a71be87f6188ea826e 100644 (file)
@@ -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)
index d2ddc992ace06c78137a2cbf3d0a477c3eb77564..615aed6a8c2be60a20dcb0dbdc1c60c6c11e55d8 100644 (file)
@@ -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)
index 81b9a46928016504869a7a6022f1bd8e6308da4c..0861d193621759e146eb85cc76fcdc8c54f7445b 100644 (file)
@@ -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)
index bfe33136593fc3ca84778dc00d75e6828707e1f6..3e0af092c0074a02a788810b7291df719b5105c7 100644 (file)
@@ -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)
index 538f475343234d2315761141e251c17bba5a4fee..2866a4780c8e7d852afee7b3c5f1da9992856b1b 100644 (file)
@@ -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;
         }
index ea5a75906ecb8654ca33adb4efdc5ad7fd64628b..bd095f3df44a148c271e05bc20c94b483b8dde01 100644 (file)
@@ -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)
index fb0e88246c166f955c69a228181f8eff954ebbbd..8b21eb769a3c6394a827a0bf425780a86b5fca8f 100644 (file)
@@ -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;
         }
     }
 }
index d5bcde7efc28eb0bae667c6b6f6ad646303fdd58..64a4b9ca31fafacd7b7c1cca172ace83571283ce 100644 (file)
@@ -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)
index b465aa68efef9c047b7883b208770c56e8fc8f21..26d604a919bcab8c6a6d589156689b9d295d6aa5 100644 (file)
@@ -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)
index 98eff25b94e24d570ca06a322cc845a93c953ad1..71426e5f312d1823789a8962b94c74cb3caf6e29 100644 (file)
@@ -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(
index 15bc5a7341e4939e572bd2e35310c3c82c618a64..c43148d22ac052737f274d640f02f3f0fa274183 100644 (file)
@@ -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);
         }
 
index c64fc9ced8c58d1103c6f2245d7eafe674a2e765..5ab186ec9a653728c3c4ffa19fa254eed033cdd5 100644 (file)
@@ -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)
index ebbc29a702c7bfd612515909908bec54eac367f9..01fdf1317bfd719d59b00c5077420d6ed763e11a 100644 (file)
@@ -22,7 +22,7 @@ namespace System.Threading
     {
         internal ThreadAbortException()
         {
-            HResult = __HResults.COR_E_THREADABORTED;
+            HResult = HResults.COR_E_THREADABORTED;
         }
 
         public object ExceptionState => null;
index 7a87943ed1d80f8b5564590e7d5ae267d5980896..35930d1d2dc53fabc05ad8e26c5da5af457e5559 100644 (file)
@@ -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;
         }
     }
 }
index 9477cb1ae4cb1ba201b948d27f390568f06dfcff..d8f97a4f3bd56de2887118d636bad9d428db63c3 100644 (file)
@@ -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)
index 770e70d7ab5bd1f28c2f9d0d70713feaf4be8aeb..47e127191d9555b957e2364b2e6e41eb554bdc67 100644 (file)
@@ -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)
index 4ba95bc47be148cd3c9b98d056a2219da1536ac6..b50ae2f9023fbd4f5328673355763088237d7d74 100644 (file)
@@ -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)
index 302dcb1ac19fb66e72e5f45b60f7b953eca82c6d..ff081582b6a788ab0c04785798703aba41bdd800 100644 (file)
@@ -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)
index 8d0b8a9f791a499e09f705e54caa94d53d9f86bc..03a1bad3a74b58248c72dd842da8285032d51083 100644 (file)
@@ -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)
index c7ed71c9cb55cf4bbd9a4fea28d980978cb9d104..97039bb8f1de4e2cb36890339a40ecc0134df58b 100644 (file)
@@ -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)
index 667d57629294f45d87c6522b938f334efdc76f62..679a1a762ddccd8143b99e160896d955e171849f 100644 (file)
@@ -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)
index 23d086fb428ea6ecdde8dd73096df232f7274276..103a4c0a9d9c47924acb8a6b24886668aa28bf58 100644 (file)
@@ -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)
index a5e74e2b23a913c5865b7ddd12e009c2a73957d5..b673d8c9984b555675b551bd292ccc8e96694527 100644 (file)
@@ -21,7 +21,7 @@ namespace System
         public AppDomainUnloadedException()
             : base(SR.Arg_AppDomainUnloadedException)
         {
-            HResult = __HResults.COR_E_APPDOMAINUNLOADED;
+            HResult = HResults.COR_E_APPDOMAINUNLOADED;
         }
 
         //
index 7f886aebcbd80ed285c8a1a163110e959da0f38c..785637d1bac8b15970f93c0a9cdce87444acb50f 100644 (file)
@@ -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;
 
index d733ad4b2176ab61a9227e7d54fdc412f4e5901e..1e39df7970e3e4af2cb54accf049da4537237e09 100644 (file)
@@ -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);
     }
 }
index 7e9b0c9f36278f1ce3aefcdd8a49f3bce66f045d..fb7001d14bc77e3c15273a1298bfce049b0b6cd4 100644 (file)
@@ -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)
index d4ce9a9ab9ebba2916e9972ddbde58e4be8efbbd..bd3504580b89fcb9dafd236294353408552a5ab0 100644 (file)
@@ -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));
index 65504de863322c83ed9abef51d16af0e47f21dd1..169df95ac63acb67a3cbd404d4fceaf28de4bdfc 100644 (file)
@@ -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 (file)
index 633c353..0000000
+++ /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);
-    }
-}
index 8f7aa96ff75c37c880fb8042aadaaba85465300e..b4bc588f18d44d38e996a6274c0f1b9c18ad7786 100644 (file)
@@ -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;
         }
     }
 }
index 668d5f2a31cf73e2cbb6d5c44b0003593e28eaf7..31931bf91c702936fbab7c25aac09f20bf7b379e 100644 (file)
@@ -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)
index 1fb0c55e4089aef49ef94af57586cda6333d63ff..def3c39824bdebc3d599921c49f6fae3b942749a 100644 (file)
@@ -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)
index 3bec542077fee6ce18b1838978da8cb0212c3652..8ef2d7b2651ac9755ac31109c3a8c7a5cb5add5c 100644 (file)
@@ -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)
index f17123985700d6b728a09178bd5d9ad251c4c569..30222b4aae8acf066b2e05c96373f95c8ae37681 100644 (file)
@@ -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 (file)
index 5817161..0000000
+++ /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
index df52f301e4567972e0dc7151e13cb4fa92fa7c40..4a73e43136cb242f75d2f10c9fa5344cef1a9db1 100644 (file)
@@ -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;
         }
 
index 8ee10ed34980e95dda5f9c8aa53634d3379b146b..6d9927fd97bf488903fcf8b4fea39122218cb556 100644 (file)
@@ -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)
index bf89df94bbac10488e82cef1cfd8d3d883d3d3dc..c3ce68df4b4efcb39244f772fb13b66b8776743a 100644 (file)
@@ -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)
index 412853920e23a3b0e85f850652018650c56616e2..f61010cda32e8edeac2e1a23ce80bfb39fba7800 100644 (file)
@@ -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)
index 75b291af30d55cb0a1eb361292047795f021b51d..48e2dcf411c1ceeb49251eaed67a873bb29e043f 100644 (file)
@@ -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)
index d61e79757ce1f457c6e4409ce5f45f3be34fba9c..832c4d289ef30e6f4fece37b04ad62244fd90a37 100644 (file)
@@ -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)
index 9df858f0b1f4a8783cf01378b2c7976e723bcadd..7109b4fe51dd540da9e7bda1dd684e85f47bb477 100644 (file)
@@ -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)
index 4b03691e827922bbd814feb18b644855c2de02eb..13a6cf62a897edf6c66e7f57c3a9cb7577fc122e 100644 (file)
@@ -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)
index 539b8020b8c298832ac3b514daa17950f29881cb..f0be957f8cd2e21db3129eb5c64acb2096c47466 100644 (file)
@@ -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;
index aa0f3ba05692bbf08303726bd6b070690d4fe37f..75774caae2a41e03a05e85309b219f5086608c8a 100644 (file)
@@ -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<Point>(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<Size>(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<Rect>(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<Point>(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<Rect>(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];
index 0ed0bb3f7bc9dcd69083cd0ed08c47b86d3cb7dc..5a4a5e8a7b81910f87a242ea334903175b097ecc 100644 (file)
@@ -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;
             }
 
index bb54d49b60dfb49ce15ab8972e25cdc7ef06ae5d..3a1f8c4f4af4d2c20c570078e37652200292a488 100644 (file)
@@ -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;
             }
         }
index 75b8480eeb21d50ac0b74a8639b5c493841a5790..70a9da69746b5b33efeea411ec01d0f3524ed3e4 100644 (file)
@@ -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;
index 0900012338aa6b098d0588e9243b5b3dd42c9d87..04958c3bd5990f66da218297a3433759b19ba078 100644 (file)
@@ -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;
             }
index 73daf876cd7063c6cd2ce7c4d9dbc6c255c3414b..eaf5f471de6c911f29a8aa09ec7b659c68c1037e 100644 (file)
@@ -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;
             }
 
index 5dce7dfc8d78b46d4e120ff76a313945ffe8ae48..9b87bee372d08c4b227e43640614b794bf1e7f54 100644 (file)
@@ -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;
             }
         }
index 76b0fff00d4e6f953a9647b1e7447ab4026e2e11..50903235727cad02b756d12d265ee0bcc8350032 100644 (file)
@@ -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;
index 417476dbbe3f67ab6f0daa7198592ad47680690d..ccef9d92bf6734dba782e11a1f27a816f4b7ff75 100644 (file)
@@ -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();
                 }
index 5f12322ea8967bf2566acac1e97584f276b238a1..09fdc3b49e892a3951a739cb33ff338785a60651 100644 (file)
@@ -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;
             }
         }
index fc02bedfa6fb1dbb25b6607918e5578e95e74e4b..75c9b9d086b37a4a4e816736848470073f338cd3 100644 (file)
@@ -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");
             }
         }
 
index 87330e2559dcb02c75a8528fbb2c224269bd2d35..03c48b546b28c1a15464e83c0cd40d8f30af8109 100644 (file)
@@ -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;
             }
         }
index 224a266b075779ab3beaf3df31e1f8c5a5fae485..13d1aeb8bc0c5749601779dc38bd9343e124d955 100644 (file)
@@ -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;
             }
index 56e62a25e78f9e16600bc54b2e93d553313c38c8..90381f6be228ab69a821b1fe6f20aa3888ac6c72 100644 (file)
@@ -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;
index 21c1c5f4a40f409ffe90cf73a030e5d2273726d8..a40661c1b6c7d2996e662b647a137799686cd471 100644 (file)
@@ -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;
index fb72110fdc3397b25587f1f532d6fd834e2ad099..db42b77ca4a57259f8a016da91be2120b9660043 100644 (file)
@@ -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)
index 5e748a6c58fe4a133216e6d706fe07f07481ab88..840d97702b7ff832643e6419376aa3cb94043720 100644 (file)
@@ -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 (file)
index 0592d81..0000000
+++ /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);
-    }
-}