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;
<Compile Include="$(BclSourcesRoot)\System\OutOfMemoryException.cs" />
<Compile Include="$(BclSourcesRoot)\System\Delegate.cs" />
<Compile Include="$(BclSourcesRoot)\System\MulticastDelegate.cs" />
- <Compile Include="$(BclSourcesRoot)\System\__HResults.cs" />
- <Compile Include="$(BclSourcesRoot)\System\HResults.cs" />
<Compile Include="$(BclSourcesRoot)\System\BCLDebug.cs" />
<Compile Include="$(BclSourcesRoot)\System\Activator.cs" />
<Compile Include="$(BclSourcesRoot)\System\AccessViolationException.cs" />
<Compile Include="$(BclSourcesRoot)\System\Environment.cs" />
<Compile Include="$(BclSourcesRoot)\System\GC.cs" />
<Compile Include="$(BclSourcesRoot)\System\Guid.CoreCLR.cs" />
+ <Compile Include="$(BclSourcesRoot)\System\HResults.cs" />
<Compile Include="$(BclSourcesRoot)\System\InsufficientMemoryException.cs" />
<Compile Include="$(BclSourcesRoot)\System\IntPtr.cs" />
<Compile Include="$(BclSourcesRoot)\System\Internal.cs" />
</ItemGroup>
<ItemGroup>
<Compile Include="$(BclSourcesRoot)\System\IO\__Error.cs" />
- <Compile Include="$(BclSourcesRoot)\System\IO\__HResults.cs" />
<Compile Include="$(BclSourcesRoot)\System\IO\BinaryReader.cs" />
<Compile Include="$(BclSourcesRoot)\System\IO\Directory.cs" />
<Compile Include="$(BclSourcesRoot)\System\IO\SearchOption.cs" />
</ItemGroup>
<ItemGroup>
<Compile Include="$(BclSourcesRoot)\System\Resources\__FastResourceComparer.cs" />
- <Compile Include="$(BclSourcesRoot)\System\Resources\__HResults.cs" />
<Compile Include="$(BclSourcesRoot)\System\Resources\FileBasedResourceGroveler.cs" />
<Compile Include="$(BclSourcesRoot)\System\Resources\IResourceGroveler.cs" />
<Compile Include="$(BclSourcesRoot)\System\Resources\ManifestBasedResourceGroveler.cs" />
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
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)
public ArgumentException()
: base(SR.Arg_ArgumentException)
{
- HResult = __HResults.COR_E_ARGUMENT;
+ HResult = HResults.COR_E_ARGUMENT;
}
// Creates a new ArgumentException with its message
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)
: 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)
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
: base(message, paramName)
{
_actualValue = actualValue;
- HResult = __HResults.COR_E_ARGUMENTOUTOFRANGE;
+ HResult = HResults.COR_E_ARGUMENTOUTOFRANGE;
}
protected ArgumentOutOfRangeException(SerializationInfo info, StreamingContext context)
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
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)
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
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)
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;
}
if (_message == null)
{
if ((_fileName == null) &&
- (HResult == __HResults.COR_E_EXCEPTION))
+ (HResult == HResults.COR_E_EXCEPTION))
_message = SR.Arg_BadImageFormatException;
else
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)
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;
}
}
}
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)
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)
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)
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)
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;
}
}
}
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)
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)
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)
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)
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;
}
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;
}
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)
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)
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;
}
}
}
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;
}
}
}
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)
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)
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;
}
}
}
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
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)
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)
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)
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;
}
}
}
: 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)
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)
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)
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)
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)
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;
}
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)
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)
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)
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;
}
}
}
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)
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)
{
Types = classes;
LoaderExceptions = exceptions;
- HResult = __HResults.COR_E_REFLECTIONTYPELOAD;
+ HResult = HResults.COR_E_REFLECTIONTYPELOAD;
}
public ReflectionTypeLoadException(Type[] classes, Exception[] exceptions, string message)
{
Types = classes;
LoaderExceptions = exceptions;
- HResult = __HResults.COR_E_REFLECTIONTYPELOAD;
+ HResult = HResults.COR_E_REFLECTIONTYPELOAD;
}
public override void GetObjectData(SerializationInfo info, StreamingContext context)
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)
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;
}
}
}
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;
}
}
}
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)
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)
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)
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)
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;
}
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)
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;
}
}
}
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)
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)
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(
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);
}
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)
{
internal ThreadAbortException()
{
- HResult = __HResults.COR_E_THREADABORTED;
+ HResult = HResults.COR_E_THREADABORTED;
}
public object ExceptionState => null;
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;
}
}
}
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)
{
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)
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)
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)
private TypeInitializationException()
: base(SR.TypeInitialization_Default)
{
- HResult = __HResults.COR_E_TYPEINITIALIZATION;
+ HResult = HResults.COR_E_TYPEINITIALIZATION;
}
// 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)
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)
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)
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)
public AppDomainUnloadedException()
: base(SR.Arg_AppDomainUnloadedException)
{
- HResult = __HResults.COR_E_APPDOMAINUNLOADED;
+ HResult = HResults.COR_E_APPDOMAINUNLOADED;
}
//
_message = null;
_stackTrace = null;
_dynamicMethods = null;
- HResult = __HResults.COR_E_EXCEPTION;
+ HResult = HResults.COR_E_EXCEPTION;
_xcode = _COMPlusExceptionCode;
_xptrs = (IntPtr)0;
//
//
//===========================================================================*/
+// Note: FACILITY_URT is defined as 0x13 (0x8013xxxx). Within that
+// range, 0x1yyy is for Runtime errors (used for Security, Metadata, etc).
+// In that subrange, 0x15zz and 0x16zz have been allocated for classlib-type
+// HResults. Also note that some of our HResults have to map to certain
+// COM HR's, etc.
+
+// Another arbitrary decision... Feel free to change this, as long as you
+// renumber the HResults yourself (and update rexcep.h).
+// Reflection will use 0x1600 -> 0x161f. IO will use 0x1620 -> 0x163f.
+// Security will use 0x1640 -> 0x165f
+
using System;
namespace System
{
- // Note: FACILITY_URT is defined as 0x13 (0x8013xxxx). Within that
- // range, 0x1yyy is for Runtime errors (used for Security, Metadata, etc).
- // In that subrange, 0x15zz and 0x16zz have been allocated for classlib-type
- // HResults. Also note that some of our HResults have to map to certain
- // COM HR's, etc.
-
- // Another arbitrary decision... Feel free to change this, as long as you
- // renumber the HResults yourself (and update rexcep.h).
- // Reflection will use 0x1600 -> 0x161f. IO will use 0x1620 -> 0x163f.
- // Security will use 0x1640 -> 0x165f
-
- // There are HResults files in the IO, Remoting, Reflection &
- // Security/Util directories as well, so choose your HResults carefully.
internal static class HResults
{
- internal const int APPMODEL_ERROR_NO_PACKAGE = unchecked((int)0x80073D54);
- internal const int CLDB_E_FILE_CORRUPT = unchecked((int)0x8013110e);
- internal const int CLDB_E_FILE_OLDVER = unchecked((int)0x80131107);
- internal const int CLDB_E_INDEX_NOTFOUND = unchecked((int)0x80131124);
- internal const int CLR_E_BIND_ASSEMBLY_NOT_FOUND = unchecked((int)0x80132004);
- internal const int CLR_E_BIND_ASSEMBLY_PUBLIC_KEY_MISMATCH = unchecked((int)0x80132001);
- internal const int CLR_E_BIND_ASSEMBLY_VERSION_TOO_LOW = unchecked((int)0x80132000);
- internal const int CLR_E_BIND_TYPE_NOT_FOUND = unchecked((int)0x80132005);
- internal const int CLR_E_BIND_UNRECOGNIZED_IDENTITY_FORMAT = unchecked((int)0x80132003);
internal const int COR_E_ABANDONEDMUTEX = unchecked((int)0x8013152D);
internal const int COR_E_AMBIGUOUSMATCH = unchecked((int)0x8000211D);
internal const int COR_E_APPDOMAINUNLOADED = unchecked((int)0x80131014);
internal const int COR_E_ARGUMENTOUTOFRANGE = unchecked((int)0x80131502);
internal const int COR_E_ARITHMETIC = unchecked((int)0x80070216);
internal const int COR_E_ARRAYTYPEMISMATCH = unchecked((int)0x80131503);
- internal const int COR_E_ASSEMBLYEXPECTED = unchecked((int)0x80131018);
+ internal const int COR_E_BADEXEFORMAT = unchecked((int)0x800700C1);
internal const int COR_E_BADIMAGEFORMAT = unchecked((int)0x8007000B);
internal const int COR_E_CANNOTUNLOADAPPDOMAIN = unchecked((int)0x80131015);
- internal const int COR_E_CODECONTRACTFAILED = unchecked((int)0x80131542);
+ internal const int COR_E_COMEMULATE = unchecked((int)0x80131535);
internal const int COR_E_CONTEXTMARSHAL = unchecked((int)0x80131504);
internal const int COR_E_CUSTOMATTRIBUTEFORMAT = unchecked((int)0x80131605);
internal const int COR_E_DATAMISALIGNED = unchecked((int)0x80131541);
+ internal const int COR_E_DIRECTORYNOTFOUND = unchecked((int)0x80070003);
internal const int COR_E_DIVIDEBYZERO = unchecked((int)0x80020012); // DISP_E_DIVBYZERO
internal const int COR_E_DLLNOTFOUND = unchecked((int)0x80131524);
internal const int COR_E_DUPLICATEWAITOBJECT = unchecked((int)0x80131529);
+ internal const int COR_E_ENDOFSTREAM = unchecked((int)0x80070026); // OS defined
internal const int COR_E_ENTRYPOINTNOTFOUND = unchecked((int)0x80131523);
internal const int COR_E_EXCEPTION = unchecked((int)0x80131500);
internal const int COR_E_EXECUTIONENGINE = unchecked((int)0x80131506);
internal const int COR_E_FIELDACCESS = unchecked((int)0x80131507);
- internal const int COR_E_FIXUPSINEXE = unchecked((int)0x80131019);
+ internal const int COR_E_FILELOAD = unchecked((int)0x80131621);
+ internal const int COR_E_FILENOTFOUND = unchecked((int)0x80070002);
internal const int COR_E_FORMAT = unchecked((int)0x80131537);
+ internal const int COR_E_HOSTPROTECTION = unchecked((int)0x80131640);
internal const int COR_E_INDEXOUTOFRANGE = unchecked((int)0x80131508);
internal const int COR_E_INSUFFICIENTEXECUTIONSTACK = unchecked((int)0x80131578);
+ internal const int COR_E_INSUFFICIENTMEMORY = unchecked((int)0x8013153D);
internal const int COR_E_INVALIDCAST = unchecked((int)0x80004002);
internal const int COR_E_INVALIDCOMOBJECT = unchecked((int)0x80131527);
internal const int COR_E_INVALIDFILTERCRITERIA = unchecked((int)0x80131601);
internal const int COR_E_INVALIDOLEVARIANTTYPE = unchecked((int)0x80131531);
internal const int COR_E_INVALIDOPERATION = unchecked((int)0x80131509);
- internal const int COR_E_INVALIDPROGRAM = unchecked((int)0x8013153a);
+ internal const int COR_E_INVALIDPROGRAM = unchecked((int)0x8013153A);
+ internal const int COR_E_IO = unchecked((int)0x80131620);
internal const int COR_E_KEYNOTFOUND = unchecked((int)0x80131577);
internal const int COR_E_MARSHALDIRECTIVE = unchecked((int)0x80131535);
internal const int COR_E_MEMBERACCESS = unchecked((int)0x8013151A);
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_OPERATIONCANCELED = unchecked((int)0x8013153B);
internal const int COR_E_OUTOFMEMORY = unchecked((int)0x8007000E);
internal const int COR_E_OVERFLOW = unchecked((int)0x80131516);
+ internal const int COR_E_PATHTOOLONG = unchecked((int)0x800700CE);
internal const int COR_E_PLATFORMNOTSUPPORTED = unchecked((int)0x80131539);
internal const int COR_E_RANK = unchecked((int)0x80131517);
internal const int COR_E_REFLECTIONTYPELOAD = unchecked((int)0x80131602);
- internal const int COR_E_REMOTING = unchecked((int)0x8013150b);
- internal const int COR_E_RUNTIMEWRAPPED = unchecked((int)0x8013153e);
+ internal const int COR_E_RUNTIMEWRAPPED = unchecked((int)0x8013153E);
internal const int COR_E_SAFEARRAYRANKMISMATCH = unchecked((int)0x80131538);
internal const int COR_E_SAFEARRAYTYPEMISMATCH = unchecked((int)0x80131533);
+ internal const int COR_E_SAFEHANDLEMISSINGATTRIBUTE = unchecked((int)0x80131623);
internal const int COR_E_SECURITY = unchecked((int)0x8013150A);
+ internal const int COR_E_SEMAPHOREFULL = unchecked((int)0x8013152B);
internal const int COR_E_SERIALIZATION = unchecked((int)0x8013150C);
- internal const int COR_E_SERVER = unchecked((int)0x8013150e);
internal const int COR_E_STACKOVERFLOW = unchecked((int)0x800703E9);
internal const int COR_E_SYNCHRONIZATIONLOCK = unchecked((int)0x80131518);
internal const int COR_E_SYSTEM = unchecked((int)0x80131501);
internal const int COR_E_TARGET = unchecked((int)0x80131603);
internal const int COR_E_TARGETINVOCATION = unchecked((int)0x80131604);
- internal const int COR_E_TARGETPARAMCOUNT = unchecked((int)0x8002000e);
+ internal const int COR_E_TARGETPARAMCOUNT = unchecked((int)0x8002000E);
internal const int COR_E_THREADABORTED = unchecked((int)0x80131530);
internal const int COR_E_THREADINTERRUPTED = unchecked((int)0x80131519);
internal const int COR_E_THREADSTART = unchecked((int)0x80131525);
internal const int COR_E_THREADSTATE = unchecked((int)0x80131520);
+ internal const int COR_E_THREADSTOP = unchecked((int)0x80131521);
internal const int COR_E_TIMEOUT = unchecked((int)0x80131505);
internal const int COR_E_TYPEACCESS = unchecked((int)0x80131543);
internal const int COR_E_TYPEINITIALIZATION = unchecked((int)0x80131534);
internal const int COR_E_TYPELOAD = unchecked((int)0x80131522);
internal const int COR_E_TYPEUNLOADED = unchecked((int)0x80131013);
internal const int COR_E_UNAUTHORIZEDACCESS = unchecked((int)0x80070005);
+ internal const int COR_E_UNSUPPORTEDFORMAT = unchecked((int)0x80131523);
internal const int COR_E_VERIFICATION = unchecked((int)0x8013150D);
internal const int COR_E_WAITHANDLECANNOTBEOPENED = unchecked((int)0x8013152C);
internal const int CORSEC_E_CRYPTO = unchecked((int)0x80131430);
internal const int CORSEC_E_CRYPTO_UNEX_OPER = unchecked((int)0x80131431);
- internal const int CORSEC_E_INVALID_IMAGE_FORMAT = unchecked((int)0x8013141d);
- internal const int CORSEC_E_INVALID_PUBLICKEY = unchecked((int)0x8013141e);
- internal const int CORSEC_E_INVALID_STRONGNAME = unchecked((int)0x8013141a);
internal const int CORSEC_E_MIN_GRANT_FAIL = unchecked((int)0x80131417);
- internal const int CORSEC_E_MISSING_STRONGNAME = unchecked((int)0x8013141b);
internal const int CORSEC_E_NO_EXEC_PERM = unchecked((int)0x80131418);
internal const int CORSEC_E_POLICY_EXCEPTION = unchecked((int)0x80131416);
- internal const int CORSEC_E_SIGNATURE_MISMATCH = unchecked((int)0x80131420);
internal const int CORSEC_E_XMLSYNTAX = unchecked((int)0x80131419);
- internal const int CTL_E_DEVICEIOERROR = unchecked((int)0x800A0039);
- internal const int CTL_E_DIVISIONBYZERO = unchecked((int)0x800A000B);
- internal const int CTL_E_FILENOTFOUND = unchecked((int)0x800A0035);
- internal const int CTL_E_OUTOFMEMORY = unchecked((int)0x800A0007);
- internal const int CTL_E_OUTOFSTACKSPACE = unchecked((int)0x800A001C);
- internal const int CTL_E_OVERFLOW = unchecked((int)0x800A0006);
- internal const int CTL_E_PATHFILEACCESSERROR = unchecked((int)0x800A004B);
- internal const int CTL_E_PATHNOTFOUND = unchecked((int)0x800A004C);
- internal const int CTL_E_PERMISSIONDENIED = unchecked((int)0x800A0046);
- internal const int E_ELEMENTNOTAVAILABLE = unchecked((int)0x802B001F);
- internal const int E_ELEMENTNOTENABLED = unchecked((int)0x802B001E);
+ internal const int DISP_E_OVERFLOW = unchecked((int)0x8002000A);
+ internal const int E_BOUNDS = unchecked((int)0x8000000B);
+ internal const int E_CHANGED_STATE = unchecked((int)0x8000000C);
internal const int E_FAIL = unchecked((int)0x80004005);
internal const int E_HANDLE = unchecked((int)0x80070006);
- internal const int E_ILLEGAL_DELEGATE_ASSIGNMENT = unchecked((int)0x80000018);
- internal const int E_ILLEGAL_METHOD_CALL = unchecked((int)0x8000000E);
- internal const int E_ILLEGAL_STATE_CHANGE = unchecked((int)0x8000000D);
internal const int E_INVALIDARG = unchecked((int)0x80070057);
- internal const int E_LAYOUTCYCLE = unchecked((int)0x802B0014);
internal const int E_NOTIMPL = unchecked((int)0x80004001);
- internal const int E_OUTOFMEMORY = unchecked((int)0x8007000E);
- internal const int E_POINTER = unchecked((int)0x80004003L);
- internal const int E_XAMLPARSEFAILED = unchecked((int)0x802B000A);
- internal const int ERROR_BAD_EXE_FORMAT = unchecked((int)0x800700C1);
- internal const int ERROR_BAD_NET_NAME = unchecked((int)0x80070043);
- internal const int ERROR_BAD_NETPATH = unchecked((int)0x80070035);
- internal const int ERROR_DISK_CORRUPT = unchecked((int)0x80070571);
- internal const int ERROR_DLL_INIT_FAILED = unchecked((int)0x8007045A);
- internal const int ERROR_DLL_NOT_FOUND = unchecked((int)0x80070485);
- internal const int ERROR_EXE_MARKED_INVALID = unchecked((int)0x800700C0);
- internal const int ERROR_FILE_CORRUPT = unchecked((int)0x80070570);
- internal const int ERROR_FILE_INVALID = unchecked((int)0x800703EE);
- internal const int ERROR_FILE_NOT_FOUND = unchecked((int)0x80070002);
- internal const int ERROR_INVALID_DLL = unchecked((int)0x80070482);
- internal const int ERROR_INVALID_NAME = unchecked((int)0x8007007B);
- internal const int ERROR_INVALID_ORDINAL = unchecked((int)0x800700B6);
- internal const int ERROR_INVALID_PARAMETER = unchecked((int)0x80070057);
- internal const int ERROR_LOCK_VIOLATION = unchecked((int)0x80070021);
- internal const int ERROR_MOD_NOT_FOUND = unchecked((int)0x8007007E);
- internal const int ERROR_NO_UNICODE_TRANSLATION = unchecked((int)0x80070459);
- internal const int ERROR_NOACCESS = unchecked((int)0x800703E6);
- internal const int ERROR_NOT_READY = unchecked((int)0x80070015);
- internal const int ERROR_OPEN_FAILED = unchecked((int)0x8007006E);
- internal const int ERROR_PATH_NOT_FOUND = unchecked((int)0x80070003);
- internal const int ERROR_SHARING_VIOLATION = unchecked((int)0x80070020);
- internal const int ERROR_TOO_MANY_OPEN_FILES = unchecked((int)0x80070004);
- internal const int ERROR_UNRECOGNIZED_VOLUME = unchecked((int)0x800703ED);
- internal const int ERROR_WRONG_TARGET_NAME = unchecked((int)0x80070574);
- internal const int FUSION_E_ASM_MODULE_MISSING = unchecked((int)0x80131042);
- internal const int FUSION_E_CACHEFILE_FAILED = unchecked((int)0x80131052);
- internal const int FUSION_E_CODE_DOWNLOAD_DISABLED = unchecked((int)0x80131048);
- internal const int FUSION_E_HOST_GAC_ASM_MISMATCH = unchecked((int)0x80131050);
+ internal const int E_POINTER = unchecked((int)0x80004003);
+ internal const int ERROR_MRM_MAP_NOT_FOUND = unchecked((int)0x80073B1F);
internal const int FUSION_E_INVALID_NAME = unchecked((int)0x80131047);
- internal const int FUSION_E_INVALID_PRIVATE_ASM_LOCATION = unchecked((int)0x80131041);
- internal const int FUSION_E_LOADFROM_BLOCKED = unchecked((int)0x80131051);
- internal const int FUSION_E_PRIVATE_ASM_DISALLOWED = unchecked((int)0x80131044);
internal const int FUSION_E_REF_DEF_MISMATCH = unchecked((int)0x80131040);
- internal const int FUSION_E_SIGNATURE_CHECK_FAILED = unchecked((int)0x80131045);
- internal const int INET_E_CANNOT_CONNECT = unchecked((int)0x800C0004);
- internal const int INET_E_CONNECTION_TIMEOUT = unchecked((int)0x800C000B);
- internal const int INET_E_DATA_NOT_AVAILABLE = unchecked((int)0x800C0007);
- internal const int INET_E_DOWNLOAD_FAILURE = unchecked((int)0x800C0008);
- internal const int INET_E_OBJECT_NOT_FOUND = unchecked((int)0x800C0006);
- internal const int INET_E_RESOURCE_NOT_FOUND = unchecked((int)0x800C0005);
- internal const int INET_E_UNKNOWN_PROTOCOL = unchecked((int)0x800C000D);
- internal const int ISS_E_ALLOC_TOO_LARGE = unchecked((int)0x80131484);
- internal const int ISS_E_BLOCK_SIZE_TOO_SMALL = unchecked((int)0x80131483);
- internal const int ISS_E_CALLER = unchecked((int)0x801314A1);
- internal const int ISS_E_CORRUPTED_STORE_FILE = unchecked((int)0x80131480);
- internal const int ISS_E_CREATE_DIR = unchecked((int)0x80131468);
- internal const int ISS_E_CREATE_MUTEX = unchecked((int)0x80131464);
- internal const int ISS_E_DEPRECATE = unchecked((int)0x801314A0);
- internal const int ISS_E_FILE_NOT_MAPPED = unchecked((int)0x80131482);
- internal const int ISS_E_FILE_WRITE = unchecked((int)0x80131466);
- internal const int ISS_E_GET_FILE_SIZE = unchecked((int)0x80131463);
- internal const int ISS_E_ISOSTORE = unchecked((int)0x80131450);
- internal const int ISS_E_LOCK_FAILED = unchecked((int)0x80131465);
- internal const int ISS_E_MACHINE = unchecked((int)0x801314A3);
- internal const int ISS_E_MACHINE_DACL = unchecked((int)0x801314A4);
- internal const int ISS_E_MAP_VIEW_OF_FILE = unchecked((int)0x80131462);
- internal const int ISS_E_OPEN_FILE_MAPPING = unchecked((int)0x80131461);
- internal const int ISS_E_OPEN_STORE_FILE = unchecked((int)0x80131460);
- internal const int ISS_E_PATH_LENGTH = unchecked((int)0x801314A2);
- internal const int ISS_E_SET_FILE_POINTER = unchecked((int)0x80131467);
- internal const int ISS_E_STORE_NOT_OPEN = unchecked((int)0x80131469);
- internal const int ISS_E_STORE_VERSION = unchecked((int)0x80131481);
- internal const int ISS_E_TABLE_ROW_NOT_FOUND = unchecked((int)0x80131486);
- internal const int ISS_E_USAGE_WILL_EXCEED_QUOTA = unchecked((int)0x80131485);
- internal const int META_E_BAD_SIGNATURE = unchecked((int)0x80131192);
- internal const int META_E_CA_FRIENDS_SN_REQUIRED = unchecked((int)0x801311e6);
- internal const int MSEE_E_ASSEMBLYLOADINPROGRESS = unchecked((int)0x80131016);
+ internal const int NTE_FAIL = unchecked((int)0x80090020);
+ internal const int REGDB_E_CLASSNOTREG = unchecked((int)0x80040154);
internal const int RO_E_CLOSED = unchecked((int)0x80000013);
- internal const int E_BOUNDS = unchecked((int)0x8000000B);
- internal const int RO_E_METADATA_NAME_NOT_FOUND = unchecked((int)0x8000000F);
- internal const int SECURITY_E_INCOMPATIBLE_EVIDENCE = unchecked((int)0x80131403);
- internal const int SECURITY_E_INCOMPATIBLE_SHARE = unchecked((int)0x80131401);
- internal const int SECURITY_E_UNVERIFIABLE = unchecked((int)0x80131402);
- internal const int STG_E_PATHNOTFOUND = unchecked((int)0x80030003);
- public const int COR_E_DIRECTORYNOTFOUND = unchecked((int)0x80070003);
- public const int COR_E_ENDOFSTREAM = unchecked((int)0x80070026); // OS defined
- public const int COR_E_FILELOAD = unchecked((int)0x80131621);
- public const int COR_E_FILENOTFOUND = unchecked((int)0x80070002);
- public const int COR_E_IO = unchecked((int)0x80131620);
- public const int COR_E_PATHTOOLONG = unchecked((int)0x800700CE);
+ internal const int TYPE_E_TYPEMISMATCH = unchecked((int)0x80028CA0);
}
}
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)
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));
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)
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)
+++ /dev/null
-// 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);
- }
-}
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;
}
}
}
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)
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)
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)
// 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.
}
+++ /dev/null
-// 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
private RuntimeWrappedException(Object thrownObject)
: base(SR.RuntimeWrappedException)
{
- HResult = System.__HResults.COR_E_RUNTIMEWRAPPED;
+ HResult = System.HResults.COR_E_RUNTIMEWRAPPED;
m_wrappedException = thrownObject;
}
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)
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)
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)
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)
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)
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)
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)
}
catch (Exception ex)
{
- if (__HResults.E_BOUNDS == ex._HResult)
+ if (HResults.E_BOUNDS == ex._HResult)
throw new ArgumentOutOfRangeException(nameof(index));
throw;
}
catch (Exception ex)
{
- if (__HResults.E_BOUNDS == ex._HResult)
+ if (HResults.E_BOUNDS == ex._HResult)
throw new ArgumentOutOfRangeException(nameof(index));
throw;
}
catch (Exception ex)
{
- if (__HResults.E_BOUNDS == ex._HResult)
+ if (HResults.E_BOUNDS == ex._HResult)
throw new ArgumentOutOfRangeException(nameof(index));
throw;
}
catch (Exception ex)
{
- if (__HResults.E_BOUNDS == ex._HResult)
+ if (HResults.E_BOUNDS == ex._HResult)
throw new ArgumentOutOfRangeException(nameof(index));
throw;
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;
}
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;
}
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;
}
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;
}
public Point GetPoint()
{
if (this.Type != PropertyType.Point)
- throw new InvalidCastException(SR.Format(SR.InvalidCast_WinRTIPropertyValueElement, this.Type, "Point"), __HResults.TYPE_E_TYPEMISMATCH);
+ throw new InvalidCastException(SR.Format(SR.InvalidCast_WinRTIPropertyValueElement, this.Type, "Point"), HResults.TYPE_E_TYPEMISMATCH);
Contract.EndContractBlock();
return Unbox<Point>(IReferenceFactory.s_pointType);
public Size GetSize()
{
if (this.Type != PropertyType.Size)
- throw new InvalidCastException(SR.Format(SR.InvalidCast_WinRTIPropertyValueElement, this.Type, "Size"), __HResults.TYPE_E_TYPEMISMATCH);
+ throw new InvalidCastException(SR.Format(SR.InvalidCast_WinRTIPropertyValueElement, this.Type, "Size"), HResults.TYPE_E_TYPEMISMATCH);
Contract.EndContractBlock();
return Unbox<Size>(IReferenceFactory.s_sizeType);
public Rect GetRect()
{
if (this.Type != PropertyType.Rect)
- throw new InvalidCastException(SR.Format(SR.InvalidCast_WinRTIPropertyValueElement, this.Type, "Rect"), __HResults.TYPE_E_TYPEMISMATCH);
+ throw new InvalidCastException(SR.Format(SR.InvalidCast_WinRTIPropertyValueElement, this.Type, "Rect"), HResults.TYPE_E_TYPEMISMATCH);
Contract.EndContractBlock();
return Unbox<Rect>(IReferenceFactory.s_rectType);
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;
}
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;
}
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;
}
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;
}
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;
}
public Point[] GetPointArray()
{
if (this.Type != PropertyType.PointArray)
- throw new InvalidCastException(SR.Format(SR.InvalidCast_WinRTIPropertyValueElement, this.Type, "Point[]"), __HResults.TYPE_E_TYPEMISMATCH);
+ throw new InvalidCastException(SR.Format(SR.InvalidCast_WinRTIPropertyValueElement, this.Type, "Point[]"), HResults.TYPE_E_TYPEMISMATCH);
Contract.EndContractBlock();
return UnboxArray<Point>(IReferenceFactory.s_pointType);
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();
public Rect[] GetRectArray()
{
if (this.Type != PropertyType.RectArray)
- throw new InvalidCastException(SR.Format(SR.InvalidCast_WinRTIPropertyValueElement, this.Type, "Rect[]"), __HResults.TYPE_E_TYPEMISMATCH);
+ throw new InvalidCastException(SR.Format(SR.InvalidCast_WinRTIPropertyValueElement, this.Type, "Rect[]"), HResults.TYPE_E_TYPEMISMATCH);
Contract.EndContractBlock();
return UnboxArray<Rect>(IReferenceFactory.s_rectType);
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
// 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
}
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
}
// 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)
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();
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];
if (!found)
{
Exception e = new KeyNotFoundException(SR.Arg_KeyNotFound);
- e.SetErrorCode(__HResults.E_BOUNDS);
+ e.SetErrorCode(HResults.E_BOUNDS);
throw e;
}
if (!keyFound)
{
Exception e = new KeyNotFoundException(SR.Arg_KeyNotFound);
- e.SetErrorCode(__HResults.E_BOUNDS);
+ e.SetErrorCode(HResults.E_BOUNDS);
throw e;
}
if (!removed)
{
Exception e = new KeyNotFoundException(SR.Arg_KeyNotFound);
- e.SetErrorCode(__HResults.E_BOUNDS);
+ e.SetErrorCode(HResults.E_BOUNDS);
throw e;
}
}
if (!m_hasCurrent)
{
- throw WindowsRuntimeMarshal.GetExceptionForHR(__HResults.E_BOUNDS, null);
+ throw WindowsRuntimeMarshal.GetExceptionForHR(HResults.E_BOUNDS, null);
}
return m_enumerator.Current;
}
catch (InvalidOperationException e)
{
- throw WindowsRuntimeMarshal.GetExceptionForHR(__HResults.E_CHANGED_STATE, e);
+ throw WindowsRuntimeMarshal.GetExceptionForHR(HResults.E_CHANGED_STATE, e);
}
return m_hasCurrent;
}
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;
}
catch (Exception ex)
{
- if (__HResults.E_BOUNDS == ex._HResult)
+ if (HResults.E_BOUNDS == ex._HResult)
throw new KeyNotFoundException(SR.Arg_KeyNotFound);
throw;
}
if (!keyFound)
{
Exception e = new KeyNotFoundException(SR.Arg_KeyNotFound);
- e.SetErrorCode(__HResults.E_BOUNDS);
+ e.SetErrorCode(HResults.E_BOUNDS);
throw e;
}
}
catch (ArgumentOutOfRangeException ex)
{
- ex.SetErrorCode(__HResults.E_BOUNDS);
+ ex.SetErrorCode(HResults.E_BOUNDS);
throw;
}
}
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;
}
}
}
catch (Exception ex)
{
- if (__HResults.E_BOUNDS == ex._HResult)
+ if (HResults.E_BOUNDS == ex._HResult)
throw new ArgumentOutOfRangeException(nameof(index));
throw;
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();
}
}
catch (ArgumentOutOfRangeException ex)
{
- throw WindowsRuntimeMarshal.GetExceptionForHR(__HResults.E_BOUNDS, ex, "ArgumentOutOfRange_IndexOutOfRange");
+ throw WindowsRuntimeMarshal.GetExceptionForHR(HResults.E_BOUNDS, ex, "ArgumentOutOfRange_IndexOutOfRange");
}
}
}
catch (ArgumentOutOfRangeException ex)
{
- throw WindowsRuntimeMarshal.GetExceptionForHR(__HResults.E_BOUNDS, ex, "ArgumentOutOfRange_IndexOutOfRange");
+ throw WindowsRuntimeMarshal.GetExceptionForHR(HResults.E_BOUNDS, ex, "ArgumentOutOfRange_IndexOutOfRange");
}
}
catch (ArgumentOutOfRangeException ex)
{
// Change error code to match what WinRT expects
- ex.SetErrorCode(__HResults.E_BOUNDS);
+ ex.SetErrorCode(HResults.E_BOUNDS);
throw;
}
}
catch (ArgumentOutOfRangeException ex)
{
// Change error code to match what WinRT expects
- ex.SetErrorCode(__HResults.E_BOUNDS);
+ ex.SetErrorCode(HResults.E_BOUNDS);
throw;
}
}
if (_this.Count == 0)
{
Exception e = new InvalidOperationException(SR.InvalidOperation_CannotRemoveLastFromEmptyCollection);
- e.SetErrorCode(__HResults.E_BOUNDS);
+ e.SetErrorCode(HResults.E_BOUNDS);
throw e;
}
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;
}
}
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;
}
}
}
catch (ArgumentOutOfRangeException ex)
{
- throw WindowsRuntimeMarshal.GetExceptionForHR(__HResults.E_BOUNDS, ex, "ArgumentOutOfRange_IndexOutOfRange");
+ throw WindowsRuntimeMarshal.GetExceptionForHR(HResults.E_BOUNDS, ex, "ArgumentOutOfRange_IndexOutOfRange");
}
}
}
catch (ArgumentOutOfRangeException ex)
{
- throw WindowsRuntimeMarshal.GetExceptionForHR(__HResults.E_BOUNDS, ex, "ArgumentOutOfRange_IndexOutOfRange");
+ throw WindowsRuntimeMarshal.GetExceptionForHR(HResults.E_BOUNDS, ex, "ArgumentOutOfRange_IndexOutOfRange");
}
}
}
catch (ArgumentOutOfRangeException ex)
{
- throw WindowsRuntimeMarshal.GetExceptionForHR(__HResults.E_BOUNDS, ex, "ArgumentOutOfRange_IndexOutOfRange");
+ throw WindowsRuntimeMarshal.GetExceptionForHR(HResults.E_BOUNDS, ex, "ArgumentOutOfRange_IndexOutOfRange");
}
}
catch (ArgumentOutOfRangeException ex)
{
// Change error code to match what WinRT expects
- ex.SetErrorCode(__HResults.E_BOUNDS);
+ ex.SetErrorCode(HResults.E_BOUNDS);
throw;
}
}
catch (ArgumentOutOfRangeException ex)
{
// Change error code to match what WinRT expects
- ex.SetErrorCode(__HResults.E_BOUNDS);
+ ex.SetErrorCode(HResults.E_BOUNDS);
throw;
}
}
if (_this.Count == 0)
{
Exception e = new InvalidOperationException(SR.InvalidOperation_CannotRemoveLastFromEmptyCollection);
- e.SetErrorCode(__HResults.E_BOUNDS);
+ e.SetErrorCode(HResults.E_BOUNDS);
throw e;
}
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;
}
}
}
catch (Exception ex)
{
- if (__HResults.E_BOUNDS == ex._HResult)
+ if (HResults.E_BOUNDS == ex._HResult)
return false;
throw;
}
catch (Exception ex)
{
- if (__HResults.E_BOUNDS == ex._HResult)
+ if (HResults.E_BOUNDS == ex._HResult)
throw new KeyNotFoundException(SR.Arg_KeyNotFound);
throw;
}
}
catch (Exception ex)
{
- if (__HResults.E_BOUNDS == ex._HResult)
+ if (HResults.E_BOUNDS == ex._HResult)
throw new ArgumentOutOfRangeException(nameof(index));
throw;
}
catch (Exception ex)
{
- if (__HResults.E_BOUNDS == ex._HResult)
+ if (HResults.E_BOUNDS == ex._HResult)
throw new ArgumentOutOfRangeException(nameof(index));
throw;
}
catch (Exception ex)
{
- if (__HResults.E_BOUNDS == ex._HResult)
+ if (HResults.E_BOUNDS == ex._HResult)
throw new ArgumentOutOfRangeException(nameof(index));
throw;
}
catch (Exception ex)
{
- if (__HResults.E_BOUNDS == ex._HResult)
+ if (HResults.E_BOUNDS == ex._HResult)
throw new ArgumentOutOfRangeException(nameof(index));
throw;
// 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;
// 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;
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)
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
int resourceId)
: base(null)
{
- HResult = __HResults.COR_E_TYPELOAD;
+ HResult = HResults.COR_E_TYPELOAD;
ClassName = className;
AssemblyName = assemblyName;
MessageArg = messageArg;
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-//=============================================================================
-//
-//
-// Purpose: Define HResult constants. Every exception has one of these.
-//
-//
-//===========================================================================*/
-// Note: FACILITY_URT is defined as 0x13 (0x8013xxxx). Within that
-// range, 0x1yyy is for Runtime errors (used for Security, Metadata, etc).
-// In that subrange, 0x15zz and 0x16zz have been allocated for classlib-type
-// HResults. Also note that some of our HResults have to map to certain
-// COM HR's, etc.
-
-// Another arbitrary decision... Feel free to change this, as long as you
-// renumber the HResults yourself (and update rexcep.h).
-// Reflection will use 0x1600 -> 0x161f. IO will use 0x1620 -> 0x163f.
-// Security will use 0x1640 -> 0x165f
-
-// There are __HResults files in the IO, Remoting, Reflection &
-// Security/Util directories as well, so choose your HResults carefully.
-
-using System;
-
-namespace System
-{
- internal static class __HResults
- {
- internal const int RO_E_CLOSED = unchecked((int)0x80000013);
- internal const int E_BOUNDS = unchecked((int)0x8000000B);
- internal const int E_CHANGED_STATE = unchecked((int)0x8000000C);
- internal const int E_FAIL = unchecked((int)0x80004005);
- internal const int E_POINTER = unchecked((int)0x80004003);
- internal const int E_NOTIMPL = unchecked((int)0x80004001);
- internal const int REGDB_E_CLASSNOTREG = unchecked((int)0x80040154);
- internal const int COR_E_AMBIGUOUSMATCH = unchecked((int)0x8000211D);
- internal const int COR_E_APPDOMAINUNLOADED = unchecked((int)0x80131014);
- internal const int COR_E_APPLICATION = unchecked((int)0x80131600);
- internal const int COR_E_ARGUMENT = unchecked((int)0x80070057);
- internal const int COR_E_ARGUMENTOUTOFRANGE = unchecked((int)0x80131502);
- internal const int COR_E_ARITHMETIC = unchecked((int)0x80070216);
- internal const int COR_E_ARRAYTYPEMISMATCH = unchecked((int)0x80131503);
- internal const int COR_E_BADIMAGEFORMAT = unchecked((int)0x8007000B);
- internal const int COR_E_BADEXEFORMAT = unchecked((int)0x800700C1);
- internal const int COR_E_TYPEUNLOADED = unchecked((int)0x80131013);
- internal const int COR_E_CANNOTUNLOADAPPDOMAIN = unchecked((int)0x80131015);
- internal const int COR_E_COMEMULATE = unchecked((int)0x80131535);
- internal const int COR_E_CONTEXTMARSHAL = unchecked((int)0x80131504);
- internal const int COR_E_DATAMISALIGNED = unchecked((int)0x80131541);
- internal const int COR_E_TIMEOUT = unchecked((int)0x80131505);
- internal const int COR_E_CUSTOMATTRIBUTEFORMAT = unchecked((int)0x80131605);
- internal const int COR_E_DIVIDEBYZERO = unchecked((int)0x80020012); // DISP_E_DIVBYZERO
- internal const int COR_E_DUPLICATEWAITOBJECT = unchecked((int)0x80131529);
- internal const int COR_E_EXCEPTION = unchecked((int)0x80131500);
- internal const int COR_E_EXECUTIONENGINE = unchecked((int)0x80131506);
- internal const int COR_E_FIELDACCESS = unchecked((int)0x80131507);
- internal const int COR_E_FORMAT = unchecked((int)0x80131537);
- internal const int COR_E_INDEXOUTOFRANGE = unchecked((int)0x80131508);
- internal const int COR_E_INSUFFICIENTMEMORY = unchecked((int)0x8013153D);
- internal const int COR_E_INSUFFICIENTEXECUTIONSTACK = unchecked((int)0x80131578);
- internal const int COR_E_INVALIDCAST = unchecked((int)0x80004002);
- internal const int COR_E_INVALIDCOMOBJECT = unchecked((int)0x80131527);
- internal const int COR_E_INVALIDFILTERCRITERIA = unchecked((int)0x80131601);
- internal const int COR_E_INVALIDOLEVARIANTTYPE = unchecked((int)0x80131531);
- internal const int COR_E_INVALIDOPERATION = unchecked((int)0x80131509);
- internal const int COR_E_INVALIDPROGRAM = unchecked((int)0x8013153A);
- internal const int COR_E_KEYNOTFOUND = unchecked((int)0x80131577);
- internal const int COR_E_MARSHALDIRECTIVE = unchecked((int)0x80131535);
- internal const int COR_E_MEMBERACCESS = unchecked((int)0x8013151A);
- internal const int COR_E_METHODACCESS = unchecked((int)0x80131510);
- internal const int COR_E_MISSINGFIELD = unchecked((int)0x80131511);
- internal const int COR_E_MISSINGMANIFESTRESOURCE = unchecked((int)0x80131532);
- internal const int COR_E_MISSINGMEMBER = unchecked((int)0x80131512);
- internal const int COR_E_MISSINGMETHOD = unchecked((int)0x80131513);
- internal const int COR_E_MISSINGSATELLITEASSEMBLY = unchecked((int)0x80131536);
- internal const int COR_E_MULTICASTNOTSUPPORTED = unchecked((int)0x80131514);
- internal const int COR_E_NOTFINITENUMBER = unchecked((int)0x80131528);
- internal const int COR_E_PLATFORMNOTSUPPORTED = unchecked((int)0x80131539);
- internal const int COR_E_NOTSUPPORTED = unchecked((int)0x80131515);
- internal const int COR_E_NULLREFERENCE = unchecked((int)0x80004003);
- internal const int COR_E_OBJECTDISPOSED = unchecked((int)0x80131622);
- internal const int COR_E_OPERATIONCANCELED = unchecked((int)0x8013153B);
- internal const int COR_E_OUTOFMEMORY = unchecked((int)0x8007000E);
- internal const int COR_E_OVERFLOW = unchecked((int)0x80131516);
- internal const int COR_E_RANK = unchecked((int)0x80131517);
- internal const int COR_E_REFLECTIONTYPELOAD = unchecked((int)0x80131602);
- internal const int COR_E_RUNTIMEWRAPPED = unchecked((int)0x8013153E);
- internal const int COR_E_SAFEARRAYRANKMISMATCH = unchecked((int)0x80131538);
- internal const int COR_E_SAFEARRAYTYPEMISMATCH = unchecked((int)0x80131533);
- internal const int COR_E_SAFEHANDLEMISSINGATTRIBUTE = unchecked((int)0x80131623);
- internal const int COR_E_SECURITY = unchecked((int)0x8013150A);
- internal const int COR_E_SERIALIZATION = unchecked((int)0x8013150C);
- internal const int COR_E_SEMAPHOREFULL = unchecked((int)0x8013152B);
- internal const int COR_E_WAITHANDLECANNOTBEOPENED = unchecked((int)0x8013152C);
- internal const int COR_E_ABANDONEDMUTEX = unchecked((int)0x8013152D);
- internal const int COR_E_STACKOVERFLOW = unchecked((int)0x800703E9);
- internal const int COR_E_SYNCHRONIZATIONLOCK = unchecked((int)0x80131518);
- internal const int COR_E_SYSTEM = unchecked((int)0x80131501);
- internal const int COR_E_TARGET = unchecked((int)0x80131603);
- internal const int COR_E_TARGETINVOCATION = unchecked((int)0x80131604);
- internal const int COR_E_TARGETPARAMCOUNT = unchecked((int)0x8002000e);
- internal const int COR_E_THREADABORTED = unchecked((int)0x80131530);
- internal const int COR_E_THREADINTERRUPTED = unchecked((int)0x80131519);
- internal const int COR_E_THREADSTATE = unchecked((int)0x80131520);
- internal const int COR_E_THREADSTOP = unchecked((int)0x80131521);
- internal const int COR_E_THREADSTART = unchecked((int)0x80131525);
- internal const int COR_E_TYPEACCESS = unchecked((int)0x80131543);
- internal const int COR_E_TYPEINITIALIZATION = unchecked((int)0x80131534);
- internal const int COR_E_TYPELOAD = unchecked((int)0x80131522);
- internal const int COR_E_ENTRYPOINTNOTFOUND = unchecked((int)0x80131523);
- internal const int COR_E_DLLNOTFOUND = unchecked((int)0x80131524);
- internal const int COR_E_UNAUTHORIZEDACCESS = unchecked((int)0x80070005);
- internal const int COR_E_UNSUPPORTEDFORMAT = unchecked((int)0x80131523);
- internal const int COR_E_VERIFICATION = unchecked((int)0x8013150D);
- internal const int COR_E_HOSTPROTECTION = unchecked((int)0x80131640);
- internal const int CORSEC_E_MIN_GRANT_FAIL = unchecked((int)0x80131417);
- internal const int CORSEC_E_NO_EXEC_PERM = unchecked((int)0x80131418);
- internal const int CORSEC_E_POLICY_EXCEPTION = unchecked((int)0x80131416);
- internal const int CORSEC_E_XMLSYNTAX = unchecked((int)0x80131418);
- internal const int NTE_FAIL = unchecked((int)0x80090020);
- internal const int CORSEC_E_CRYPTO = unchecked((int)0x80131430);
- internal const int CORSEC_E_CRYPTO_UNEX_OPER = unchecked((int)0x80131431);
- internal const int DISP_E_OVERFLOW = unchecked((int)0x8002000a);
- internal const int FUSION_E_REF_DEF_MISMATCH = unchecked((int)0x80131040);
- internal const int FUSION_E_INVALID_NAME = unchecked((int)0x80131047);
- internal const int TYPE_E_TYPEMISMATCH = unchecked((int)0x80028ca0);
- }
-}