From d68f092b38f38523e72caffbb08e9d29cf4d0654 Mon Sep 17 00:00:00 2001 From: Dan Moseley Date: Sat, 26 Aug 2017 09:26:59 -0700 Subject: [PATCH 1/7] Fix old copy paste mistake --- src/coreclr/hosts/corerun/logger.cpp | 2 +- src/mscorlib/src/System/__HResults.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/coreclr/hosts/corerun/logger.cpp b/src/coreclr/hosts/corerun/logger.cpp index 95eb7c9561de..70716258ab25 100644 --- a/src/coreclr/hosts/corerun/logger.cpp +++ b/src/coreclr/hosts/corerun/logger.cpp @@ -88,7 +88,7 @@ void PrintAsHResult(int val) { case 0x80131416: str = W("CORSEC_E_POLICY_EXCEPTION"); break; case 0x80131417: str = W("CORSEC_E_MIN_GRANT_FAIL"); break; case 0x80131418: str = W("CORSEC_E_NO_EXEC_PERM"); break; - //case 0x80131418: str = W("CORSEC_E_XMLSYNTAX"); break; + //case 0x80131419: str = W("CORSEC_E_XMLSYNTAX"); break; case 0x80131430: str = W("CORSEC_E_CRYPTO"); break; case 0x80131431: str = W("CORSEC_E_CRYPTO_UNEX_OPER"); break; case 0x80131500: str = W("COR_E_EXCEPTION"); break; diff --git a/src/mscorlib/src/System/__HResults.cs b/src/mscorlib/src/System/__HResults.cs index 0592d814ef0b..d3044e30bb4a 100644 --- a/src/mscorlib/src/System/__HResults.cs +++ b/src/mscorlib/src/System/__HResults.cs @@ -119,7 +119,7 @@ internal static class __HResults 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 CORSEC_E_XMLSYNTAX = unchecked((int)0x80131419); 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); From ed4a9ddf664859297fad7566975a51d0b27287a0 Mon Sep 17 00:00:00 2001 From: Dan Moseley Date: Sat, 26 Aug 2017 09:21:21 -0700 Subject: [PATCH 2/7] Remove dead HResults.cs --- src/mscorlib/System.Private.CoreLib.csproj | 1 - src/mscorlib/src/System/HResults.cs | 235 ------------------ .../ClrThreadPoolBoundHandle.Windows.cs | 5 +- src/mscorlib/src/System/__HResults.cs | 2 + 4 files changed, 5 insertions(+), 238 deletions(-) delete mode 100644 src/mscorlib/src/System/HResults.cs diff --git a/src/mscorlib/System.Private.CoreLib.csproj b/src/mscorlib/System.Private.CoreLib.csproj index 609986876bcf..1b4b53ae0b31 100644 --- a/src/mscorlib/System.Private.CoreLib.csproj +++ b/src/mscorlib/System.Private.CoreLib.csproj @@ -295,7 +295,6 @@ - diff --git a/src/mscorlib/src/System/HResults.cs b/src/mscorlib/src/System/HResults.cs deleted file mode 100644 index d733ad4b2176..000000000000 --- a/src/mscorlib/src/System/HResults.cs +++ /dev/null @@ -1,235 +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 -{ - // 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); - 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_ASSEMBLYEXPECTED = unchecked((int)0x80131018); - 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_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_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_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_FORMAT = unchecked((int)0x80131537); - internal const int COR_E_INDEXOUTOFRANGE = unchecked((int)0x80131508); - 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_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); - 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_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_SAFEARRAYRANKMISMATCH = unchecked((int)0x80131538); - internal const int COR_E_SAFEARRAYTYPEMISMATCH = unchecked((int)0x80131533); - internal const int COR_E_SECURITY = unchecked((int)0x8013150A); - 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_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_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_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 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 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 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); - } -} diff --git a/src/mscorlib/src/System/Threading/ClrThreadPoolBoundHandle.Windows.cs b/src/mscorlib/src/System/Threading/ClrThreadPoolBoundHandle.Windows.cs index 21c1c5f4a40f..090497c42793 100644 --- a/src/mscorlib/src/System/Threading/ClrThreadPoolBoundHandle.Windows.cs +++ b/src/mscorlib/src/System/Threading/ClrThreadPoolBoundHandle.Windows.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System; using System.Diagnostics; using System.Runtime.InteropServices; @@ -27,10 +28,10 @@ private static ThreadPoolBoundHandle BindHandleCore(SafeHandle handle) // We do not let either of these leak and convert them to ArgumentException to // indicate that the specified handles are invalid. - if (ex.HResult == System.HResults.E_HANDLE) // Bad handle + if (ex.HResult == __HResults.E_HANDLE) // Bad handle throw new ArgumentException(SR.Argument_InvalidHandle, nameof(handle)); - if (ex.HResult == System.HResults.E_INVALIDARG) // Handle already bound or sync handle + if (ex.HResult == __HResults.E_INVALIDARG) // Handle already bound or sync handle throw new ArgumentException(SR.Argument_AlreadyBoundOrSyncHandle, nameof(handle)); throw; diff --git a/src/mscorlib/src/System/__HResults.cs b/src/mscorlib/src/System/__HResults.cs index d3044e30bb4a..6868f1fa694b 100644 --- a/src/mscorlib/src/System/__HResults.cs +++ b/src/mscorlib/src/System/__HResults.cs @@ -33,6 +33,8 @@ internal static class __HResults 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_INVALIDARG = unchecked((int)0x80070057); 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); From 6dd24df27c049f128713894b700f39cc273c7a34 Mon Sep 17 00:00:00 2001 From: Dan Moseley Date: Sun, 27 Aug 2017 22:13:35 -0700 Subject: [PATCH 3/7] Rename __HResults to HResults --- src/mscorlib/System.Private.CoreLib.csproj | 2 +- .../shared/System/ApplicationException.cs | 6 +-- .../shared/System/ArgumentException.cs | 10 ++-- .../shared/System/ArgumentNullException.cs | 8 ++-- .../System/ArgumentOutOfRangeException.cs | 10 ++-- .../shared/System/ArithmeticException.cs | 6 +-- .../System/ArrayTypeMismatchException.cs | 6 +-- .../shared/System/BadImageFormatException.cs | 12 ++--- .../Generic/KeyNotFoundException.cs | 6 +-- .../shared/System/DataMisalignedException.cs | 6 +-- .../shared/System/DivideByZeroException.cs | 6 +-- .../shared/System/DllNotFoundException.cs | 6 +-- .../System/DuplicateWaitObjectException.cs | 8 ++-- .../System/EntryPointNotFoundException.cs | 6 +-- .../shared/System/ExecutionEngineException.cs | 6 +-- .../shared/System/FieldAccessException.cs | 6 +-- src/mscorlib/shared/System/FormatException.cs | 6 +-- .../shared/System/IO/FileNotFoundException.cs | 2 +- .../shared/System/IndexOutOfRangeException.cs | 6 +-- .../InsufficientExecutionStackException.cs | 6 +-- .../shared/System/InvalidCastException.cs | 6 +-- .../System/InvalidOperationException.cs | 6 +-- .../shared/System/InvalidProgramException.cs | 6 +-- .../shared/System/MemberAccessException.cs | 6 +-- .../shared/System/MethodAccessException.cs | 6 +-- .../shared/System/MissingMethodException.cs | 6 +-- .../System/MulticastNotSupportedException.cs | 6 +-- .../shared/System/NotFiniteNumberException.cs | 12 ++--- .../shared/System/NotImplementedException.cs | 6 +-- .../shared/System/NotSupportedException.cs | 6 +-- .../shared/System/NullReferenceException.cs | 6 +-- .../shared/System/ObjectDisposedException.cs | 4 +- .../System/OperationCanceledException.cs | 6 +-- .../shared/System/OverflowException.cs | 6 +-- .../System/PlatformNotSupportedException.cs | 6 +-- src/mscorlib/shared/System/RankException.cs | 6 +-- .../Reflection/AmbiguousMatchException.cs | 6 +-- .../CustomAttributeFormatException.cs | 2 +- .../InvalidFilterCriteriaException.cs | 2 +- .../Reflection/ReflectionTypeLoadException.cs | 4 +- .../System/Reflection/TargetException.cs | 2 +- .../Reflection/TargetInvocationException.cs | 4 +- .../TargetParameterCountException.cs | 6 +-- .../MissingManifestResourceException.cs | 6 +-- .../MissingSatelliteAssemblyException.cs | 8 ++-- .../InteropServices/ExternalException.cs | 6 +-- .../Serialization/SerializationException.cs | 6 +-- .../System/Security/SecurityException.cs | 10 ++-- .../System/Security/VerificationException.cs | 6 +-- .../shared/System/StackOverflowException.cs | 6 +-- src/mscorlib/shared/System/SystemException.cs | 6 +-- .../System/Text/DecoderExceptionFallback.cs | 6 +-- .../System/Text/EncoderExceptionFallback.cs | 6 +-- .../Threading/AbandonedMutexException.cs | 12 ++--- .../Threading/SynchronizationLockException.cs | 6 +-- .../System/Threading/ThreadAbortException.cs | 2 +- .../System/Threading/ThreadStartException.cs | 4 +- .../System/Threading/ThreadStateException.cs | 6 +-- .../WaitHandleCannotBeOpenedException.cs | 6 +-- .../shared/System/TimeoutException.cs | 6 +-- .../shared/System/TypeAccessException.cs | 6 +-- .../System/TypeInitializationException.cs | 6 +-- .../shared/System/TypeUnloadedException.cs | 6 +-- .../System/UnauthorizedAccessException.cs | 6 +-- .../src/System/AccessViolationException.cs | 6 +-- .../src/System/AppDomainUnloadedException.cs | 2 +- src/mscorlib/src/System/Exception.cs | 2 +- .../src/System/{__HResults.cs => HResults.cs} | 4 +- .../System/IO/FileLoadException.CoreCLR.cs | 2 +- .../src/System/InsufficientMemoryException.cs | 6 +-- .../src/System/MissingFieldException.cs | 6 +-- .../src/System/MissingMemberException.cs | 6 +-- .../src/System/OutOfMemoryException.cs | 6 +-- .../RuntimeWrappedException.cs | 2 +- .../Runtime/InteropServices/COMException.cs | 6 +-- .../InvalidComObjectException.cs | 6 +-- .../InvalidOleVariantTypeException.cs | 6 +-- .../MarshalDirectiveException.cs | 6 +-- .../Runtime/InteropServices/SEHException.cs | 6 +-- .../SafeArrayRankMismatchException.cs | 6 +-- .../SafeArrayTypeMismatchException.cs | 6 +-- .../BindableVectorToListAdapter.cs | 8 ++-- .../WindowsRuntime/CLRIPropertyValueImpl.cs | 46 +++++++++---------- .../WindowsRuntime/ConstantSplittableMap.cs | 2 +- .../WindowsRuntime/DictionaryToMapAdapter.cs | 4 +- .../EnumeratorToIteratorAdapter.cs | 4 +- .../IMapViewToIReadOnlyDictionaryAdapter.cs | 4 +- .../IReadOnlyDictionaryToIMapViewAdapter.cs | 2 +- .../IReadOnlyListToIVectorViewAdapter.cs | 4 +- .../IVectorViewToIReadOnlyListAdapter.cs | 2 +- .../IteratorToEnumeratorAdapter.cs | 2 +- .../ListToBindableVectorAdapter.cs | 12 ++--- .../ListToBindableVectorViewAdapter.cs | 4 +- .../WindowsRuntime/ListToVectorAdapter.cs | 12 ++--- .../WindowsRuntime/MapToDictionaryAdapter.cs | 4 +- .../WindowsRuntime/VectorToListAdapter.cs | 8 ++-- .../ClrThreadPoolBoundHandle.Windows.cs | 4 +- .../Threading/ThreadInterruptedException.cs | 6 +-- src/mscorlib/src/System/TypeLoadException.cs | 8 ++-- 99 files changed, 303 insertions(+), 305 deletions(-) rename src/mscorlib/src/System/{__HResults.cs => HResults.cs} (98%) diff --git a/src/mscorlib/System.Private.CoreLib.csproj b/src/mscorlib/System.Private.CoreLib.csproj index 1b4b53ae0b31..f08a567dbfac 100644 --- a/src/mscorlib/System.Private.CoreLib.csproj +++ b/src/mscorlib/System.Private.CoreLib.csproj @@ -294,7 +294,6 @@ - @@ -315,6 +314,7 @@ + diff --git a/src/mscorlib/shared/System/ApplicationException.cs b/src/mscorlib/shared/System/ApplicationException.cs index cb98902de1aa..83ced7987642 100644 --- a/src/mscorlib/shared/System/ApplicationException.cs +++ b/src/mscorlib/shared/System/ApplicationException.cs @@ -31,7 +31,7 @@ public class ApplicationException : Exception 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 @@ public ApplicationException() public ApplicationException(String message) : base(message) { - HResult = __HResults.COR_E_APPLICATION; + HResult = HResults.COR_E_APPLICATION; } public ApplicationException(String message, Exception innerException) : base(message, innerException) { - HResult = __HResults.COR_E_APPLICATION; + HResult = HResults.COR_E_APPLICATION; } protected ApplicationException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/src/mscorlib/shared/System/ArgumentException.cs b/src/mscorlib/shared/System/ArgumentException.cs index de2d775c8478..fe65d6443a86 100644 --- a/src/mscorlib/shared/System/ArgumentException.cs +++ b/src/mscorlib/shared/System/ArgumentException.cs @@ -29,7 +29,7 @@ public class ArgumentException : SystemException 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 @@ public ArgumentException() public ArgumentException(String message) : base(message) { - HResult = __HResults.COR_E_ARGUMENT; + HResult = HResults.COR_E_ARGUMENT; } public ArgumentException(String message, Exception innerException) : base(message, innerException) { - HResult = __HResults.COR_E_ARGUMENT; + HResult = HResults.COR_E_ARGUMENT; } public ArgumentException(String message, String paramName, Exception innerException) : base(message, innerException) { _paramName = paramName; - HResult = __HResults.COR_E_ARGUMENT; + HResult = HResults.COR_E_ARGUMENT; } public ArgumentException(String message, String paramName) : base(message) { _paramName = paramName; - HResult = __HResults.COR_E_ARGUMENT; + HResult = HResults.COR_E_ARGUMENT; } protected ArgumentException(SerializationInfo info, StreamingContext context) diff --git a/src/mscorlib/shared/System/ArgumentNullException.cs b/src/mscorlib/shared/System/ArgumentNullException.cs index 74b39fed8e46..9b0732b2d2cc 100644 --- a/src/mscorlib/shared/System/ArgumentNullException.cs +++ b/src/mscorlib/shared/System/ArgumentNullException.cs @@ -26,25 +26,25 @@ public ArgumentNullException() : base(SR.ArgumentNull_Generic) { // Use E_POINTER - COM used that for null pointers. Description is "invalid pointer" - HResult = __HResults.E_POINTER; + HResult = HResults.E_POINTER; } public ArgumentNullException(String paramName) : base(SR.ArgumentNull_Generic, paramName) { - HResult = __HResults.E_POINTER; + HResult = HResults.E_POINTER; } public ArgumentNullException(String message, Exception innerException) : base(message, innerException) { - HResult = __HResults.E_POINTER; + HResult = HResults.E_POINTER; } public ArgumentNullException(String paramName, String message) : base(message, paramName) { - HResult = __HResults.E_POINTER; + HResult = HResults.E_POINTER; } protected ArgumentNullException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/src/mscorlib/shared/System/ArgumentOutOfRangeException.cs b/src/mscorlib/shared/System/ArgumentOutOfRangeException.cs index 4721a503b6d0..a25cd577631f 100644 --- a/src/mscorlib/shared/System/ArgumentOutOfRangeException.cs +++ b/src/mscorlib/shared/System/ArgumentOutOfRangeException.cs @@ -27,25 +27,25 @@ public class ArgumentOutOfRangeException : ArgumentException 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 @@ public ArgumentOutOfRangeException(String paramName, Object actualValue, String : base(message, paramName) { _actualValue = actualValue; - HResult = __HResults.COR_E_ARGUMENTOUTOFRANGE; + HResult = HResults.COR_E_ARGUMENTOUTOFRANGE; } protected ArgumentOutOfRangeException(SerializationInfo info, StreamingContext context) diff --git a/src/mscorlib/shared/System/ArithmeticException.cs b/src/mscorlib/shared/System/ArithmeticException.cs index 2c8abe51faa4..6285c8120e22 100644 --- a/src/mscorlib/shared/System/ArithmeticException.cs +++ b/src/mscorlib/shared/System/ArithmeticException.cs @@ -26,7 +26,7 @@ public class ArithmeticException : SystemException 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 @@ public ArithmeticException() public ArithmeticException(String message) : base(message) { - HResult = __HResults.COR_E_ARITHMETIC; + HResult = HResults.COR_E_ARITHMETIC; } public ArithmeticException(String message, Exception innerException) : base(message, innerException) { - HResult = __HResults.COR_E_ARITHMETIC; + HResult = HResults.COR_E_ARITHMETIC; } protected ArithmeticException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/src/mscorlib/shared/System/ArrayTypeMismatchException.cs b/src/mscorlib/shared/System/ArrayTypeMismatchException.cs index d06a4506037e..6964b1fa120d 100644 --- a/src/mscorlib/shared/System/ArrayTypeMismatchException.cs +++ b/src/mscorlib/shared/System/ArrayTypeMismatchException.cs @@ -26,7 +26,7 @@ public class ArrayTypeMismatchException : SystemException 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 @@ public ArrayTypeMismatchException() public ArrayTypeMismatchException(String message) : base(message) { - HResult = __HResults.COR_E_ARRAYTYPEMISMATCH; + HResult = HResults.COR_E_ARRAYTYPEMISMATCH; } public ArrayTypeMismatchException(String message, Exception innerException) : base(message, innerException) { - HResult = __HResults.COR_E_ARRAYTYPEMISMATCH; + HResult = HResults.COR_E_ARRAYTYPEMISMATCH; } protected ArrayTypeMismatchException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/src/mscorlib/shared/System/BadImageFormatException.cs b/src/mscorlib/shared/System/BadImageFormatException.cs index adedcb2a3f2d..a4661fc799df 100644 --- a/src/mscorlib/shared/System/BadImageFormatException.cs +++ b/src/mscorlib/shared/System/BadImageFormatException.cs @@ -25,31 +25,31 @@ public partial class BadImageFormatException : SystemException 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 @@ private void SetMessageField() if (_message == null) { if ((_fileName == null) && - (HResult == __HResults.COR_E_EXCEPTION)) + (HResult == HResults.COR_E_EXCEPTION)) _message = SR.Arg_BadImageFormatException; else diff --git a/src/mscorlib/shared/System/Collections/Generic/KeyNotFoundException.cs b/src/mscorlib/shared/System/Collections/Generic/KeyNotFoundException.cs index cdd6faf03087..c32bc623ba89 100644 --- a/src/mscorlib/shared/System/Collections/Generic/KeyNotFoundException.cs +++ b/src/mscorlib/shared/System/Collections/Generic/KeyNotFoundException.cs @@ -12,19 +12,19 @@ public class KeyNotFoundException : SystemException public KeyNotFoundException() : base(SR.Arg_KeyNotFound) { - HResult = __HResults.COR_E_KEYNOTFOUND; + HResult = HResults.COR_E_KEYNOTFOUND; } public KeyNotFoundException(String message) : base(message) { - HResult = __HResults.COR_E_KEYNOTFOUND; + HResult = HResults.COR_E_KEYNOTFOUND; } public KeyNotFoundException(String message, Exception innerException) : base(message, innerException) { - HResult = __HResults.COR_E_KEYNOTFOUND; + HResult = HResults.COR_E_KEYNOTFOUND; } protected KeyNotFoundException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/src/mscorlib/shared/System/DataMisalignedException.cs b/src/mscorlib/shared/System/DataMisalignedException.cs index ff5b29f1cf41..d8d36b5cb707 100644 --- a/src/mscorlib/shared/System/DataMisalignedException.cs +++ b/src/mscorlib/shared/System/DataMisalignedException.cs @@ -18,19 +18,19 @@ public sealed class DataMisalignedException : SystemException public DataMisalignedException() : base(SR.Arg_DataMisalignedException) { - HResult = __HResults.COR_E_DATAMISALIGNED; + HResult = HResults.COR_E_DATAMISALIGNED; } public DataMisalignedException(String message) : base(message) { - HResult = __HResults.COR_E_DATAMISALIGNED; + HResult = HResults.COR_E_DATAMISALIGNED; } public DataMisalignedException(String message, Exception innerException) : base(message, innerException) { - HResult = __HResults.COR_E_DATAMISALIGNED; + HResult = HResults.COR_E_DATAMISALIGNED; } } } diff --git a/src/mscorlib/shared/System/DivideByZeroException.cs b/src/mscorlib/shared/System/DivideByZeroException.cs index 0fad2f8d56b2..ad74bde0fde3 100644 --- a/src/mscorlib/shared/System/DivideByZeroException.cs +++ b/src/mscorlib/shared/System/DivideByZeroException.cs @@ -20,19 +20,19 @@ public class DivideByZeroException : ArithmeticException public DivideByZeroException() : base(SR.Arg_DivideByZero) { - HResult = __HResults.COR_E_DIVIDEBYZERO; + HResult = HResults.COR_E_DIVIDEBYZERO; } public DivideByZeroException(String message) : base(message) { - HResult = __HResults.COR_E_DIVIDEBYZERO; + HResult = HResults.COR_E_DIVIDEBYZERO; } public DivideByZeroException(String message, Exception innerException) : base(message, innerException) { - HResult = __HResults.COR_E_DIVIDEBYZERO; + HResult = HResults.COR_E_DIVIDEBYZERO; } protected DivideByZeroException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/src/mscorlib/shared/System/DllNotFoundException.cs b/src/mscorlib/shared/System/DllNotFoundException.cs index 8c69e45eda75..82d5bdd0c593 100644 --- a/src/mscorlib/shared/System/DllNotFoundException.cs +++ b/src/mscorlib/shared/System/DllNotFoundException.cs @@ -21,19 +21,19 @@ public class DllNotFoundException : TypeLoadException public DllNotFoundException() : base(SR.Arg_DllNotFoundException) { - HResult = __HResults.COR_E_DLLNOTFOUND; + HResult = HResults.COR_E_DLLNOTFOUND; } public DllNotFoundException(String message) : base(message) { - HResult = __HResults.COR_E_DLLNOTFOUND; + HResult = HResults.COR_E_DLLNOTFOUND; } public DllNotFoundException(String message, Exception inner) : base(message, inner) { - HResult = __HResults.COR_E_DLLNOTFOUND; + HResult = HResults.COR_E_DLLNOTFOUND; } protected DllNotFoundException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/src/mscorlib/shared/System/DuplicateWaitObjectException.cs b/src/mscorlib/shared/System/DuplicateWaitObjectException.cs index 7eadead8c783..95bdedd5261f 100644 --- a/src/mscorlib/shared/System/DuplicateWaitObjectException.cs +++ b/src/mscorlib/shared/System/DuplicateWaitObjectException.cs @@ -37,25 +37,25 @@ private static String DuplicateWaitObjectMessage public DuplicateWaitObjectException() : base(DuplicateWaitObjectMessage) { - HResult = __HResults.COR_E_DUPLICATEWAITOBJECT; + HResult = HResults.COR_E_DUPLICATEWAITOBJECT; } public DuplicateWaitObjectException(String parameterName) : base(DuplicateWaitObjectMessage, parameterName) { - HResult = __HResults.COR_E_DUPLICATEWAITOBJECT; + HResult = HResults.COR_E_DUPLICATEWAITOBJECT; } public DuplicateWaitObjectException(String parameterName, String message) : base(message, parameterName) { - HResult = __HResults.COR_E_DUPLICATEWAITOBJECT; + HResult = HResults.COR_E_DUPLICATEWAITOBJECT; } public DuplicateWaitObjectException(String message, Exception innerException) : base(message, innerException) { - HResult = __HResults.COR_E_DUPLICATEWAITOBJECT; + HResult = HResults.COR_E_DUPLICATEWAITOBJECT; } protected DuplicateWaitObjectException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/src/mscorlib/shared/System/EntryPointNotFoundException.cs b/src/mscorlib/shared/System/EntryPointNotFoundException.cs index 0b881cec0549..e62ca0e11dd2 100644 --- a/src/mscorlib/shared/System/EntryPointNotFoundException.cs +++ b/src/mscorlib/shared/System/EntryPointNotFoundException.cs @@ -21,19 +21,19 @@ public class EntryPointNotFoundException : TypeLoadException public EntryPointNotFoundException() : base(SR.Arg_EntryPointNotFoundException) { - HResult = __HResults.COR_E_ENTRYPOINTNOTFOUND; + HResult = HResults.COR_E_ENTRYPOINTNOTFOUND; } public EntryPointNotFoundException(String message) : base(message) { - HResult = __HResults.COR_E_ENTRYPOINTNOTFOUND; + HResult = HResults.COR_E_ENTRYPOINTNOTFOUND; } public EntryPointNotFoundException(String message, Exception inner) : base(message, inner) { - HResult = __HResults.COR_E_ENTRYPOINTNOTFOUND; + HResult = HResults.COR_E_ENTRYPOINTNOTFOUND; } protected EntryPointNotFoundException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/src/mscorlib/shared/System/ExecutionEngineException.cs b/src/mscorlib/shared/System/ExecutionEngineException.cs index b89f6d9a8d45..c33435875e44 100644 --- a/src/mscorlib/shared/System/ExecutionEngineException.cs +++ b/src/mscorlib/shared/System/ExecutionEngineException.cs @@ -26,19 +26,19 @@ public sealed class ExecutionEngineException : SystemException public ExecutionEngineException() : base(SR.Arg_ExecutionEngineException) { - HResult = __HResults.COR_E_EXECUTIONENGINE; + HResult = HResults.COR_E_EXECUTIONENGINE; } public ExecutionEngineException(String message) : base(message) { - HResult = __HResults.COR_E_EXECUTIONENGINE; + HResult = HResults.COR_E_EXECUTIONENGINE; } public ExecutionEngineException(String message, Exception innerException) : base(message, innerException) { - HResult = __HResults.COR_E_EXECUTIONENGINE; + HResult = HResults.COR_E_EXECUTIONENGINE; } } } diff --git a/src/mscorlib/shared/System/FieldAccessException.cs b/src/mscorlib/shared/System/FieldAccessException.cs index b56d7497713e..883bbd8bc2a3 100644 --- a/src/mscorlib/shared/System/FieldAccessException.cs +++ b/src/mscorlib/shared/System/FieldAccessException.cs @@ -18,19 +18,19 @@ public class FieldAccessException : MemberAccessException public FieldAccessException() : base(SR.Arg_FieldAccessException) { - HResult = __HResults.COR_E_FIELDACCESS; + HResult = HResults.COR_E_FIELDACCESS; } public FieldAccessException(String message) : base(message) { - HResult = __HResults.COR_E_FIELDACCESS; + HResult = HResults.COR_E_FIELDACCESS; } public FieldAccessException(String message, Exception inner) : base(message, inner) { - HResult = __HResults.COR_E_FIELDACCESS; + HResult = HResults.COR_E_FIELDACCESS; } protected FieldAccessException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/src/mscorlib/shared/System/FormatException.cs b/src/mscorlib/shared/System/FormatException.cs index 9baaac235307..4af45cdd94d8 100644 --- a/src/mscorlib/shared/System/FormatException.cs +++ b/src/mscorlib/shared/System/FormatException.cs @@ -20,19 +20,19 @@ public class FormatException : SystemException public FormatException() : base(SR.Arg_FormatException) { - HResult = __HResults.COR_E_FORMAT; + HResult = HResults.COR_E_FORMAT; } public FormatException(String message) : base(message) { - HResult = __HResults.COR_E_FORMAT; + HResult = HResults.COR_E_FORMAT; } public FormatException(String message, Exception innerException) : base(message, innerException) { - HResult = __HResults.COR_E_FORMAT; + HResult = HResults.COR_E_FORMAT; } protected FormatException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/src/mscorlib/shared/System/IO/FileNotFoundException.cs b/src/mscorlib/shared/System/IO/FileNotFoundException.cs index 374c97605594..a4f3060c0ee8 100644 --- a/src/mscorlib/shared/System/IO/FileNotFoundException.cs +++ b/src/mscorlib/shared/System/IO/FileNotFoundException.cs @@ -55,7 +55,7 @@ private void SetMessageField() if (_message == null) { if ((FileName == null) && - (HResult == System.__HResults.COR_E_EXCEPTION)) + (HResult == System.HResults.COR_E_EXCEPTION)) _message = SR.IO_FileNotFound; else if (FileName != null) diff --git a/src/mscorlib/shared/System/IndexOutOfRangeException.cs b/src/mscorlib/shared/System/IndexOutOfRangeException.cs index d5b24b35d531..bec63d73d62c 100644 --- a/src/mscorlib/shared/System/IndexOutOfRangeException.cs +++ b/src/mscorlib/shared/System/IndexOutOfRangeException.cs @@ -20,19 +20,19 @@ public sealed class IndexOutOfRangeException : SystemException public IndexOutOfRangeException() : base(SR.Arg_IndexOutOfRangeException) { - HResult = __HResults.COR_E_INDEXOUTOFRANGE; + HResult = HResults.COR_E_INDEXOUTOFRANGE; } public IndexOutOfRangeException(String message) : base(message) { - HResult = __HResults.COR_E_INDEXOUTOFRANGE; + HResult = HResults.COR_E_INDEXOUTOFRANGE; } public IndexOutOfRangeException(String message, Exception innerException) : base(message, innerException) { - HResult = __HResults.COR_E_INDEXOUTOFRANGE; + HResult = HResults.COR_E_INDEXOUTOFRANGE; } } } diff --git a/src/mscorlib/shared/System/InsufficientExecutionStackException.cs b/src/mscorlib/shared/System/InsufficientExecutionStackException.cs index 41df3ae970f0..a14cb67150ee 100644 --- a/src/mscorlib/shared/System/InsufficientExecutionStackException.cs +++ b/src/mscorlib/shared/System/InsufficientExecutionStackException.cs @@ -11,19 +11,19 @@ public sealed class InsufficientExecutionStackException : SystemException public InsufficientExecutionStackException() : base(SR.Arg_InsufficientExecutionStackException) { - HResult = __HResults.COR_E_INSUFFICIENTEXECUTIONSTACK; + HResult = HResults.COR_E_INSUFFICIENTEXECUTIONSTACK; } public InsufficientExecutionStackException(String message) : base(message) { - HResult = __HResults.COR_E_INSUFFICIENTEXECUTIONSTACK; + HResult = HResults.COR_E_INSUFFICIENTEXECUTIONSTACK; } public InsufficientExecutionStackException(String message, Exception innerException) : base(message, innerException) { - HResult = __HResults.COR_E_INSUFFICIENTEXECUTIONSTACK; + HResult = HResults.COR_E_INSUFFICIENTEXECUTIONSTACK; } } } diff --git a/src/mscorlib/shared/System/InvalidCastException.cs b/src/mscorlib/shared/System/InvalidCastException.cs index cf359ac0b5b4..00b393c60e8b 100644 --- a/src/mscorlib/shared/System/InvalidCastException.cs +++ b/src/mscorlib/shared/System/InvalidCastException.cs @@ -17,19 +17,19 @@ public class InvalidCastException : SystemException public InvalidCastException() : base(SR.Arg_InvalidCastException) { - HResult = __HResults.COR_E_INVALIDCAST; + HResult = HResults.COR_E_INVALIDCAST; } public InvalidCastException(String message) : base(message) { - HResult = __HResults.COR_E_INVALIDCAST; + HResult = HResults.COR_E_INVALIDCAST; } public InvalidCastException(String message, Exception innerException) : base(message, innerException) { - HResult = __HResults.COR_E_INVALIDCAST; + HResult = HResults.COR_E_INVALIDCAST; } public InvalidCastException(String message, int errorCode) diff --git a/src/mscorlib/shared/System/InvalidOperationException.cs b/src/mscorlib/shared/System/InvalidOperationException.cs index ad743e05ff95..74a4ffd74aef 100644 --- a/src/mscorlib/shared/System/InvalidOperationException.cs +++ b/src/mscorlib/shared/System/InvalidOperationException.cs @@ -21,19 +21,19 @@ public class InvalidOperationException : SystemException public InvalidOperationException() : base(SR.Arg_InvalidOperationException) { - HResult = __HResults.COR_E_INVALIDOPERATION; + HResult = HResults.COR_E_INVALIDOPERATION; } public InvalidOperationException(String message) : base(message) { - HResult = __HResults.COR_E_INVALIDOPERATION; + HResult = HResults.COR_E_INVALIDOPERATION; } public InvalidOperationException(String message, Exception innerException) : base(message, innerException) { - HResult = __HResults.COR_E_INVALIDOPERATION; + HResult = HResults.COR_E_INVALIDOPERATION; } protected InvalidOperationException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/src/mscorlib/shared/System/InvalidProgramException.cs b/src/mscorlib/shared/System/InvalidProgramException.cs index 47e7325836fe..e3521574ea2f 100644 --- a/src/mscorlib/shared/System/InvalidProgramException.cs +++ b/src/mscorlib/shared/System/InvalidProgramException.cs @@ -20,19 +20,19 @@ public sealed class InvalidProgramException : SystemException public InvalidProgramException() : base(SR.InvalidProgram_Default) { - HResult = __HResults.COR_E_INVALIDPROGRAM; + HResult = HResults.COR_E_INVALIDPROGRAM; } public InvalidProgramException(String message) : base(message) { - HResult = __HResults.COR_E_INVALIDPROGRAM; + HResult = HResults.COR_E_INVALIDPROGRAM; } public InvalidProgramException(String message, Exception inner) : base(message, inner) { - HResult = __HResults.COR_E_INVALIDPROGRAM; + HResult = HResults.COR_E_INVALIDPROGRAM; } } } diff --git a/src/mscorlib/shared/System/MemberAccessException.cs b/src/mscorlib/shared/System/MemberAccessException.cs index abca952f1978..bb26d9e3c4cc 100644 --- a/src/mscorlib/shared/System/MemberAccessException.cs +++ b/src/mscorlib/shared/System/MemberAccessException.cs @@ -23,7 +23,7 @@ public class MemberAccessException : SystemException 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 @@ public MemberAccessException() public MemberAccessException(String message) : base(message) { - HResult = __HResults.COR_E_MEMBERACCESS; + HResult = HResults.COR_E_MEMBERACCESS; } public MemberAccessException(String message, Exception inner) : base(message, inner) { - HResult = __HResults.COR_E_MEMBERACCESS; + HResult = HResults.COR_E_MEMBERACCESS; } protected MemberAccessException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/src/mscorlib/shared/System/MethodAccessException.cs b/src/mscorlib/shared/System/MethodAccessException.cs index 2c9c998c15d2..12691386c5ba 100644 --- a/src/mscorlib/shared/System/MethodAccessException.cs +++ b/src/mscorlib/shared/System/MethodAccessException.cs @@ -18,19 +18,19 @@ public class MethodAccessException : MemberAccessException public MethodAccessException() : base(SR.Arg_MethodAccessException) { - HResult = __HResults.COR_E_METHODACCESS; + HResult = HResults.COR_E_METHODACCESS; } public MethodAccessException(String message) : base(message) { - HResult = __HResults.COR_E_METHODACCESS; + HResult = HResults.COR_E_METHODACCESS; } public MethodAccessException(String message, Exception inner) : base(message, inner) { - HResult = __HResults.COR_E_METHODACCESS; + HResult = HResults.COR_E_METHODACCESS; } protected MethodAccessException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/src/mscorlib/shared/System/MissingMethodException.cs b/src/mscorlib/shared/System/MissingMethodException.cs index 967f434302bb..4f5e8b656256 100644 --- a/src/mscorlib/shared/System/MissingMethodException.cs +++ b/src/mscorlib/shared/System/MissingMethodException.cs @@ -20,19 +20,19 @@ public class MissingMethodException : MissingMemberException public MissingMethodException() : base(SR.Arg_MissingMethodException) { - HResult = __HResults.COR_E_MISSINGMETHOD; + HResult = HResults.COR_E_MISSINGMETHOD; } public MissingMethodException(string message) : base(message) { - HResult = __HResults.COR_E_MISSINGMETHOD; + HResult = HResults.COR_E_MISSINGMETHOD; } public MissingMethodException(string message, Exception inner) : base(message, inner) { - HResult = __HResults.COR_E_MISSINGMETHOD; + HResult = HResults.COR_E_MISSINGMETHOD; } public MissingMethodException(string className, string methodName) diff --git a/src/mscorlib/shared/System/MulticastNotSupportedException.cs b/src/mscorlib/shared/System/MulticastNotSupportedException.cs index 493671e227c9..56a3ec9c0047 100644 --- a/src/mscorlib/shared/System/MulticastNotSupportedException.cs +++ b/src/mscorlib/shared/System/MulticastNotSupportedException.cs @@ -16,19 +16,19 @@ public sealed class MulticastNotSupportedException : SystemException public MulticastNotSupportedException() : base(SR.Arg_MulticastNotSupportedException) { - HResult = __HResults.COR_E_MULTICASTNOTSUPPORTED; + HResult = HResults.COR_E_MULTICASTNOTSUPPORTED; } public MulticastNotSupportedException(String message) : base(message) { - HResult = __HResults.COR_E_MULTICASTNOTSUPPORTED; + HResult = HResults.COR_E_MULTICASTNOTSUPPORTED; } public MulticastNotSupportedException(String message, Exception inner) : base(message, inner) { - HResult = __HResults.COR_E_MULTICASTNOTSUPPORTED; + HResult = HResults.COR_E_MULTICASTNOTSUPPORTED; } } } diff --git a/src/mscorlib/shared/System/NotFiniteNumberException.cs b/src/mscorlib/shared/System/NotFiniteNumberException.cs index 99882b9eb2e7..ca47a21e5c9a 100644 --- a/src/mscorlib/shared/System/NotFiniteNumberException.cs +++ b/src/mscorlib/shared/System/NotFiniteNumberException.cs @@ -14,41 +14,41 @@ public NotFiniteNumberException() : base(SR.Arg_NotFiniteNumberException) { _offendingNumber = 0; - HResult = __HResults.COR_E_NOTFINITENUMBER; + HResult = HResults.COR_E_NOTFINITENUMBER; } public NotFiniteNumberException(double offendingNumber) : base() { _offendingNumber = offendingNumber; - HResult = __HResults.COR_E_NOTFINITENUMBER; + HResult = HResults.COR_E_NOTFINITENUMBER; } public NotFiniteNumberException(String message) : base(message) { _offendingNumber = 0; - HResult = __HResults.COR_E_NOTFINITENUMBER; + HResult = HResults.COR_E_NOTFINITENUMBER; } public NotFiniteNumberException(String message, double offendingNumber) : base(message) { _offendingNumber = offendingNumber; - HResult = __HResults.COR_E_NOTFINITENUMBER; + HResult = HResults.COR_E_NOTFINITENUMBER; } public NotFiniteNumberException(String message, Exception innerException) : base(message, innerException) { - HResult = __HResults.COR_E_NOTFINITENUMBER; + HResult = HResults.COR_E_NOTFINITENUMBER; } public NotFiniteNumberException(String message, double offendingNumber, Exception innerException) : base(message, innerException) { _offendingNumber = offendingNumber; - HResult = __HResults.COR_E_NOTFINITENUMBER; + HResult = HResults.COR_E_NOTFINITENUMBER; } protected NotFiniteNumberException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/src/mscorlib/shared/System/NotImplementedException.cs b/src/mscorlib/shared/System/NotImplementedException.cs index ae62527fac67..98976c19db20 100644 --- a/src/mscorlib/shared/System/NotImplementedException.cs +++ b/src/mscorlib/shared/System/NotImplementedException.cs @@ -21,17 +21,17 @@ public class NotImplementedException : SystemException public NotImplementedException() : base(SR.Arg_NotImplementedException) { - HResult = __HResults.E_NOTIMPL; + HResult = HResults.E_NOTIMPL; } public NotImplementedException(String message) : base(message) { - HResult = __HResults.E_NOTIMPL; + HResult = HResults.E_NOTIMPL; } public NotImplementedException(String message, Exception inner) : base(message, inner) { - HResult = __HResults.E_NOTIMPL; + HResult = HResults.E_NOTIMPL; } protected NotImplementedException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/src/mscorlib/shared/System/NotSupportedException.cs b/src/mscorlib/shared/System/NotSupportedException.cs index 8532e5ad2f4e..dc43261fbd06 100644 --- a/src/mscorlib/shared/System/NotSupportedException.cs +++ b/src/mscorlib/shared/System/NotSupportedException.cs @@ -20,19 +20,19 @@ public class NotSupportedException : SystemException public NotSupportedException() : base(SR.Arg_NotSupportedException) { - HResult = __HResults.COR_E_NOTSUPPORTED; + HResult = HResults.COR_E_NOTSUPPORTED; } public NotSupportedException(String message) : base(message) { - HResult = __HResults.COR_E_NOTSUPPORTED; + HResult = HResults.COR_E_NOTSUPPORTED; } public NotSupportedException(String message, Exception innerException) : base(message, innerException) { - HResult = __HResults.COR_E_NOTSUPPORTED; + HResult = HResults.COR_E_NOTSUPPORTED; } protected NotSupportedException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/src/mscorlib/shared/System/NullReferenceException.cs b/src/mscorlib/shared/System/NullReferenceException.cs index f689345654d9..eb6d709dbf6d 100644 --- a/src/mscorlib/shared/System/NullReferenceException.cs +++ b/src/mscorlib/shared/System/NullReferenceException.cs @@ -20,19 +20,19 @@ public class NullReferenceException : SystemException public NullReferenceException() : base(SR.Arg_NullReferenceException) { - HResult = __HResults.COR_E_NULLREFERENCE; + HResult = HResults.COR_E_NULLREFERENCE; } public NullReferenceException(String message) : base(message) { - HResult = __HResults.COR_E_NULLREFERENCE; + HResult = HResults.COR_E_NULLREFERENCE; } public NullReferenceException(String message, Exception innerException) : base(message, innerException) { - HResult = __HResults.COR_E_NULLREFERENCE; + HResult = HResults.COR_E_NULLREFERENCE; } protected NullReferenceException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/src/mscorlib/shared/System/ObjectDisposedException.cs b/src/mscorlib/shared/System/ObjectDisposedException.cs index 6e8e6b2d74b0..3d7ba5df158a 100644 --- a/src/mscorlib/shared/System/ObjectDisposedException.cs +++ b/src/mscorlib/shared/System/ObjectDisposedException.cs @@ -28,14 +28,14 @@ public ObjectDisposedException(String objectName) : public ObjectDisposedException(String objectName, String message) : base(message) { - HResult = __HResults.COR_E_OBJECTDISPOSED; + HResult = HResults.COR_E_OBJECTDISPOSED; _objectName = objectName; } public ObjectDisposedException(String message, Exception innerException) : base(message, innerException) { - HResult = __HResults.COR_E_OBJECTDISPOSED; + HResult = HResults.COR_E_OBJECTDISPOSED; } protected ObjectDisposedException(SerializationInfo info, StreamingContext context) diff --git a/src/mscorlib/shared/System/OperationCanceledException.cs b/src/mscorlib/shared/System/OperationCanceledException.cs index 2c7654854f8b..44a0427c58d3 100644 --- a/src/mscorlib/shared/System/OperationCanceledException.cs +++ b/src/mscorlib/shared/System/OperationCanceledException.cs @@ -31,19 +31,19 @@ public CancellationToken CancellationToken public OperationCanceledException() : base(SR.OperationCanceled) { - HResult = __HResults.COR_E_OPERATIONCANCELED; + HResult = HResults.COR_E_OPERATIONCANCELED; } public OperationCanceledException(String message) : base(message) { - HResult = __HResults.COR_E_OPERATIONCANCELED; + HResult = HResults.COR_E_OPERATIONCANCELED; } public OperationCanceledException(String message, Exception innerException) : base(message, innerException) { - HResult = __HResults.COR_E_OPERATIONCANCELED; + HResult = HResults.COR_E_OPERATIONCANCELED; } diff --git a/src/mscorlib/shared/System/OverflowException.cs b/src/mscorlib/shared/System/OverflowException.cs index 4052e41a186f..bf6676ca2cb7 100644 --- a/src/mscorlib/shared/System/OverflowException.cs +++ b/src/mscorlib/shared/System/OverflowException.cs @@ -20,19 +20,19 @@ public class OverflowException : ArithmeticException public OverflowException() : base(SR.Arg_OverflowException) { - HResult = __HResults.COR_E_OVERFLOW; + HResult = HResults.COR_E_OVERFLOW; } public OverflowException(String message) : base(message) { - HResult = __HResults.COR_E_OVERFLOW; + HResult = HResults.COR_E_OVERFLOW; } public OverflowException(String message, Exception innerException) : base(message, innerException) { - HResult = __HResults.COR_E_OVERFLOW; + HResult = HResults.COR_E_OVERFLOW; } protected OverflowException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/src/mscorlib/shared/System/PlatformNotSupportedException.cs b/src/mscorlib/shared/System/PlatformNotSupportedException.cs index f679ac94544d..4403c1da0614 100644 --- a/src/mscorlib/shared/System/PlatformNotSupportedException.cs +++ b/src/mscorlib/shared/System/PlatformNotSupportedException.cs @@ -20,19 +20,19 @@ public class PlatformNotSupportedException : NotSupportedException public PlatformNotSupportedException() : base(SR.Arg_PlatformNotSupported) { - HResult = __HResults.COR_E_PLATFORMNOTSUPPORTED; + HResult = HResults.COR_E_PLATFORMNOTSUPPORTED; } public PlatformNotSupportedException(String message) : base(message) { - HResult = __HResults.COR_E_PLATFORMNOTSUPPORTED; + HResult = HResults.COR_E_PLATFORMNOTSUPPORTED; } public PlatformNotSupportedException(String message, Exception inner) : base(message, inner) { - HResult = __HResults.COR_E_PLATFORMNOTSUPPORTED; + HResult = HResults.COR_E_PLATFORMNOTSUPPORTED; } protected PlatformNotSupportedException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/src/mscorlib/shared/System/RankException.cs b/src/mscorlib/shared/System/RankException.cs index 15759ea75d59..f2c5d06548aa 100644 --- a/src/mscorlib/shared/System/RankException.cs +++ b/src/mscorlib/shared/System/RankException.cs @@ -21,19 +21,19 @@ public class RankException : SystemException public RankException() : base(SR.Arg_RankException) { - HResult = __HResults.COR_E_RANK; + HResult = HResults.COR_E_RANK; } public RankException(String message) : base(message) { - HResult = __HResults.COR_E_RANK; + HResult = HResults.COR_E_RANK; } public RankException(String message, Exception innerException) : base(message, innerException) { - HResult = __HResults.COR_E_RANK; + HResult = HResults.COR_E_RANK; } protected RankException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/src/mscorlib/shared/System/Reflection/AmbiguousMatchException.cs b/src/mscorlib/shared/System/Reflection/AmbiguousMatchException.cs index a0075bbc0b51..c4aeca704db0 100644 --- a/src/mscorlib/shared/System/Reflection/AmbiguousMatchException.cs +++ b/src/mscorlib/shared/System/Reflection/AmbiguousMatchException.cs @@ -11,19 +11,19 @@ public sealed class AmbiguousMatchException : SystemException public AmbiguousMatchException() : base(SR.RFLCT_Ambiguous) { - HResult = __HResults.COR_E_AMBIGUOUSMATCH; + HResult = HResults.COR_E_AMBIGUOUSMATCH; } public AmbiguousMatchException(string message) : base(message) { - HResult = __HResults.COR_E_AMBIGUOUSMATCH; + HResult = HResults.COR_E_AMBIGUOUSMATCH; } public AmbiguousMatchException(string message, Exception inner) : base(message, inner) { - HResult = __HResults.COR_E_AMBIGUOUSMATCH; + HResult = HResults.COR_E_AMBIGUOUSMATCH; } } } diff --git a/src/mscorlib/shared/System/Reflection/CustomAttributeFormatException.cs b/src/mscorlib/shared/System/Reflection/CustomAttributeFormatException.cs index 13766ae8d0db..ae67158a53b8 100644 --- a/src/mscorlib/shared/System/Reflection/CustomAttributeFormatException.cs +++ b/src/mscorlib/shared/System/Reflection/CustomAttributeFormatException.cs @@ -21,7 +21,7 @@ public CustomAttributeFormatException(string message) public CustomAttributeFormatException(string message, Exception inner) : base(message, inner) { - HResult = __HResults.COR_E_CUSTOMATTRIBUTEFORMAT; + HResult = HResults.COR_E_CUSTOMATTRIBUTEFORMAT; } protected CustomAttributeFormatException(SerializationInfo info, StreamingContext context) diff --git a/src/mscorlib/shared/System/Reflection/InvalidFilterCriteriaException.cs b/src/mscorlib/shared/System/Reflection/InvalidFilterCriteriaException.cs index 07880a768dff..85a447707cd1 100644 --- a/src/mscorlib/shared/System/Reflection/InvalidFilterCriteriaException.cs +++ b/src/mscorlib/shared/System/Reflection/InvalidFilterCriteriaException.cs @@ -21,7 +21,7 @@ public InvalidFilterCriteriaException(string message) public InvalidFilterCriteriaException(string message, Exception inner) : base(message, inner) { - HResult = __HResults.COR_E_INVALIDFILTERCRITERIA; + HResult = HResults.COR_E_INVALIDFILTERCRITERIA; } protected InvalidFilterCriteriaException(SerializationInfo info, StreamingContext context) diff --git a/src/mscorlib/shared/System/Reflection/ReflectionTypeLoadException.cs b/src/mscorlib/shared/System/Reflection/ReflectionTypeLoadException.cs index ca0c6ab0db56..0e86d340566f 100644 --- a/src/mscorlib/shared/System/Reflection/ReflectionTypeLoadException.cs +++ b/src/mscorlib/shared/System/Reflection/ReflectionTypeLoadException.cs @@ -13,7 +13,7 @@ public ReflectionTypeLoadException(Type[] classes, Exception[] exceptions) { 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 @@ public ReflectionTypeLoadException(Type[] classes, Exception[] exceptions, strin { Types = classes; LoaderExceptions = exceptions; - HResult = __HResults.COR_E_REFLECTIONTYPELOAD; + HResult = HResults.COR_E_REFLECTIONTYPELOAD; } public override void GetObjectData(SerializationInfo info, StreamingContext context) diff --git a/src/mscorlib/shared/System/Reflection/TargetException.cs b/src/mscorlib/shared/System/Reflection/TargetException.cs index 6e43f56fa44d..2309daace1b2 100644 --- a/src/mscorlib/shared/System/Reflection/TargetException.cs +++ b/src/mscorlib/shared/System/Reflection/TargetException.cs @@ -21,7 +21,7 @@ public TargetException(string message) public TargetException(string message, Exception inner) : base(message, inner) { - HResult = __HResults.COR_E_TARGET; + HResult = HResults.COR_E_TARGET; } protected TargetException(SerializationInfo info, StreamingContext context) diff --git a/src/mscorlib/shared/System/Reflection/TargetInvocationException.cs b/src/mscorlib/shared/System/Reflection/TargetInvocationException.cs index 8d0bfef40df2..7c4f60a03ed7 100644 --- a/src/mscorlib/shared/System/Reflection/TargetInvocationException.cs +++ b/src/mscorlib/shared/System/Reflection/TargetInvocationException.cs @@ -11,13 +11,13 @@ public sealed class TargetInvocationException : ApplicationException public TargetInvocationException(Exception inner) : base(SR.Arg_TargetInvocationException, inner) { - HResult = __HResults.COR_E_TARGETINVOCATION; + HResult = HResults.COR_E_TARGETINVOCATION; } public TargetInvocationException(string message, Exception inner) : base(message, inner) { - HResult = __HResults.COR_E_TARGETINVOCATION; + HResult = HResults.COR_E_TARGETINVOCATION; } } } diff --git a/src/mscorlib/shared/System/Reflection/TargetParameterCountException.cs b/src/mscorlib/shared/System/Reflection/TargetParameterCountException.cs index e200cdb94fa6..f31758b7ba9e 100644 --- a/src/mscorlib/shared/System/Reflection/TargetParameterCountException.cs +++ b/src/mscorlib/shared/System/Reflection/TargetParameterCountException.cs @@ -11,19 +11,19 @@ public sealed class TargetParameterCountException : ApplicationException public TargetParameterCountException() : base(SR.Arg_TargetParameterCountException) { - HResult = __HResults.COR_E_TARGETPARAMCOUNT; + HResult = HResults.COR_E_TARGETPARAMCOUNT; } public TargetParameterCountException(string message) : base(message) { - HResult = __HResults.COR_E_TARGETPARAMCOUNT; + HResult = HResults.COR_E_TARGETPARAMCOUNT; } public TargetParameterCountException(string message, Exception inner) : base(message, inner) { - HResult = __HResults.COR_E_TARGETPARAMCOUNT; + HResult = HResults.COR_E_TARGETPARAMCOUNT; } } } diff --git a/src/mscorlib/shared/System/Resources/MissingManifestResourceException.cs b/src/mscorlib/shared/System/Resources/MissingManifestResourceException.cs index ec814393d078..e11d15d20078 100644 --- a/src/mscorlib/shared/System/Resources/MissingManifestResourceException.cs +++ b/src/mscorlib/shared/System/Resources/MissingManifestResourceException.cs @@ -12,19 +12,19 @@ public class MissingManifestResourceException : SystemException public MissingManifestResourceException() : base(SR.Arg_MissingManifestResourceException) { - HResult = System.__HResults.COR_E_MISSINGMANIFESTRESOURCE; + HResult = System.HResults.COR_E_MISSINGMANIFESTRESOURCE; } public MissingManifestResourceException(string message) : base(message) { - HResult = System.__HResults.COR_E_MISSINGMANIFESTRESOURCE; + HResult = System.HResults.COR_E_MISSINGMANIFESTRESOURCE; } public MissingManifestResourceException(string message, Exception inner) : base(message, inner) { - HResult = System.__HResults.COR_E_MISSINGMANIFESTRESOURCE; + HResult = System.HResults.COR_E_MISSINGMANIFESTRESOURCE; } protected MissingManifestResourceException(SerializationInfo info, StreamingContext context) diff --git a/src/mscorlib/shared/System/Resources/MissingSatelliteAssemblyException.cs b/src/mscorlib/shared/System/Resources/MissingSatelliteAssemblyException.cs index d2ddc992ace0..615aed6a8c2b 100644 --- a/src/mscorlib/shared/System/Resources/MissingSatelliteAssemblyException.cs +++ b/src/mscorlib/shared/System/Resources/MissingSatelliteAssemblyException.cs @@ -27,26 +27,26 @@ public class MissingSatelliteAssemblyException : SystemException public MissingSatelliteAssemblyException() : base(SR.MissingSatelliteAssembly_Default) { - HResult = System.__HResults.COR_E_MISSINGSATELLITEASSEMBLY; + HResult = System.HResults.COR_E_MISSINGSATELLITEASSEMBLY; } public MissingSatelliteAssemblyException(string message) : base(message) { - HResult = System.__HResults.COR_E_MISSINGSATELLITEASSEMBLY; + HResult = System.HResults.COR_E_MISSINGSATELLITEASSEMBLY; } public MissingSatelliteAssemblyException(string message, String cultureName) : base(message) { - HResult = System.__HResults.COR_E_MISSINGSATELLITEASSEMBLY; + HResult = System.HResults.COR_E_MISSINGSATELLITEASSEMBLY; _cultureName = cultureName; } public MissingSatelliteAssemblyException(string message, Exception inner) : base(message, inner) { - HResult = System.__HResults.COR_E_MISSINGSATELLITEASSEMBLY; + HResult = System.HResults.COR_E_MISSINGSATELLITEASSEMBLY; } protected MissingSatelliteAssemblyException(SerializationInfo info, StreamingContext context) diff --git a/src/mscorlib/shared/System/Runtime/InteropServices/ExternalException.cs b/src/mscorlib/shared/System/Runtime/InteropServices/ExternalException.cs index 81b9a4692801..0861d1936217 100644 --- a/src/mscorlib/shared/System/Runtime/InteropServices/ExternalException.cs +++ b/src/mscorlib/shared/System/Runtime/InteropServices/ExternalException.cs @@ -26,19 +26,19 @@ public class ExternalException : SystemException public ExternalException() : base(SR.Arg_ExternalException) { - HResult = __HResults.E_FAIL; + HResult = HResults.E_FAIL; } public ExternalException(string message) : base(message) { - HResult = __HResults.E_FAIL; + HResult = HResults.E_FAIL; } public ExternalException(string message, Exception inner) : base(message, inner) { - HResult = __HResults.E_FAIL; + HResult = HResults.E_FAIL; } public ExternalException(string message, int errorCode) diff --git a/src/mscorlib/shared/System/Runtime/Serialization/SerializationException.cs b/src/mscorlib/shared/System/Runtime/Serialization/SerializationException.cs index bfe33136593f..3e0af092c007 100644 --- a/src/mscorlib/shared/System/Runtime/Serialization/SerializationException.cs +++ b/src/mscorlib/shared/System/Runtime/Serialization/SerializationException.cs @@ -15,19 +15,19 @@ public class SerializationException : SystemException public SerializationException() : base(s_nullMessage) { - HResult = __HResults.COR_E_SERIALIZATION; + HResult = HResults.COR_E_SERIALIZATION; } public SerializationException(String message) : base(message) { - HResult = __HResults.COR_E_SERIALIZATION; + HResult = HResults.COR_E_SERIALIZATION; } public SerializationException(String message, Exception innerException) : base(message, innerException) { - HResult = __HResults.COR_E_SERIALIZATION; + HResult = HResults.COR_E_SERIALIZATION; } protected SerializationException(SerializationInfo info, StreamingContext context) diff --git a/src/mscorlib/shared/System/Security/SecurityException.cs b/src/mscorlib/shared/System/Security/SecurityException.cs index 538f47534323..2866a4780c8e 100644 --- a/src/mscorlib/shared/System/Security/SecurityException.cs +++ b/src/mscorlib/shared/System/Security/SecurityException.cs @@ -12,32 +12,32 @@ public class SecurityException : SystemException public SecurityException() : base(SR.Arg_SecurityException) { - HResult = __HResults.COR_E_SECURITY; + HResult = HResults.COR_E_SECURITY; } public SecurityException(string message) : base(message) { - HResult = __HResults.COR_E_SECURITY; + HResult = HResults.COR_E_SECURITY; } public SecurityException(string message, Exception inner) : base(message, inner) { - HResult = __HResults.COR_E_SECURITY; + HResult = HResults.COR_E_SECURITY; } public SecurityException(string message, Type type) : base(message) { - HResult = __HResults.COR_E_SECURITY; + HResult = HResults.COR_E_SECURITY; PermissionType = type; } public SecurityException(string message, Type type, string state) : base(message) { - HResult = __HResults.COR_E_SECURITY; + HResult = HResults.COR_E_SECURITY; PermissionType = type; PermissionState = state; } diff --git a/src/mscorlib/shared/System/Security/VerificationException.cs b/src/mscorlib/shared/System/Security/VerificationException.cs index ea5a75906ecb..bd095f3df44a 100644 --- a/src/mscorlib/shared/System/Security/VerificationException.cs +++ b/src/mscorlib/shared/System/Security/VerificationException.cs @@ -11,19 +11,19 @@ public class VerificationException : SystemException public VerificationException() : base(SR.Verification_Exception) { - HResult = __HResults.COR_E_VERIFICATION; + HResult = HResults.COR_E_VERIFICATION; } public VerificationException(string message) : base(message) { - HResult = __HResults.COR_E_VERIFICATION; + HResult = HResults.COR_E_VERIFICATION; } public VerificationException(string message, Exception innerException) : base(message, innerException) { - HResult = __HResults.COR_E_VERIFICATION; + HResult = HResults.COR_E_VERIFICATION; } protected VerificationException(SerializationInfo info, StreamingContext context) diff --git a/src/mscorlib/shared/System/StackOverflowException.cs b/src/mscorlib/shared/System/StackOverflowException.cs index fb0e88246c16..8b21eb769a3c 100644 --- a/src/mscorlib/shared/System/StackOverflowException.cs +++ b/src/mscorlib/shared/System/StackOverflowException.cs @@ -20,19 +20,19 @@ public sealed class StackOverflowException : SystemException public StackOverflowException() : base(SR.Arg_StackOverflowException) { - HResult = __HResults.COR_E_STACKOVERFLOW; + HResult = HResults.COR_E_STACKOVERFLOW; } public StackOverflowException(String message) : base(message) { - HResult = __HResults.COR_E_STACKOVERFLOW; + HResult = HResults.COR_E_STACKOVERFLOW; } public StackOverflowException(String message, Exception innerException) : base(message, innerException) { - HResult = __HResults.COR_E_STACKOVERFLOW; + HResult = HResults.COR_E_STACKOVERFLOW; } } } diff --git a/src/mscorlib/shared/System/SystemException.cs b/src/mscorlib/shared/System/SystemException.cs index d5bcde7efc28..64a4b9ca31fa 100644 --- a/src/mscorlib/shared/System/SystemException.cs +++ b/src/mscorlib/shared/System/SystemException.cs @@ -11,19 +11,19 @@ public class SystemException : Exception public SystemException() : base(SR.Arg_SystemException) { - HResult = __HResults.COR_E_SYSTEM; + HResult = HResults.COR_E_SYSTEM; } public SystemException(String message) : base(message) { - HResult = __HResults.COR_E_SYSTEM; + HResult = HResults.COR_E_SYSTEM; } public SystemException(String message, Exception innerException) : base(message, innerException) { - HResult = __HResults.COR_E_SYSTEM; + HResult = HResults.COR_E_SYSTEM; } protected SystemException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/src/mscorlib/shared/System/Text/DecoderExceptionFallback.cs b/src/mscorlib/shared/System/Text/DecoderExceptionFallback.cs index b465aa68efef..26d604a919bc 100644 --- a/src/mscorlib/shared/System/Text/DecoderExceptionFallback.cs +++ b/src/mscorlib/shared/System/Text/DecoderExceptionFallback.cs @@ -106,19 +106,19 @@ public sealed class DecoderFallbackException : ArgumentException public DecoderFallbackException() : base(SR.Arg_ArgumentException) { - HResult = __HResults.COR_E_ARGUMENT; + HResult = HResults.COR_E_ARGUMENT; } public DecoderFallbackException(String message) : base(message) { - HResult = __HResults.COR_E_ARGUMENT; + HResult = HResults.COR_E_ARGUMENT; } public DecoderFallbackException(String message, Exception innerException) : base(message, innerException) { - HResult = __HResults.COR_E_ARGUMENT; + HResult = HResults.COR_E_ARGUMENT; } public DecoderFallbackException(String message, byte[] bytesUnknown, int index) diff --git a/src/mscorlib/shared/System/Text/EncoderExceptionFallback.cs b/src/mscorlib/shared/System/Text/EncoderExceptionFallback.cs index 98eff25b94e2..71426e5f312d 100644 --- a/src/mscorlib/shared/System/Text/EncoderExceptionFallback.cs +++ b/src/mscorlib/shared/System/Text/EncoderExceptionFallback.cs @@ -108,19 +108,19 @@ public sealed class EncoderFallbackException : ArgumentException public EncoderFallbackException() : base(SR.Arg_ArgumentException) { - HResult = __HResults.COR_E_ARGUMENT; + HResult = HResults.COR_E_ARGUMENT; } public EncoderFallbackException(String message) : base(message) { - HResult = __HResults.COR_E_ARGUMENT; + HResult = HResults.COR_E_ARGUMENT; } public EncoderFallbackException(String message, Exception innerException) : base(message, innerException) { - HResult = __HResults.COR_E_ARGUMENT; + HResult = HResults.COR_E_ARGUMENT; } internal EncoderFallbackException( diff --git a/src/mscorlib/shared/System/Threading/AbandonedMutexException.cs b/src/mscorlib/shared/System/Threading/AbandonedMutexException.cs index 15bc5a7341e4..c43148d22ac0 100644 --- a/src/mscorlib/shared/System/Threading/AbandonedMutexException.cs +++ b/src/mscorlib/shared/System/Threading/AbandonedMutexException.cs @@ -22,39 +22,39 @@ public class AbandonedMutexException : SystemException public AbandonedMutexException() : base(SR.Threading_AbandonedMutexException) { - HResult = __HResults.COR_E_ABANDONEDMUTEX; + HResult = HResults.COR_E_ABANDONEDMUTEX; } public AbandonedMutexException(String message) : base(message) { - HResult = __HResults.COR_E_ABANDONEDMUTEX; + HResult = HResults.COR_E_ABANDONEDMUTEX; } public AbandonedMutexException(String message, Exception inner) : base(message, inner) { - HResult = __HResults.COR_E_ABANDONEDMUTEX; + HResult = HResults.COR_E_ABANDONEDMUTEX; } public AbandonedMutexException(int location, WaitHandle handle) : base(SR.Threading_AbandonedMutexException) { - HResult = __HResults.COR_E_ABANDONEDMUTEX; + HResult = HResults.COR_E_ABANDONEDMUTEX; SetupException(location, handle); } public AbandonedMutexException(String message, int location, WaitHandle handle) : base(message) { - HResult = __HResults.COR_E_ABANDONEDMUTEX; + HResult = HResults.COR_E_ABANDONEDMUTEX; SetupException(location, handle); } public AbandonedMutexException(String message, Exception inner, int location, WaitHandle handle) : base(message, inner) { - HResult = __HResults.COR_E_ABANDONEDMUTEX; + HResult = HResults.COR_E_ABANDONEDMUTEX; SetupException(location, handle); } diff --git a/src/mscorlib/shared/System/Threading/SynchronizationLockException.cs b/src/mscorlib/shared/System/Threading/SynchronizationLockException.cs index c64fc9ced8c5..5ab186ec9a65 100644 --- a/src/mscorlib/shared/System/Threading/SynchronizationLockException.cs +++ b/src/mscorlib/shared/System/Threading/SynchronizationLockException.cs @@ -21,19 +21,19 @@ public class SynchronizationLockException : SystemException public SynchronizationLockException() : base(SR.Arg_SynchronizationLockException) { - HResult = __HResults.COR_E_SYNCHRONIZATIONLOCK; + HResult = HResults.COR_E_SYNCHRONIZATIONLOCK; } public SynchronizationLockException(String message) : base(message) { - HResult = __HResults.COR_E_SYNCHRONIZATIONLOCK; + HResult = HResults.COR_E_SYNCHRONIZATIONLOCK; } public SynchronizationLockException(String message, Exception innerException) : base(message, innerException) { - HResult = __HResults.COR_E_SYNCHRONIZATIONLOCK; + HResult = HResults.COR_E_SYNCHRONIZATIONLOCK; } protected SynchronizationLockException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/src/mscorlib/shared/System/Threading/ThreadAbortException.cs b/src/mscorlib/shared/System/Threading/ThreadAbortException.cs index ebbc29a702c7..01fdf1317bfd 100644 --- a/src/mscorlib/shared/System/Threading/ThreadAbortException.cs +++ b/src/mscorlib/shared/System/Threading/ThreadAbortException.cs @@ -22,7 +22,7 @@ public sealed class ThreadAbortException : SystemException { internal ThreadAbortException() { - HResult = __HResults.COR_E_THREADABORTED; + HResult = HResults.COR_E_THREADABORTED; } public object ExceptionState => null; diff --git a/src/mscorlib/shared/System/Threading/ThreadStartException.cs b/src/mscorlib/shared/System/Threading/ThreadStartException.cs index 7a87943ed1d8..35930d1d2dc5 100644 --- a/src/mscorlib/shared/System/Threading/ThreadStartException.cs +++ b/src/mscorlib/shared/System/Threading/ThreadStartException.cs @@ -11,13 +11,13 @@ public sealed class ThreadStartException : SystemException internal ThreadStartException() : base(SR.Arg_ThreadStartException) { - HResult = __HResults.COR_E_THREADSTART; + HResult = HResults.COR_E_THREADSTART; } internal ThreadStartException(Exception reason) : base(SR.Arg_ThreadStartException, reason) { - HResult = __HResults.COR_E_THREADSTART; + HResult = HResults.COR_E_THREADSTART; } } } diff --git a/src/mscorlib/shared/System/Threading/ThreadStateException.cs b/src/mscorlib/shared/System/Threading/ThreadStateException.cs index 9477cb1ae4cb..d8f97a4f3bd5 100644 --- a/src/mscorlib/shared/System/Threading/ThreadStateException.cs +++ b/src/mscorlib/shared/System/Threading/ThreadStateException.cs @@ -21,19 +21,19 @@ public class ThreadStateException : SystemException public ThreadStateException() : base(SR.Arg_ThreadStateException) { - HResult = __HResults.COR_E_THREADSTATE; + HResult = HResults.COR_E_THREADSTATE; } public ThreadStateException(String message) : base(message) { - HResult = __HResults.COR_E_THREADSTATE; + HResult = HResults.COR_E_THREADSTATE; } public ThreadStateException(String message, Exception innerException) : base(message, innerException) { - HResult = __HResults.COR_E_THREADSTATE; + HResult = HResults.COR_E_THREADSTATE; } protected ThreadStateException(SerializationInfo info, StreamingContext context) diff --git a/src/mscorlib/shared/System/Threading/WaitHandleCannotBeOpenedException.cs b/src/mscorlib/shared/System/Threading/WaitHandleCannotBeOpenedException.cs index 770e70d7ab5b..47e127191d95 100644 --- a/src/mscorlib/shared/System/Threading/WaitHandleCannotBeOpenedException.cs +++ b/src/mscorlib/shared/System/Threading/WaitHandleCannotBeOpenedException.cs @@ -10,17 +10,17 @@ public class WaitHandleCannotBeOpenedException : ApplicationException { public WaitHandleCannotBeOpenedException() : base(SR.Threading_WaitHandleCannotBeOpenedException) { - HResult = __HResults.COR_E_WAITHANDLECANNOTBEOPENED; + HResult = HResults.COR_E_WAITHANDLECANNOTBEOPENED; } public WaitHandleCannotBeOpenedException(String message) : base(message) { - HResult = __HResults.COR_E_WAITHANDLECANNOTBEOPENED; + HResult = HResults.COR_E_WAITHANDLECANNOTBEOPENED; } public WaitHandleCannotBeOpenedException(String message, Exception innerException) : base(message, innerException) { - HResult = __HResults.COR_E_WAITHANDLECANNOTBEOPENED; + HResult = HResults.COR_E_WAITHANDLECANNOTBEOPENED; } protected WaitHandleCannotBeOpenedException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/src/mscorlib/shared/System/TimeoutException.cs b/src/mscorlib/shared/System/TimeoutException.cs index 4ba95bc47be1..b50ae2f9023f 100644 --- a/src/mscorlib/shared/System/TimeoutException.cs +++ b/src/mscorlib/shared/System/TimeoutException.cs @@ -20,19 +20,19 @@ public class TimeoutException : SystemException public TimeoutException() : base(SR.Arg_TimeoutException) { - HResult = __HResults.COR_E_TIMEOUT; + HResult = HResults.COR_E_TIMEOUT; } public TimeoutException(String message) : base(message) { - HResult = __HResults.COR_E_TIMEOUT; + HResult = HResults.COR_E_TIMEOUT; } public TimeoutException(String message, Exception innerException) : base(message, innerException) { - HResult = __HResults.COR_E_TIMEOUT; + HResult = HResults.COR_E_TIMEOUT; } protected TimeoutException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/src/mscorlib/shared/System/TypeAccessException.cs b/src/mscorlib/shared/System/TypeAccessException.cs index 302dcb1ac19f..ff081582b6a7 100644 --- a/src/mscorlib/shared/System/TypeAccessException.cs +++ b/src/mscorlib/shared/System/TypeAccessException.cs @@ -13,19 +13,19 @@ public class TypeAccessException : TypeLoadException public TypeAccessException() : base(SR.Arg_TypeAccessException) { - HResult = __HResults.COR_E_TYPEACCESS; + HResult = HResults.COR_E_TYPEACCESS; } public TypeAccessException(string message) : base(message) { - HResult = __HResults.COR_E_TYPEACCESS; + HResult = HResults.COR_E_TYPEACCESS; } public TypeAccessException(string message, Exception inner) : base(message, inner) { - HResult = __HResults.COR_E_TYPEACCESS; + HResult = HResults.COR_E_TYPEACCESS; } protected TypeAccessException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/src/mscorlib/shared/System/TypeInitializationException.cs b/src/mscorlib/shared/System/TypeInitializationException.cs index 8d0b8a9f791a..03a1bad3a74b 100644 --- a/src/mscorlib/shared/System/TypeInitializationException.cs +++ b/src/mscorlib/shared/System/TypeInitializationException.cs @@ -28,7 +28,7 @@ public sealed class TypeInitializationException : SystemException private TypeInitializationException() : base(SR.TypeInitialization_Default) { - HResult = __HResults.COR_E_TYPEINITIALIZATION; + HResult = HResults.COR_E_TYPEINITIALIZATION; } @@ -41,14 +41,14 @@ public TypeInitializationException(String fullTypeName, Exception innerException // for Interop only, though it's not particularly useful. internal TypeInitializationException(String message) : base(message) { - HResult = __HResults.COR_E_TYPEINITIALIZATION; + HResult = HResults.COR_E_TYPEINITIALIZATION; } internal TypeInitializationException(String fullTypeName, String message, Exception innerException) : base(message, innerException) { _typeName = fullTypeName; - HResult = __HResults.COR_E_TYPEINITIALIZATION; + HResult = HResults.COR_E_TYPEINITIALIZATION; } public override void GetObjectData(SerializationInfo info, StreamingContext context) diff --git a/src/mscorlib/shared/System/TypeUnloadedException.cs b/src/mscorlib/shared/System/TypeUnloadedException.cs index c7ed71c9cb55..97039bb8f1de 100644 --- a/src/mscorlib/shared/System/TypeUnloadedException.cs +++ b/src/mscorlib/shared/System/TypeUnloadedException.cs @@ -11,19 +11,19 @@ public class TypeUnloadedException : SystemException public TypeUnloadedException() : base(SR.Arg_TypeUnloadedException) { - HResult = __HResults.COR_E_TYPEUNLOADED; + HResult = HResults.COR_E_TYPEUNLOADED; } public TypeUnloadedException(string message) : base(message) { - HResult = __HResults.COR_E_TYPEUNLOADED; + HResult = HResults.COR_E_TYPEUNLOADED; } public TypeUnloadedException(string message, Exception innerException) : base(message, innerException) { - HResult = __HResults.COR_E_TYPEUNLOADED; + HResult = HResults.COR_E_TYPEUNLOADED; } protected TypeUnloadedException(SerializationInfo info, StreamingContext context) diff --git a/src/mscorlib/shared/System/UnauthorizedAccessException.cs b/src/mscorlib/shared/System/UnauthorizedAccessException.cs index 667d57629294..679a1a762ddc 100644 --- a/src/mscorlib/shared/System/UnauthorizedAccessException.cs +++ b/src/mscorlib/shared/System/UnauthorizedAccessException.cs @@ -24,19 +24,19 @@ public class UnauthorizedAccessException : SystemException public UnauthorizedAccessException() : base(SR.Arg_UnauthorizedAccessException) { - HResult = __HResults.COR_E_UNAUTHORIZEDACCESS; + HResult = HResults.COR_E_UNAUTHORIZEDACCESS; } public UnauthorizedAccessException(String message) : base(message) { - HResult = __HResults.COR_E_UNAUTHORIZEDACCESS; + HResult = HResults.COR_E_UNAUTHORIZEDACCESS; } public UnauthorizedAccessException(String message, Exception inner) : base(message, inner) { - HResult = __HResults.COR_E_UNAUTHORIZEDACCESS; + HResult = HResults.COR_E_UNAUTHORIZEDACCESS; } protected UnauthorizedAccessException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/src/mscorlib/src/System/AccessViolationException.cs b/src/mscorlib/src/System/AccessViolationException.cs index 23d086fb428e..103a4c0a9d9c 100644 --- a/src/mscorlib/src/System/AccessViolationException.cs +++ b/src/mscorlib/src/System/AccessViolationException.cs @@ -21,19 +21,19 @@ public class AccessViolationException : SystemException public AccessViolationException() : base(SR.Arg_AccessViolationException) { - HResult = __HResults.E_POINTER; + HResult = HResults.E_POINTER; } public AccessViolationException(String message) : base(message) { - HResult = __HResults.E_POINTER; + HResult = HResults.E_POINTER; } public AccessViolationException(String message, Exception innerException) : base(message, innerException) { - HResult = __HResults.E_POINTER; + HResult = HResults.E_POINTER; } protected AccessViolationException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/src/mscorlib/src/System/AppDomainUnloadedException.cs b/src/mscorlib/src/System/AppDomainUnloadedException.cs index a5e74e2b23a9..b673d8c9984b 100644 --- a/src/mscorlib/src/System/AppDomainUnloadedException.cs +++ b/src/mscorlib/src/System/AppDomainUnloadedException.cs @@ -21,7 +21,7 @@ internal class AppDomainUnloadedException : SystemException public AppDomainUnloadedException() : base(SR.Arg_AppDomainUnloadedException) { - HResult = __HResults.COR_E_APPDOMAINUNLOADED; + HResult = HResults.COR_E_APPDOMAINUNLOADED; } // diff --git a/src/mscorlib/src/System/Exception.cs b/src/mscorlib/src/System/Exception.cs index 7f886aebcbd8..785637d1bac8 100644 --- a/src/mscorlib/src/System/Exception.cs +++ b/src/mscorlib/src/System/Exception.cs @@ -36,7 +36,7 @@ private void Init() _message = null; _stackTrace = null; _dynamicMethods = null; - HResult = __HResults.COR_E_EXCEPTION; + HResult = HResults.COR_E_EXCEPTION; _xcode = _COMPlusExceptionCode; _xptrs = (IntPtr)0; diff --git a/src/mscorlib/src/System/__HResults.cs b/src/mscorlib/src/System/HResults.cs similarity index 98% rename from src/mscorlib/src/System/__HResults.cs rename to src/mscorlib/src/System/HResults.cs index 6868f1fa694b..795791ed990e 100644 --- a/src/mscorlib/src/System/__HResults.cs +++ b/src/mscorlib/src/System/HResults.cs @@ -20,14 +20,12 @@ // 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 static class HResults { internal const int RO_E_CLOSED = unchecked((int)0x80000013); internal const int E_BOUNDS = unchecked((int)0x8000000B); diff --git a/src/mscorlib/src/System/IO/FileLoadException.CoreCLR.cs b/src/mscorlib/src/System/IO/FileLoadException.CoreCLR.cs index d4ce9a9ab9eb..bd3504580b89 100644 --- a/src/mscorlib/src/System/IO/FileLoadException.CoreCLR.cs +++ b/src/mscorlib/src/System/IO/FileLoadException.CoreCLR.cs @@ -27,7 +27,7 @@ internal static string FormatFileLoadExceptionMessage(string fileName, int hResu GetFileLoadExceptionMessage(hResult, JitHelpers.GetStringHandleOnStack(ref format)); string message = null; - if (hResult == System.__HResults.COR_E_BADEXEFORMAT) + if (hResult == System.HResults.COR_E_BADEXEFORMAT) message = SR.Arg_BadImageFormatException; else GetMessageForHR(hResult, JitHelpers.GetStringHandleOnStack(ref message)); diff --git a/src/mscorlib/src/System/InsufficientMemoryException.cs b/src/mscorlib/src/System/InsufficientMemoryException.cs index 8f7aa96ff75c..b4bc588f18d4 100644 --- a/src/mscorlib/src/System/InsufficientMemoryException.cs +++ b/src/mscorlib/src/System/InsufficientMemoryException.cs @@ -27,19 +27,19 @@ public sealed class InsufficientMemoryException : OutOfMemoryException public InsufficientMemoryException() : base(GetMessageFromNativeResources(ExceptionMessageKind.OutOfMemory)) { - HResult = __HResults.COR_E_INSUFFICIENTMEMORY; + HResult = HResults.COR_E_INSUFFICIENTMEMORY; } public InsufficientMemoryException(String message) : base(message) { - HResult = __HResults.COR_E_INSUFFICIENTMEMORY; + HResult = HResults.COR_E_INSUFFICIENTMEMORY; } public InsufficientMemoryException(String message, Exception innerException) : base(message, innerException) { - HResult = __HResults.COR_E_INSUFFICIENTMEMORY; + HResult = HResults.COR_E_INSUFFICIENTMEMORY; } } } diff --git a/src/mscorlib/src/System/MissingFieldException.cs b/src/mscorlib/src/System/MissingFieldException.cs index 668d5f2a31cf..31931bf91c70 100644 --- a/src/mscorlib/src/System/MissingFieldException.cs +++ b/src/mscorlib/src/System/MissingFieldException.cs @@ -22,19 +22,19 @@ public class MissingFieldException : MissingMemberException, ISerializable public MissingFieldException() : base(SR.Arg_MissingFieldException) { - HResult = __HResults.COR_E_MISSINGFIELD; + HResult = HResults.COR_E_MISSINGFIELD; } public MissingFieldException(String message) : base(message) { - HResult = __HResults.COR_E_MISSINGFIELD; + HResult = HResults.COR_E_MISSINGFIELD; } public MissingFieldException(String message, Exception inner) : base(message, inner) { - HResult = __HResults.COR_E_MISSINGFIELD; + HResult = HResults.COR_E_MISSINGFIELD; } protected MissingFieldException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/src/mscorlib/src/System/MissingMemberException.cs b/src/mscorlib/src/System/MissingMemberException.cs index 1fb0c55e4089..def3c39824bd 100644 --- a/src/mscorlib/src/System/MissingMemberException.cs +++ b/src/mscorlib/src/System/MissingMemberException.cs @@ -26,19 +26,19 @@ public class MissingMemberException : MemberAccessException, ISerializable public MissingMemberException() : base(SR.Arg_MissingMemberException) { - HResult = __HResults.COR_E_MISSINGMEMBER; + HResult = HResults.COR_E_MISSINGMEMBER; } public MissingMemberException(String message) : base(message) { - HResult = __HResults.COR_E_MISSINGMEMBER; + HResult = HResults.COR_E_MISSINGMEMBER; } public MissingMemberException(String message, Exception inner) : base(message, inner) { - HResult = __HResults.COR_E_MISSINGMEMBER; + HResult = HResults.COR_E_MISSINGMEMBER; } protected MissingMemberException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/src/mscorlib/src/System/OutOfMemoryException.cs b/src/mscorlib/src/System/OutOfMemoryException.cs index 3bec542077fe..8ef2d7b2651a 100644 --- a/src/mscorlib/src/System/OutOfMemoryException.cs +++ b/src/mscorlib/src/System/OutOfMemoryException.cs @@ -22,19 +22,19 @@ public class OutOfMemoryException : SystemException public OutOfMemoryException() : base(GetMessageFromNativeResources(ExceptionMessageKind.OutOfMemory)) { - HResult = __HResults.COR_E_OUTOFMEMORY; + HResult = HResults.COR_E_OUTOFMEMORY; } public OutOfMemoryException(String message) : base(message) { - HResult = __HResults.COR_E_OUTOFMEMORY; + HResult = HResults.COR_E_OUTOFMEMORY; } public OutOfMemoryException(String message, Exception innerException) : base(message, innerException) { - HResult = __HResults.COR_E_OUTOFMEMORY; + HResult = HResults.COR_E_OUTOFMEMORY; } protected OutOfMemoryException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/src/mscorlib/src/System/Runtime/CompilerServices/RuntimeWrappedException.cs b/src/mscorlib/src/System/Runtime/CompilerServices/RuntimeWrappedException.cs index df52f301e456..4a73e43136cb 100644 --- a/src/mscorlib/src/System/Runtime/CompilerServices/RuntimeWrappedException.cs +++ b/src/mscorlib/src/System/Runtime/CompilerServices/RuntimeWrappedException.cs @@ -22,7 +22,7 @@ public sealed class RuntimeWrappedException : Exception private RuntimeWrappedException(Object thrownObject) : base(SR.RuntimeWrappedException) { - HResult = System.__HResults.COR_E_RUNTIMEWRAPPED; + HResult = System.HResults.COR_E_RUNTIMEWRAPPED; m_wrappedException = thrownObject; } diff --git a/src/mscorlib/src/System/Runtime/InteropServices/COMException.cs b/src/mscorlib/src/System/Runtime/InteropServices/COMException.cs index 8ee10ed34980..6d9927fd97bf 100644 --- a/src/mscorlib/src/System/Runtime/InteropServices/COMException.cs +++ b/src/mscorlib/src/System/Runtime/InteropServices/COMException.cs @@ -27,19 +27,19 @@ public class COMException : ExternalException public COMException() : base(SR.Arg_COMException) { - HResult = __HResults.E_FAIL; + HResult = HResults.E_FAIL; } public COMException(String message) : base(message) { - HResult = __HResults.E_FAIL; + HResult = HResults.E_FAIL; } public COMException(String message, Exception inner) : base(message, inner) { - HResult = __HResults.E_FAIL; + HResult = HResults.E_FAIL; } public COMException(String message, int errorCode) diff --git a/src/mscorlib/src/System/Runtime/InteropServices/InvalidComObjectException.cs b/src/mscorlib/src/System/Runtime/InteropServices/InvalidComObjectException.cs index bf89df94bbac..c3ce68df4b4e 100644 --- a/src/mscorlib/src/System/Runtime/InteropServices/InvalidComObjectException.cs +++ b/src/mscorlib/src/System/Runtime/InteropServices/InvalidComObjectException.cs @@ -22,19 +22,19 @@ public class InvalidComObjectException : SystemException public InvalidComObjectException() : base(SR.Arg_InvalidComObjectException) { - HResult = __HResults.COR_E_INVALIDCOMOBJECT; + HResult = HResults.COR_E_INVALIDCOMOBJECT; } public InvalidComObjectException(String message) : base(message) { - HResult = __HResults.COR_E_INVALIDCOMOBJECT; + HResult = HResults.COR_E_INVALIDCOMOBJECT; } public InvalidComObjectException(String message, Exception inner) : base(message, inner) { - HResult = __HResults.COR_E_INVALIDCOMOBJECT; + HResult = HResults.COR_E_INVALIDCOMOBJECT; } protected InvalidComObjectException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/src/mscorlib/src/System/Runtime/InteropServices/InvalidOleVariantTypeException.cs b/src/mscorlib/src/System/Runtime/InteropServices/InvalidOleVariantTypeException.cs index 412853920e23..f61010cda32e 100644 --- a/src/mscorlib/src/System/Runtime/InteropServices/InvalidOleVariantTypeException.cs +++ b/src/mscorlib/src/System/Runtime/InteropServices/InvalidOleVariantTypeException.cs @@ -21,19 +21,19 @@ public class InvalidOleVariantTypeException : SystemException public InvalidOleVariantTypeException() : base(SR.Arg_InvalidOleVariantTypeException) { - HResult = __HResults.COR_E_INVALIDOLEVARIANTTYPE; + HResult = HResults.COR_E_INVALIDOLEVARIANTTYPE; } public InvalidOleVariantTypeException(String message) : base(message) { - HResult = __HResults.COR_E_INVALIDOLEVARIANTTYPE; + HResult = HResults.COR_E_INVALIDOLEVARIANTTYPE; } public InvalidOleVariantTypeException(String message, Exception inner) : base(message, inner) { - HResult = __HResults.COR_E_INVALIDOLEVARIANTTYPE; + HResult = HResults.COR_E_INVALIDOLEVARIANTTYPE; } protected InvalidOleVariantTypeException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/src/mscorlib/src/System/Runtime/InteropServices/MarshalDirectiveException.cs b/src/mscorlib/src/System/Runtime/InteropServices/MarshalDirectiveException.cs index 75b291af30d5..48e2dcf411c1 100644 --- a/src/mscorlib/src/System/Runtime/InteropServices/MarshalDirectiveException.cs +++ b/src/mscorlib/src/System/Runtime/InteropServices/MarshalDirectiveException.cs @@ -22,19 +22,19 @@ public class MarshalDirectiveException : SystemException public MarshalDirectiveException() : base(SR.Arg_MarshalDirectiveException) { - HResult = __HResults.COR_E_MARSHALDIRECTIVE; + HResult = HResults.COR_E_MARSHALDIRECTIVE; } public MarshalDirectiveException(String message) : base(message) { - HResult = __HResults.COR_E_MARSHALDIRECTIVE; + HResult = HResults.COR_E_MARSHALDIRECTIVE; } public MarshalDirectiveException(String message, Exception inner) : base(message, inner) { - HResult = __HResults.COR_E_MARSHALDIRECTIVE; + HResult = HResults.COR_E_MARSHALDIRECTIVE; } protected MarshalDirectiveException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/src/mscorlib/src/System/Runtime/InteropServices/SEHException.cs b/src/mscorlib/src/System/Runtime/InteropServices/SEHException.cs index d61e79757ce1..832c4d289ef3 100644 --- a/src/mscorlib/src/System/Runtime/InteropServices/SEHException.cs +++ b/src/mscorlib/src/System/Runtime/InteropServices/SEHException.cs @@ -24,19 +24,19 @@ public class SEHException : ExternalException public SEHException() : base() { - HResult = __HResults.E_FAIL; + HResult = HResults.E_FAIL; } public SEHException(String message) : base(message) { - HResult = __HResults.E_FAIL; + HResult = HResults.E_FAIL; } public SEHException(String message, Exception inner) : base(message, inner) { - HResult = __HResults.E_FAIL; + HResult = HResults.E_FAIL; } protected SEHException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/src/mscorlib/src/System/Runtime/InteropServices/SafeArrayRankMismatchException.cs b/src/mscorlib/src/System/Runtime/InteropServices/SafeArrayRankMismatchException.cs index 9df858f0b1f4..7109b4fe51dd 100644 --- a/src/mscorlib/src/System/Runtime/InteropServices/SafeArrayRankMismatchException.cs +++ b/src/mscorlib/src/System/Runtime/InteropServices/SafeArrayRankMismatchException.cs @@ -21,19 +21,19 @@ public class SafeArrayRankMismatchException : SystemException public SafeArrayRankMismatchException() : base(SR.Arg_SafeArrayRankMismatchException) { - HResult = __HResults.COR_E_SAFEARRAYRANKMISMATCH; + HResult = HResults.COR_E_SAFEARRAYRANKMISMATCH; } public SafeArrayRankMismatchException(String message) : base(message) { - HResult = __HResults.COR_E_SAFEARRAYRANKMISMATCH; + HResult = HResults.COR_E_SAFEARRAYRANKMISMATCH; } public SafeArrayRankMismatchException(String message, Exception inner) : base(message, inner) { - HResult = __HResults.COR_E_SAFEARRAYRANKMISMATCH; + HResult = HResults.COR_E_SAFEARRAYRANKMISMATCH; } protected SafeArrayRankMismatchException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/src/mscorlib/src/System/Runtime/InteropServices/SafeArrayTypeMismatchException.cs b/src/mscorlib/src/System/Runtime/InteropServices/SafeArrayTypeMismatchException.cs index 4b03691e8279..13a6cf62a897 100644 --- a/src/mscorlib/src/System/Runtime/InteropServices/SafeArrayTypeMismatchException.cs +++ b/src/mscorlib/src/System/Runtime/InteropServices/SafeArrayTypeMismatchException.cs @@ -22,19 +22,19 @@ public class SafeArrayTypeMismatchException : SystemException public SafeArrayTypeMismatchException() : base(SR.Arg_SafeArrayTypeMismatchException) { - HResult = __HResults.COR_E_SAFEARRAYTYPEMISMATCH; + HResult = HResults.COR_E_SAFEARRAYTYPEMISMATCH; } public SafeArrayTypeMismatchException(String message) : base(message) { - HResult = __HResults.COR_E_SAFEARRAYTYPEMISMATCH; + HResult = HResults.COR_E_SAFEARRAYTYPEMISMATCH; } public SafeArrayTypeMismatchException(String message, Exception inner) : base(message, inner) { - HResult = __HResults.COR_E_SAFEARRAYTYPEMISMATCH; + HResult = HResults.COR_E_SAFEARRAYTYPEMISMATCH; } protected SafeArrayTypeMismatchException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/BindableVectorToListAdapter.cs b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/BindableVectorToListAdapter.cs index 539b8020b8c2..f0be957f8cd2 100644 --- a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/BindableVectorToListAdapter.cs +++ b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/BindableVectorToListAdapter.cs @@ -167,7 +167,7 @@ private static object GetAt(IBindableVector _this, uint index) } 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 @@ private static void SetAt(IBindableVector _this, uint index, object value) } 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 @@ private static void InsertAtHelper(IBindableVector _this, uint index, object ite } 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 @@ private static void RemoveAtHelper(IBindableVector _this, uint index) } catch (Exception ex) { - if (__HResults.E_BOUNDS == ex._HResult) + if (HResults.E_BOUNDS == ex._HResult) throw new ArgumentOutOfRangeException(nameof(index)); throw; diff --git a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/CLRIPropertyValueImpl.cs b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/CLRIPropertyValueImpl.cs index aa0f3ba05692..75774caae2a4 100644 --- a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/CLRIPropertyValueImpl.cs +++ b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/CLRIPropertyValueImpl.cs @@ -134,7 +134,7 @@ public Double GetDouble() 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 @@ public char GetChar16() 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 @@ public Guid GetGuid() 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 @@ public DateTimeOffset GetDateTime() 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 @@ public TimeSpan GetTimeSpan() public Point GetPoint() { if (this.Type != PropertyType.Point) - throw new InvalidCastException(SR.Format(SR.InvalidCast_WinRTIPropertyValueElement, this.Type, "Point"), __HResults.TYPE_E_TYPEMISMATCH); + throw new InvalidCastException(SR.Format(SR.InvalidCast_WinRTIPropertyValueElement, this.Type, "Point"), HResults.TYPE_E_TYPEMISMATCH); Contract.EndContractBlock(); return Unbox(IReferenceFactory.s_pointType); @@ -194,7 +194,7 @@ public Point GetPoint() public Size GetSize() { if (this.Type != PropertyType.Size) - throw new InvalidCastException(SR.Format(SR.InvalidCast_WinRTIPropertyValueElement, this.Type, "Size"), __HResults.TYPE_E_TYPEMISMATCH); + throw new InvalidCastException(SR.Format(SR.InvalidCast_WinRTIPropertyValueElement, this.Type, "Size"), HResults.TYPE_E_TYPEMISMATCH); Contract.EndContractBlock(); return Unbox(IReferenceFactory.s_sizeType); @@ -204,7 +204,7 @@ public Size GetSize() public Rect GetRect() { if (this.Type != PropertyType.Rect) - throw new InvalidCastException(SR.Format(SR.InvalidCast_WinRTIPropertyValueElement, this.Type, "Rect"), __HResults.TYPE_E_TYPEMISMATCH); + throw new InvalidCastException(SR.Format(SR.InvalidCast_WinRTIPropertyValueElement, this.Type, "Rect"), HResults.TYPE_E_TYPEMISMATCH); Contract.EndContractBlock(); return Unbox(IReferenceFactory.s_rectType); @@ -268,7 +268,7 @@ public Double[] GetDoubleArray() 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 @@ public char[] GetChar16Array() 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 @@ public String[] GetStringArray() 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 @@ public Guid[] GetGuidArray() 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 @@ public DateTimeOffset[] GetDateTimeArray() 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 @@ public TimeSpan[] GetTimeSpanArray() public Point[] GetPointArray() { if (this.Type != PropertyType.PointArray) - throw new InvalidCastException(SR.Format(SR.InvalidCast_WinRTIPropertyValueElement, this.Type, "Point[]"), __HResults.TYPE_E_TYPEMISMATCH); + throw new InvalidCastException(SR.Format(SR.InvalidCast_WinRTIPropertyValueElement, this.Type, "Point[]"), HResults.TYPE_E_TYPEMISMATCH); Contract.EndContractBlock(); return UnboxArray(IReferenceFactory.s_pointType); @@ -335,7 +335,7 @@ public Point[] GetPointArray() 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 @@ public Size[] GetSizeArray() public Rect[] GetRectArray() { if (this.Type != PropertyType.RectArray) - throw new InvalidCastException(SR.Format(SR.InvalidCast_WinRTIPropertyValueElement, this.Type, "Rect[]"), __HResults.TYPE_E_TYPEMISMATCH); + throw new InvalidCastException(SR.Format(SR.InvalidCast_WinRTIPropertyValueElement, this.Type, "Rect[]"), HResults.TYPE_E_TYPEMISMATCH); Contract.EndContractBlock(); return UnboxArray(IReferenceFactory.s_rectType); @@ -364,7 +364,7 @@ private T[] CoerceArrayValue(PropertyType unboxType) 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 @@ private static T CoerceScalarValue(PropertyType type, object value) // 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 @@ private static T CoerceScalarValue(PropertyType type, object value) } 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 @@ private static T CoerceScalarValue(PropertyType type, object value) } // 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 @@ private unsafe T Unbox(Type expectedBoxedType) where T : struct 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 @@ private unsafe T[] UnboxArray(Type expectedArrayElementType) where T : struct Array dataArray = _data as Array; if (dataArray == null || _data.GetType().GetElementType() != expectedArrayElementType) { - throw new InvalidCastException(SR.Format(SR.InvalidCast_WinRTIPropertyValueElement, _data.GetType(), expectedArrayElementType.MakeArrayType().Name), __HResults.TYPE_E_TYPEMISMATCH); + throw new InvalidCastException(SR.Format(SR.InvalidCast_WinRTIPropertyValueElement, _data.GetType(), expectedArrayElementType.MakeArrayType().Name), HResults.TYPE_E_TYPEMISMATCH); } T[] converted = new T[dataArray.Length]; diff --git a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/ConstantSplittableMap.cs b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/ConstantSplittableMap.cs index 0ed0bb3f7bc9..5a4a5e8a7b81 100644 --- a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/ConstantSplittableMap.cs +++ b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/ConstantSplittableMap.cs @@ -102,7 +102,7 @@ public TValue Lookup(TKey key) if (!found) { Exception e = new KeyNotFoundException(SR.Arg_KeyNotFound); - e.SetErrorCode(__HResults.E_BOUNDS); + e.SetErrorCode(HResults.E_BOUNDS); throw e; } diff --git a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/DictionaryToMapAdapter.cs b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/DictionaryToMapAdapter.cs index bb54d49b60df..3a1f8c4f4af4 100644 --- a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/DictionaryToMapAdapter.cs +++ b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/DictionaryToMapAdapter.cs @@ -42,7 +42,7 @@ internal V Lookup(K key) 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 @@ internal void Remove(K key) if (!removed) { Exception e = new KeyNotFoundException(SR.Arg_KeyNotFound); - e.SetErrorCode(__HResults.E_BOUNDS); + e.SetErrorCode(HResults.E_BOUNDS); throw e; } } diff --git a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/EnumeratorToIteratorAdapter.cs b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/EnumeratorToIteratorAdapter.cs index 75b8480eeb21..70a9da69746b 100644 --- a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/EnumeratorToIteratorAdapter.cs +++ b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/EnumeratorToIteratorAdapter.cs @@ -92,7 +92,7 @@ public T Current 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 @@ public bool MoveNext() } catch (InvalidOperationException e) { - throw WindowsRuntimeMarshal.GetExceptionForHR(__HResults.E_CHANGED_STATE, e); + throw WindowsRuntimeMarshal.GetExceptionForHR(HResults.E_CHANGED_STATE, e); } return m_hasCurrent; diff --git a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/IMapViewToIReadOnlyDictionaryAdapter.cs b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/IMapViewToIReadOnlyDictionaryAdapter.cs index 0900012338aa..04958c3bd599 100644 --- a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/IMapViewToIReadOnlyDictionaryAdapter.cs +++ b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/IMapViewToIReadOnlyDictionaryAdapter.cs @@ -92,7 +92,7 @@ internal bool TryGetValue(K key, out V value) } 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 @@ private static V Lookup(IMapView _this, K key) } catch (Exception ex) { - if (__HResults.E_BOUNDS == ex._HResult) + if (HResults.E_BOUNDS == ex._HResult) throw new KeyNotFoundException(SR.Arg_KeyNotFound); throw; } diff --git a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/IReadOnlyDictionaryToIMapViewAdapter.cs b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/IReadOnlyDictionaryToIMapViewAdapter.cs index 73daf876cd70..eaf5f471de6c 100644 --- a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/IReadOnlyDictionaryToIMapViewAdapter.cs +++ b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/IReadOnlyDictionaryToIMapViewAdapter.cs @@ -41,7 +41,7 @@ internal V Lookup(K key) if (!keyFound) { Exception e = new KeyNotFoundException(SR.Arg_KeyNotFound); - e.SetErrorCode(__HResults.E_BOUNDS); + e.SetErrorCode(HResults.E_BOUNDS); throw e; } diff --git a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/IReadOnlyListToIVectorViewAdapter.cs b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/IReadOnlyListToIVectorViewAdapter.cs index 5dce7dfc8d78..9b87bee372d0 100644 --- a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/IReadOnlyListToIVectorViewAdapter.cs +++ b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/IReadOnlyListToIVectorViewAdapter.cs @@ -43,7 +43,7 @@ internal T GetAt(uint index) } catch (ArgumentOutOfRangeException ex) { - ex.SetErrorCode(__HResults.E_BOUNDS); + ex.SetErrorCode(HResults.E_BOUNDS); throw; } } @@ -127,7 +127,7 @@ private static void EnsureIndexInt32(uint index, int listCapacity) if (((uint)Int32.MaxValue) <= index || index >= (uint)listCapacity) { Exception e = new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_IndexLargerThanMaxValue); - e.SetErrorCode(__HResults.E_BOUNDS); + e.SetErrorCode(HResults.E_BOUNDS); throw e; } } diff --git a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/IVectorViewToIReadOnlyListAdapter.cs b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/IVectorViewToIReadOnlyListAdapter.cs index 76b0fff00d4e..50903235727c 100644 --- a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/IVectorViewToIReadOnlyListAdapter.cs +++ b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/IVectorViewToIReadOnlyListAdapter.cs @@ -50,7 +50,7 @@ internal T Indexer_Get(int index) } catch (Exception ex) { - if (__HResults.E_BOUNDS == ex._HResult) + if (HResults.E_BOUNDS == ex._HResult) throw new ArgumentOutOfRangeException(nameof(index)); throw; diff --git a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/IteratorToEnumeratorAdapter.cs b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/IteratorToEnumeratorAdapter.cs index 417476dbbe3f..ccef9d92bf67 100644 --- a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/IteratorToEnumeratorAdapter.cs +++ b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/IteratorToEnumeratorAdapter.cs @@ -182,7 +182,7 @@ public bool MoveNext() catch (Exception e) { // Translate E_CHANGED_STATE into an InvalidOperationException for an updated enumeration - if (Marshal.GetHRForException(e) == __HResults.E_CHANGED_STATE) + if (Marshal.GetHRForException(e) == HResults.E_CHANGED_STATE) { ThrowHelper.ThrowInvalidOperationException_InvalidOperation_EnumFailedVersion(); } diff --git a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/ListToBindableVectorAdapter.cs b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/ListToBindableVectorAdapter.cs index 5f12322ea896..09fdc3b49e89 100644 --- a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/ListToBindableVectorAdapter.cs +++ b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/ListToBindableVectorAdapter.cs @@ -44,7 +44,7 @@ internal object GetAt(uint index) } 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 @@ internal void SetAt(uint index, object value) } 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 @@ internal void InsertAt(uint index, object value) 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 @@ internal void RemoveAt(uint index) 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 @@ internal void RemoveAtEnd() 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 @@ private static void EnsureIndexInt32(uint index, int listCapacity) if (((uint)Int32.MaxValue) <= index || index >= (uint)listCapacity) { Exception e = new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_IndexLargerThanMaxValue); - e.SetErrorCode(__HResults.E_BOUNDS); + e.SetErrorCode(HResults.E_BOUNDS); throw e; } } diff --git a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/ListToBindableVectorViewAdapter.cs b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/ListToBindableVectorViewAdapter.cs index fc02bedfa6fb..75c9b9d086b3 100644 --- a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/ListToBindableVectorViewAdapter.cs +++ b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/ListToBindableVectorViewAdapter.cs @@ -39,7 +39,7 @@ private static void EnsureIndexInt32(uint index, int listCapacity) 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 @@ public object GetAt(uint index) } catch (ArgumentOutOfRangeException ex) { - throw WindowsRuntimeMarshal.GetExceptionForHR(__HResults.E_BOUNDS, ex, "ArgumentOutOfRange_IndexOutOfRange"); + throw WindowsRuntimeMarshal.GetExceptionForHR(HResults.E_BOUNDS, ex, "ArgumentOutOfRange_IndexOutOfRange"); } } diff --git a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/ListToVectorAdapter.cs b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/ListToVectorAdapter.cs index 87330e2559dc..03c48b546b28 100644 --- a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/ListToVectorAdapter.cs +++ b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/ListToVectorAdapter.cs @@ -44,7 +44,7 @@ internal T GetAt(uint index) } 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 @@ internal void SetAt(uint index, T value) } 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 @@ internal void InsertAt(uint index, T value) 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 @@ internal void RemoveAt(uint index) 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 @@ internal void RemoveAtEnd() 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 @@ private static void EnsureIndexInt32(uint index, int listCapacity) if (((uint)Int32.MaxValue) <= index || index >= (uint)listCapacity) { Exception e = new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_IndexLargerThanMaxValue); - e.SetErrorCode(__HResults.E_BOUNDS); + e.SetErrorCode(HResults.E_BOUNDS); throw e; } } diff --git a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/MapToDictionaryAdapter.cs b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/MapToDictionaryAdapter.cs index 224a266b0757..13d1aeb8bc0c 100644 --- a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/MapToDictionaryAdapter.cs +++ b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/MapToDictionaryAdapter.cs @@ -113,7 +113,7 @@ internal bool Remove(K key) } catch (Exception ex) { - if (__HResults.E_BOUNDS == ex._HResult) + if (HResults.E_BOUNDS == ex._HResult) return false; throw; @@ -157,7 +157,7 @@ private static V Lookup(IMap _this, K key) } catch (Exception ex) { - if (__HResults.E_BOUNDS == ex._HResult) + if (HResults.E_BOUNDS == ex._HResult) throw new KeyNotFoundException(SR.Arg_KeyNotFound); throw; } diff --git a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/VectorToListAdapter.cs b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/VectorToListAdapter.cs index 56e62a25e78f..90381f6be228 100644 --- a/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/VectorToListAdapter.cs +++ b/src/mscorlib/src/System/Runtime/InteropServices/WindowsRuntime/VectorToListAdapter.cs @@ -102,7 +102,7 @@ internal static T GetAt(IVector _this, uint index) } 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 @@ private static void SetAt(IVector _this, UInt32 index, T value) } 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 @@ private static void InsertAtHelper(IVector _this, uint index, T item) } 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 @@ internal static void RemoveAtHelper(IVector _this, uint index) } catch (Exception ex) { - if (__HResults.E_BOUNDS == ex._HResult) + if (HResults.E_BOUNDS == ex._HResult) throw new ArgumentOutOfRangeException(nameof(index)); throw; diff --git a/src/mscorlib/src/System/Threading/ClrThreadPoolBoundHandle.Windows.cs b/src/mscorlib/src/System/Threading/ClrThreadPoolBoundHandle.Windows.cs index 090497c42793..a40661c1b6c7 100644 --- a/src/mscorlib/src/System/Threading/ClrThreadPoolBoundHandle.Windows.cs +++ b/src/mscorlib/src/System/Threading/ClrThreadPoolBoundHandle.Windows.cs @@ -28,10 +28,10 @@ private static ThreadPoolBoundHandle BindHandleCore(SafeHandle handle) // We do not let either of these leak and convert them to ArgumentException to // indicate that the specified handles are invalid. - if (ex.HResult == __HResults.E_HANDLE) // Bad handle + if (ex.HResult == HResults.E_HANDLE) // Bad handle throw new ArgumentException(SR.Argument_InvalidHandle, nameof(handle)); - if (ex.HResult == __HResults.E_INVALIDARG) // Handle already bound or sync handle + if (ex.HResult == HResults.E_INVALIDARG) // Handle already bound or sync handle throw new ArgumentException(SR.Argument_AlreadyBoundOrSyncHandle, nameof(handle)); throw; diff --git a/src/mscorlib/src/System/Threading/ThreadInterruptedException.cs b/src/mscorlib/src/System/Threading/ThreadInterruptedException.cs index fb72110fdc33..db42b77ca4a5 100644 --- a/src/mscorlib/src/System/Threading/ThreadInterruptedException.cs +++ b/src/mscorlib/src/System/Threading/ThreadInterruptedException.cs @@ -24,19 +24,19 @@ public class ThreadInterruptedException : SystemException public ThreadInterruptedException() : base(GetMessageFromNativeResources(ExceptionMessageKind.ThreadInterrupted)) { - HResult = __HResults.COR_E_THREADINTERRUPTED; + HResult = HResults.COR_E_THREADINTERRUPTED; } public ThreadInterruptedException(String message) : base(message) { - HResult = __HResults.COR_E_THREADINTERRUPTED; + HResult = HResults.COR_E_THREADINTERRUPTED; } public ThreadInterruptedException(String message, Exception innerException) : base(message, innerException) { - HResult = __HResults.COR_E_THREADINTERRUPTED; + HResult = HResults.COR_E_THREADINTERRUPTED; } protected ThreadInterruptedException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/src/mscorlib/src/System/TypeLoadException.cs b/src/mscorlib/src/System/TypeLoadException.cs index 5e748a6c58fe..840d97702b7f 100644 --- a/src/mscorlib/src/System/TypeLoadException.cs +++ b/src/mscorlib/src/System/TypeLoadException.cs @@ -27,19 +27,19 @@ public class TypeLoadException : SystemException, ISerializable 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 @@ private TypeLoadException(String className, int resourceId) : base(null) { - HResult = __HResults.COR_E_TYPELOAD; + HResult = HResults.COR_E_TYPELOAD; ClassName = className; AssemblyName = assemblyName; MessageArg = messageArg; From 9d0639681893d6dc928286a8f5c81570d97d3f2e Mon Sep 17 00:00:00 2001 From: Dan Moseley Date: Sun, 27 Aug 2017 22:17:35 -0700 Subject: [PATCH 4/7] Rename other two __HResults classes --- src/mscorlib/System.Private.CoreLib.csproj | 4 ++-- .../shared/System/IO/DirectoryNotFoundException.cs | 6 +++--- src/mscorlib/shared/System/IO/EndOfStreamException.cs | 6 +++--- src/mscorlib/shared/System/IO/FileLoadException.cs | 10 +++++----- src/mscorlib/shared/System/IO/FileNotFoundException.cs | 10 +++++----- src/mscorlib/shared/System/IO/PathTooLongException.cs | 6 +++--- src/mscorlib/src/System/IO/DriveNotFoundException.cs | 4 ++-- .../src/System/IO/{__HResults.cs => HResults.cs} | 2 +- src/mscorlib/src/System/IO/IOException.cs | 6 +++--- .../System/Resources/{__HResults.cs => HResults.cs} | 2 +- src/mscorlib/src/System/Resources/ResourceManager.cs | 2 +- 11 files changed, 29 insertions(+), 29 deletions(-) rename src/mscorlib/src/System/IO/{__HResults.cs => HResults.cs} (96%) rename src/mscorlib/src/System/Resources/{__HResults.cs => HResults.cs} (95%) diff --git a/src/mscorlib/System.Private.CoreLib.csproj b/src/mscorlib/System.Private.CoreLib.csproj index f08a567dbfac..6bfa8f58f60d 100644 --- a/src/mscorlib/System.Private.CoreLib.csproj +++ b/src/mscorlib/System.Private.CoreLib.csproj @@ -497,7 +497,6 @@ - @@ -505,6 +504,7 @@ + @@ -566,8 +566,8 @@ - + diff --git a/src/mscorlib/shared/System/IO/DirectoryNotFoundException.cs b/src/mscorlib/shared/System/IO/DirectoryNotFoundException.cs index de09760fcb4a..87e610b86eb1 100644 --- a/src/mscorlib/shared/System/IO/DirectoryNotFoundException.cs +++ b/src/mscorlib/shared/System/IO/DirectoryNotFoundException.cs @@ -17,19 +17,19 @@ public class DirectoryNotFoundException : IOException public DirectoryNotFoundException() : base(SR.Arg_DirectoryNotFoundException) { - HResult = __HResults.COR_E_DIRECTORYNOTFOUND; + HResult = HResults.COR_E_DIRECTORYNOTFOUND; } public DirectoryNotFoundException(string message) : base(message) { - HResult = __HResults.COR_E_DIRECTORYNOTFOUND; + HResult = HResults.COR_E_DIRECTORYNOTFOUND; } public DirectoryNotFoundException(string message, Exception innerException) : base(message, innerException) { - HResult = __HResults.COR_E_DIRECTORYNOTFOUND; + HResult = HResults.COR_E_DIRECTORYNOTFOUND; } protected DirectoryNotFoundException(SerializationInfo info, StreamingContext context) diff --git a/src/mscorlib/shared/System/IO/EndOfStreamException.cs b/src/mscorlib/shared/System/IO/EndOfStreamException.cs index 68e1b2c88228..ee37818dc5a4 100644 --- a/src/mscorlib/shared/System/IO/EndOfStreamException.cs +++ b/src/mscorlib/shared/System/IO/EndOfStreamException.cs @@ -11,19 +11,19 @@ public class EndOfStreamException : IOException public EndOfStreamException() : base(SR.Arg_EndOfStreamException) { - HResult = __HResults.COR_E_ENDOFSTREAM; + HResult = HResults.COR_E_ENDOFSTREAM; } public EndOfStreamException(string message) : base(message) { - HResult = __HResults.COR_E_ENDOFSTREAM; + HResult = HResults.COR_E_ENDOFSTREAM; } public EndOfStreamException(string message, Exception innerException) : base(message, innerException) { - HResult = __HResults.COR_E_ENDOFSTREAM; + HResult = HResults.COR_E_ENDOFSTREAM; } protected EndOfStreamException(SerializationInfo info, StreamingContext context) diff --git a/src/mscorlib/shared/System/IO/FileLoadException.cs b/src/mscorlib/shared/System/IO/FileLoadException.cs index 6fdf2d58cf82..b126424c2271 100644 --- a/src/mscorlib/shared/System/IO/FileLoadException.cs +++ b/src/mscorlib/shared/System/IO/FileLoadException.cs @@ -11,31 +11,31 @@ public partial class FileLoadException : IOException public FileLoadException() : base(SR.IO_FileLoad) { - HResult = __HResults.COR_E_FILELOAD; + HResult = HResults.COR_E_FILELOAD; } public FileLoadException(string message) : base(message) { - HResult = __HResults.COR_E_FILELOAD; + HResult = HResults.COR_E_FILELOAD; } public FileLoadException(string message, Exception inner) : base(message, inner) { - HResult = __HResults.COR_E_FILELOAD; + HResult = HResults.COR_E_FILELOAD; } public FileLoadException(string message, string fileName) : base(message) { - HResult = __HResults.COR_E_FILELOAD; + HResult = HResults.COR_E_FILELOAD; FileName = fileName; } public FileLoadException(string message, string fileName, Exception inner) : base(message, inner) { - HResult = __HResults.COR_E_FILELOAD; + HResult = HResults.COR_E_FILELOAD; FileName = fileName; } diff --git a/src/mscorlib/shared/System/IO/FileNotFoundException.cs b/src/mscorlib/shared/System/IO/FileNotFoundException.cs index a4f3060c0ee8..dc1ccf577ade 100644 --- a/src/mscorlib/shared/System/IO/FileNotFoundException.cs +++ b/src/mscorlib/shared/System/IO/FileNotFoundException.cs @@ -12,32 +12,32 @@ public partial class FileNotFoundException : IOException 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; } diff --git a/src/mscorlib/shared/System/IO/PathTooLongException.cs b/src/mscorlib/shared/System/IO/PathTooLongException.cs index 64c8e6c7e6e8..15f282ebf665 100644 --- a/src/mscorlib/shared/System/IO/PathTooLongException.cs +++ b/src/mscorlib/shared/System/IO/PathTooLongException.cs @@ -13,19 +13,19 @@ public class PathTooLongException : IOException public PathTooLongException() : base(SR.IO_PathTooLong) { - HResult = __HResults.COR_E_PATHTOOLONG; + HResult = HResults.COR_E_PATHTOOLONG; } public PathTooLongException(string message) : base(message) { - HResult = __HResults.COR_E_PATHTOOLONG; + HResult = HResults.COR_E_PATHTOOLONG; } public PathTooLongException(string message, Exception innerException) : base(message, innerException) { - HResult = __HResults.COR_E_PATHTOOLONG; + HResult = HResults.COR_E_PATHTOOLONG; } protected PathTooLongException(SerializationInfo info, StreamingContext context) diff --git a/src/mscorlib/src/System/IO/DriveNotFoundException.cs b/src/mscorlib/src/System/IO/DriveNotFoundException.cs index 7e9b0c9f3627..fb7001d14bc7 100644 --- a/src/mscorlib/src/System/IO/DriveNotFoundException.cs +++ b/src/mscorlib/src/System/IO/DriveNotFoundException.cs @@ -22,13 +22,13 @@ internal class DriveNotFoundException : IOException public DriveNotFoundException() : base(SR.Arg_DriveNotFoundException) { - HResult = __HResults.COR_E_DIRECTORYNOTFOUND; + HResult = HResults.COR_E_DIRECTORYNOTFOUND; } public DriveNotFoundException(String message) : base(message) { - HResult = __HResults.COR_E_DIRECTORYNOTFOUND; + HResult = HResults.COR_E_DIRECTORYNOTFOUND; } protected DriveNotFoundException(SerializationInfo info, StreamingContext context) : base(info, context) diff --git a/src/mscorlib/src/System/IO/__HResults.cs b/src/mscorlib/src/System/IO/HResults.cs similarity index 96% rename from src/mscorlib/src/System/IO/__HResults.cs rename to src/mscorlib/src/System/IO/HResults.cs index 633c3538c5d9..404676d495f2 100644 --- a/src/mscorlib/src/System/IO/__HResults.cs +++ b/src/mscorlib/src/System/IO/HResults.cs @@ -17,7 +17,7 @@ namespace System.IO { // Only static data no need to serialize - internal static class __HResults + internal static class HResults { // These use an error code from WinError.h public const int COR_E_ENDOFSTREAM = unchecked((int)0x80070026); // OS defined diff --git a/src/mscorlib/src/System/IO/IOException.cs b/src/mscorlib/src/System/IO/IOException.cs index 65504de86332..169df95ac63a 100644 --- a/src/mscorlib/src/System/IO/IOException.cs +++ b/src/mscorlib/src/System/IO/IOException.cs @@ -34,13 +34,13 @@ public class IOException : SystemException 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 @@ internal IOException(String message, int hresult, String maybeFullPath) 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/Resources/__HResults.cs b/src/mscorlib/src/System/Resources/HResults.cs similarity index 95% rename from src/mscorlib/src/System/Resources/__HResults.cs rename to src/mscorlib/src/System/Resources/HResults.cs index 581716166595..688c68fa1399 100644 --- a/src/mscorlib/src/System/Resources/__HResults.cs +++ b/src/mscorlib/src/System/Resources/HResults.cs @@ -15,7 +15,7 @@ namespace System.Resources { using System; // Only static data no need to serialize - internal static class __HResults + internal static class HResults { // From WinError.h public const int ERROR_MRM_MAP_NOT_FOUND = unchecked((int)0x80073B1F); diff --git a/src/mscorlib/src/System/Resources/ResourceManager.cs b/src/mscorlib/src/System/Resources/ResourceManager.cs index f17123985700..30222b4aae8a 100644 --- a/src/mscorlib/src/System/Resources/ResourceManager.cs +++ b/src/mscorlib/src/System/Resources/ResourceManager.cs @@ -1035,7 +1035,7 @@ private void SetAppXConfiguration() // 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. } From c053ebf05ff17e21aa27968bdec0886bc1aed0d8 Mon Sep 17 00:00:00 2001 From: Dan Moseley Date: Sun, 27 Aug 2017 22:23:38 -0700 Subject: [PATCH 5/7] Combine into single HResults class, to match CoreRT --- src/mscorlib/System.Private.CoreLib.csproj | 2 -- src/mscorlib/src/System/HResults.cs | 7 +++++ src/mscorlib/src/System/IO/HResults.cs | 31 ------------------- src/mscorlib/src/System/Resources/HResults.cs | 24 -------------- 4 files changed, 7 insertions(+), 57 deletions(-) delete mode 100644 src/mscorlib/src/System/IO/HResults.cs delete mode 100644 src/mscorlib/src/System/Resources/HResults.cs diff --git a/src/mscorlib/System.Private.CoreLib.csproj b/src/mscorlib/System.Private.CoreLib.csproj index 6bfa8f58f60d..ec79823bfd21 100644 --- a/src/mscorlib/System.Private.CoreLib.csproj +++ b/src/mscorlib/System.Private.CoreLib.csproj @@ -504,7 +504,6 @@ - @@ -567,7 +566,6 @@ - diff --git a/src/mscorlib/src/System/HResults.cs b/src/mscorlib/src/System/HResults.cs index 795791ed990e..ee8cd0f85deb 100644 --- a/src/mscorlib/src/System/HResults.cs +++ b/src/mscorlib/src/System/HResults.cs @@ -127,5 +127,12 @@ internal static class HResults 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); + internal const int COR_E_ENDOFSTREAM = unchecked((int)0x80070026); // OS defined + internal const int COR_E_FILELOAD = unchecked((int)0x80131621); + internal const int COR_E_FILENOTFOUND = unchecked((int)0x80070002); + internal const int COR_E_DIRECTORYNOTFOUND = unchecked((int)0x80070003); + internal const int COR_E_PATHTOOLONG = unchecked((int)0x800700CE); + internal const int COR_E_IO = unchecked((int)0x80131620); + internal const int ERROR_MRM_MAP_NOT_FOUND = unchecked((int)0x80073B1F); } } diff --git a/src/mscorlib/src/System/IO/HResults.cs b/src/mscorlib/src/System/IO/HResults.cs deleted file mode 100644 index 404676d495f2..000000000000 --- a/src/mscorlib/src/System/IO/HResults.cs +++ /dev/null @@ -1,31 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -//============================================================================= -// -// -// -// -// Purpose: Define HResult constants. Every exception has one of these. -// -// -//===========================================================================*/ - -using System; - -namespace System.IO -{ - // Only static data no need to serialize - internal static class HResults - { - // These use an error code from WinError.h - public const int COR_E_ENDOFSTREAM = unchecked((int)0x80070026); // OS defined - public const int COR_E_FILELOAD = unchecked((int)0x80131621); - public const int COR_E_FILENOTFOUND = unchecked((int)0x80070002); - public const int COR_E_DIRECTORYNOTFOUND = unchecked((int)0x80070003); - public const int COR_E_PATHTOOLONG = unchecked((int)0x800700CE); - - public const int COR_E_IO = unchecked((int)0x80131620); - } -} diff --git a/src/mscorlib/src/System/Resources/HResults.cs b/src/mscorlib/src/System/Resources/HResults.cs deleted file mode 100644 index 688c68fa1399..000000000000 --- a/src/mscorlib/src/System/Resources/HResults.cs +++ /dev/null @@ -1,24 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -//============================================================================= -// -// -// -// Purpose: Define HResult constants returned by the Windows Modern Resource Manager -// and consumed by System.Resources.ResourceManager. -// -//===========================================================================*/ -#if FEATURE_APPX -namespace System.Resources -{ - using System; - // Only static data no need to serialize - internal static class HResults - { - // From WinError.h - public const int ERROR_MRM_MAP_NOT_FOUND = unchecked((int)0x80073B1F); - } -} -#endif From 2c6300e789a45f9f330ad976de451392044679ff Mon Sep 17 00:00:00 2001 From: Dan Moseley Date: Sun, 27 Aug 2017 22:28:53 -0700 Subject: [PATCH 6/7] Make hex consistently uppercase --- src/mscorlib/src/System/HResults.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mscorlib/src/System/HResults.cs b/src/mscorlib/src/System/HResults.cs index ee8cd0f85deb..56be5d141e2f 100644 --- a/src/mscorlib/src/System/HResults.cs +++ b/src/mscorlib/src/System/HResults.cs @@ -101,7 +101,7 @@ internal static class HResults 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_THREADSTATE = unchecked((int)0x80131520); @@ -123,10 +123,10 @@ internal static class HResults 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 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); + internal const int TYPE_E_TYPEMISMATCH = unchecked((int)0x80028CA0); internal const int COR_E_ENDOFSTREAM = unchecked((int)0x80070026); // OS defined internal const int COR_E_FILELOAD = unchecked((int)0x80131621); internal const int COR_E_FILENOTFOUND = unchecked((int)0x80070002); From a733c0ad6564b9980bb20ae8ced899cf92e354c2 Mon Sep 17 00:00:00 2001 From: Dan Moseley Date: Sun, 27 Aug 2017 22:31:42 -0700 Subject: [PATCH 7/7] Sort HResults --- src/mscorlib/src/System/HResults.cs | 66 ++++++++++++++--------------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/src/mscorlib/src/System/HResults.cs b/src/mscorlib/src/System/HResults.cs index 56be5d141e2f..1e39df7970e3 100644 --- a/src/mscorlib/src/System/HResults.cs +++ b/src/mscorlib/src/System/HResults.cs @@ -27,15 +27,7 @@ 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_HANDLE = unchecked((int)0x80070006); - internal const int E_INVALIDARG = unchecked((int)0x80070057); - 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_ABANDONEDMUTEX = unchecked((int)0x8013152D); 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); @@ -43,30 +35,36 @@ internal static class HResults 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_BADIMAGEFORMAT = unchecked((int)0x8007000B); 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_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_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_INSUFFICIENTMEMORY = unchecked((int)0x8013153D); 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_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); @@ -78,13 +76,14 @@ internal static class HResults 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_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_RUNTIMEWRAPPED = unchecked((int)0x8013153E); @@ -92,10 +91,8 @@ internal static class HResults 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_SERIALIZATION = unchecked((int)0x8013150C); 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); @@ -104,35 +101,38 @@ internal static class HResults 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_THREADSTART = unchecked((int)0x80131525); + 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_ENTRYPOINTNOTFOUND = unchecked((int)0x80131523); - internal const int COR_E_DLLNOTFOUND = unchecked((int)0x80131524); + 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_HOSTPROTECTION = unchecked((int)0x80131640); + 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_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)0x80131419); - 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 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_INVALIDARG = unchecked((int)0x80070057); + internal const int E_NOTIMPL = unchecked((int)0x80004001); + 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_REF_DEF_MISMATCH = unchecked((int)0x80131040); + 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 TYPE_E_TYPEMISMATCH = unchecked((int)0x80028CA0); - internal const int COR_E_ENDOFSTREAM = unchecked((int)0x80070026); // OS defined - internal const int COR_E_FILELOAD = unchecked((int)0x80131621); - internal const int COR_E_FILENOTFOUND = unchecked((int)0x80070002); - internal const int COR_E_DIRECTORYNOTFOUND = unchecked((int)0x80070003); - internal const int COR_E_PATHTOOLONG = unchecked((int)0x800700CE); - internal const int COR_E_IO = unchecked((int)0x80131620); - internal const int ERROR_MRM_MAP_NOT_FOUND = unchecked((int)0x80073B1F); } }