13 [__DynamicallyInvokable]
16 private string _fileName;
18 private string _fusionLog;
22 [__DynamicallyInvokable]
25 [__DynamicallyInvokable]
35 [__DynamicallyInvokable]
38 [__DynamicallyInvokable]
50 [SecuritySafeCritical]
59 [__DynamicallyInvokable]
61 : base(
Environment.GetResourceString(
"IO.FileLoad"))
63 SetErrorCode(-2146232799);
68 [__DynamicallyInvokable]
72 SetErrorCode(-2146232799);
78 [__DynamicallyInvokable]
80 : base(message, inner)
82 SetErrorCode(-2146232799);
88 [__DynamicallyInvokable]
92 SetErrorCode(-2146232799);
100 [__DynamicallyInvokable]
102 : base(message, inner)
104 SetErrorCode(-2146232799);
105 _fileName = fileName;
108 private void SetMessageField()
110 if (_message ==
null)
112 _message = FormatFileLoadExceptionMessage(_fileName, base.HResult);
118 [__DynamicallyInvokable]
122 if (_fileName !=
null && _fileName.Length != 0)
126 if (base.InnerException !=
null)
128 text = text +
" ---> " + base.InnerException.ToString();
159 : base(info, context)
161 _fileName = info.GetString(
"FileLoad_FileName");
164 _fusionLog = info.GetString(
"FileLoad_FusionLog");
175 SetErrorCode(hResult);
176 _fileName = fileName;
177 _fusionLog = fusionLog;
188 base.GetObjectData(info, context);
189 info.AddValue(
"FileLoad_FileName", _fileName, typeof(
string));
192 info.AddValue(
"FileLoad_FusionLog",
FusionLog, typeof(
string));
199 [SecuritySafeCritical]
200 internal static string FormatFileLoadExceptionMessage(
string fileName,
int hResult)
203 GetFileLoadExceptionMessage(hResult, JitHelpers.GetStringHandleOnStack(ref s));
205 GetMessageForHR(hResult, JitHelpers.GetStringHandleOnStack(ref s2));
211 [SuppressUnmanagedCodeSecurity]
212 private static extern void GetFileLoadExceptionMessage(
int hResult, StringHandleOnStack retString);
216 [SuppressUnmanagedCodeSecurity]
217 private static extern void GetMessageForHR(
int hresult, StringHandleOnStack retString);
static string NewLine
Gets the newline string defined for this environment.
Describes a set of security permissions applied to code. This class cannot be inherited.
abstract string FullName
Gets the fully qualified name of the type, including its namespace but not its assembly.
new Type GetType()
Gets the runtime type of the current instance.
string FileName
Gets the name of the file that causes this exception.
Describes the source and destination of a given serialized stream, and provides an additional caller-...
FileLoadException(string message)
Initializes a new instance of the T:System.IO.FileLoadException class with the specified error messag...
FileLoadException(SerializationInfo info, StreamingContext context)
Initializes a new instance of the T:System.IO.FileLoadException class with serialized data.
override string ToString()
Returns the fully qualified name of the current exception, and possibly the error message,...
SecurityAction
Specifies the security actions that can be performed using declarative security.
Provides information about, and means to manipulate, the current environment and platform....
override string Message
Gets the error message and the name of the file that caused this exception.
string FusionLog
Gets the log file that describes why an assembly load failed.
virtual string StackTrace
Gets a string representation of the immediate frames on the call stack.
FileLoadException(string message, string fileName, Exception inner)
Initializes a new instance of the T:System.IO.FileLoadException class with a specified error message,...
The exception that is thrown when an I/O error occurs.
FileLoadException(string message, string fileName)
Initializes a new instance of the T:System.IO.FileLoadException class with a specified error message ...
FileLoadException()
Initializes a new instance of the T:System.IO.FileLoadException class, setting the P:System....
FileLoadException(string message, Exception inner)
Initializes a new instance of the T:System.IO.FileLoadException class with a specified error message ...
CharSet
Dictates which character set marshaled strings should use.
Stores all the data needed to serialize or deserialize an object. This class cannot be inherited.
static CultureInfo CurrentCulture
Gets or sets the T:System.Globalization.CultureInfo object that represents the culture used by the cu...
The exception that is thrown when a managed assembly is found but cannot be loaded.
override void GetObjectData(SerializationInfo info, StreamingContext context)
Sets the T:System.Runtime.Serialization.SerializationInfo with the file name and additional exception...
Represents errors that occur during application execution.To browse the .NET Framework source code fo...
Specifies that the class can be serialized.
Provides information about a specific culture (called a locale for unmanaged code development)....
SecurityPermissionFlag
Specifies access flags for the security permission object.
The exception that is thrown when a security error is detected.