AbandonedMutexException AbandonedMutexException AbandonedMutexException AbandonedMutexException Constructors

定义

重载

AbandonedMutexException() AbandonedMutexException() AbandonedMutexException()

使用默认值初始化 AbandonedMutexException 类的新实例。Initializes a new instance of the AbandonedMutexException class with default values.

AbandonedMutexException(String) AbandonedMutexException(String) AbandonedMutexException(String) AbandonedMutexException(String)

用指定的错误消息初始化 AbandonedMutexException 类的新实例。Initializes a new instance of the AbandonedMutexException class with a specified error message.

AbandonedMutexException(Int32, WaitHandle) AbandonedMutexException(Int32, WaitHandle) AbandonedMutexException(Int32, WaitHandle) AbandonedMutexException(Int32, WaitHandle)

用被放弃的互斥体的指定索引(如果可用)和表示该互斥体的 AbandonedMutexException 对象初始化 Mutex 类的新实例。Initializes a new instance of the AbandonedMutexException class with a specified index for the abandoned mutex, if applicable, and a Mutex object that represents the mutex.

AbandonedMutexException(SerializationInfo, StreamingContext) AbandonedMutexException(SerializationInfo, StreamingContext) AbandonedMutexException(SerializationInfo, StreamingContext) AbandonedMutexException(SerializationInfo, StreamingContext)

用序列化数据初始化 AbandonedMutexException 类的新实例。Initializes a new instance of the AbandonedMutexException class with serialized data.

AbandonedMutexException(String, Exception) AbandonedMutexException(String, Exception) AbandonedMutexException(String, Exception) AbandonedMutexException(String, Exception)

用指定的错误信息和内部异常初始化 AbandonedMutexException 类的新实例。Initializes a new instance of the AbandonedMutexException class with a specified error message and inner exception.

AbandonedMutexException(String, Int32, WaitHandle) AbandonedMutexException(String, Int32, WaitHandle) AbandonedMutexException(String, Int32, WaitHandle) AbandonedMutexException(String, Int32, WaitHandle)

用指定的错误信息、被放弃的互斥体的索引(如果可用)以及被放弃的互斥体初始化 AbandonedMutexException 类的新实例。Initializes a new instance of the AbandonedMutexException class with a specified error message, the index of the abandoned mutex, if applicable, and the abandoned mutex.

AbandonedMutexException(String, Exception, Int32, WaitHandle) AbandonedMutexException(String, Exception, Int32, WaitHandle) AbandonedMutexException(String, Exception, Int32, WaitHandle) AbandonedMutexException(String, Exception, Int32, WaitHandle)

用指定的错误信息、内部异常、被放弃的互斥体的索引(如果可用)以及表示该互斥体的 AbandonedMutexException 对象初始化 Mutex 类的新实例。Initializes a new instance of the AbandonedMutexException class with a specified error message, the inner exception, the index for the abandoned mutex, if applicable, and a Mutex object that represents the mutex.

AbandonedMutexException() AbandonedMutexException() AbandonedMutexException()

使用默认值初始化 AbandonedMutexException 类的新实例。Initializes a new instance of the AbandonedMutexException class with default values.

public:
 AbandonedMutexException();
public AbandonedMutexException ();
Public Sub New ()

注解

此构造函数将Message新实例的属性初始化为系统提供的描述错误的消息, 如 "由于放弃的 mutex, 等待时间已完成。"This constructor initializes the Message property of the new instance to a system-supplied message that describes the error, such as "The wait completed due to an abandoned mutex." 此消息将当前系统区域性考虑在内。This message takes into account the current system culture.

下表显示 AbandonedMutexException 的实例的初始属性值。The following table shows the initial property values for an instance of AbandonedMutexException.

PropertyProperty Value
InnerException nullnull.
Message 系统提供的错误消息字符串。The system-supplied error message string.
Mutex nullnull.
MutexIndex -1 (减 1)。-1 (minus one).
另请参阅

AbandonedMutexException(String) AbandonedMutexException(String) AbandonedMutexException(String) AbandonedMutexException(String)

用指定的错误消息初始化 AbandonedMutexException 类的新实例。Initializes a new instance of the AbandonedMutexException class with a specified error message.

public:
 AbandonedMutexException(System::String ^ message);
public AbandonedMutexException (string message);
new System.Threading.AbandonedMutexException : string -> System.Threading.AbandonedMutexException
Public Sub New (message As String)

参数

message
String String String String

解释异常原因的错误消息。An error message that explains the reason for the exception.

注解

message 的内容被设计为人可理解的形式。The content of message is intended to be understood by humans. 此构造函数的调用方需要确保此字符串已针对当前系统区域性进行了本地化。The caller of this constructor is required to ensure that this string has been localized for the current system culture.

下表显示使用此构造函数AbandonedMutexException初始化的实例的初始属性值。The following table shows the initial property values for an instance of AbandonedMutexException initialized with this constructor.

PropertyProperty Value
InnerException nullnull.
Message messagemessage.
Mutex nullnull.
MutexIndex -1 (减 1)。-1 (minus one).
另请参阅

AbandonedMutexException(Int32, WaitHandle) AbandonedMutexException(Int32, WaitHandle) AbandonedMutexException(Int32, WaitHandle) AbandonedMutexException(Int32, WaitHandle)

用被放弃的互斥体的指定索引(如果可用)和表示该互斥体的 AbandonedMutexException 对象初始化 Mutex 类的新实例。Initializes a new instance of the AbandonedMutexException class with a specified index for the abandoned mutex, if applicable, and a Mutex object that represents the mutex.

public:
 AbandonedMutexException(int location, System::Threading::WaitHandle ^ handle);
public AbandonedMutexException (int location, System.Threading.WaitHandle handle);
new System.Threading.AbandonedMutexException : int * System.Threading.WaitHandle -> System.Threading.AbandonedMutexException
Public Sub New (location As Integer, handle As WaitHandle)

参数

location
Int32 Int32 Int32 Int32

如果对 WaitAny 方法引发异常,则为等待句柄数组中被放弃的互斥体的索引,如果对 WaitOneWaitAll 方法引发异常,则为 -1。The index of the abandoned mutex in the array of wait handles if the exception is thrown for the WaitAny method, or -1 if the exception is thrown for the WaitOne or WaitAll methods.

handle
WaitHandle WaitHandle WaitHandle WaitHandle

一个 Mutex 对象,表示被放弃的互斥体。A Mutex object that represents the abandoned mutex.

注解

此构造函数将Message新实例的属性初始化为系统提供的描述错误的消息, 如 "由于放弃的 mutex, 等待时间已完成。"This constructor initializes the Message property of the new instance to a system-supplied message that describes the error, such as "The wait completed due to an abandoned mutex." 此消息将当前系统区域性考虑在内。This message takes into account the current system culture.

下表显示使用此构造函数AbandonedMutexException初始化的实例的初始属性值。The following table shows the initial property values for an instance of AbandonedMutexException initialized with this constructor.

PropertyProperty Value
InnerException nullnull.
Message 系统提供的错误消息字符串。A system-supplied error message string.
Mutex handlehandle.
MutexIndex locationlocation.
另请参阅

AbandonedMutexException(SerializationInfo, StreamingContext) AbandonedMutexException(SerializationInfo, StreamingContext) AbandonedMutexException(SerializationInfo, StreamingContext) AbandonedMutexException(SerializationInfo, StreamingContext)

用序列化数据初始化 AbandonedMutexException 类的新实例。Initializes a new instance of the AbandonedMutexException class with serialized data.

protected:
 AbandonedMutexException(System::Runtime::Serialization::SerializationInfo ^ info, System::Runtime::Serialization::StreamingContext context);
protected AbandonedMutexException (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
new System.Threading.AbandonedMutexException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Threading.AbandonedMutexException
Protected Sub New (info As SerializationInfo, context As StreamingContext)

参数

info
SerializationInfo SerializationInfo SerializationInfo SerializationInfo

存放有关所引发异常的序列化对象数据的 SerializationInfo 对象。The SerializationInfo object that holds the serialized object data about the exception being thrown.

context
StreamingContext StreamingContext StreamingContext StreamingContext

StreamingContext 对象,它包含有关源或目标的上下文信息。The StreamingContext object that contains contextual information about the source or destination.

注解

此构造函数在反序列化过程中调用,以便重建通过流传输的异常对象。This constructor is called during deserialization to reconstitute the exception object transmitted over a stream. 有关详细信息,请参阅XML 和 SOAP 序列化For more information, see XML and SOAP Serialization.

另请参阅

AbandonedMutexException(String, Exception) AbandonedMutexException(String, Exception) AbandonedMutexException(String, Exception) AbandonedMutexException(String, Exception)

用指定的错误信息和内部异常初始化 AbandonedMutexException 类的新实例。Initializes a new instance of the AbandonedMutexException class with a specified error message and inner exception.

public:
 AbandonedMutexException(System::String ^ message, Exception ^ inner);
public AbandonedMutexException (string message, Exception inner);
new System.Threading.AbandonedMutexException : string * Exception -> System.Threading.AbandonedMutexException
Public Sub New (message As String, inner As Exception)

参数

message
String String String String

解释异常原因的错误消息。An error message that explains the reason for the exception.

inner
Exception Exception Exception Exception

导致当前异常的异常。The exception that is the cause of the current exception. 如果 inner 参数不为 null,则当前异常将在处理内部异常的 catch 块中引发。If the inner parameter is not null, the current exception is raised in a catch block that handles the inner exception.

注解

message 的内容被设计为人可理解的形式。The content of message is intended to be understood by humans. 此构造函数的调用方需要确保此字符串已针对当前系统区域性进行了本地化。The caller of this constructor is required to ensure that this string has been localized for the current system culture.

因前一个异常而直接引发的异常应在 InnerException 属性中包含对前一个异常的引用。An exception that is thrown as a direct result of a previous exception should include a reference to the previous exception in the InnerException property. InnerException 属性返回的值与传递到构造函数中的值相同;或者,如果 null 属性没有向构造函数提供内部异常值,则为 InnerExceptionThe InnerException property returns the same value that is passed into the constructor, or null if the InnerException property does not supply the inner exception value to the constructor.

下表显示使用此构造函数AbandonedMutexException初始化的实例的初始属性值。The following table shows the initial property values for an instance of AbandonedMutexException initialized with this constructor.

PropertyProperty Value
InnerException innerinner.
Message messagemessage.
Mutex nullnull.
MutexIndex -1 (减 1)。-1 (minus one).
另请参阅

AbandonedMutexException(String, Int32, WaitHandle) AbandonedMutexException(String, Int32, WaitHandle) AbandonedMutexException(String, Int32, WaitHandle) AbandonedMutexException(String, Int32, WaitHandle)

用指定的错误信息、被放弃的互斥体的索引(如果可用)以及被放弃的互斥体初始化 AbandonedMutexException 类的新实例。Initializes a new instance of the AbandonedMutexException class with a specified error message, the index of the abandoned mutex, if applicable, and the abandoned mutex.

public:
 AbandonedMutexException(System::String ^ message, int location, System::Threading::WaitHandle ^ handle);
public AbandonedMutexException (string message, int location, System.Threading.WaitHandle handle);
new System.Threading.AbandonedMutexException : string * int * System.Threading.WaitHandle -> System.Threading.AbandonedMutexException
Public Sub New (message As String, location As Integer, handle As WaitHandle)

参数

message
String String String String

解释异常原因的错误消息。An error message that explains the reason for the exception.

location
Int32 Int32 Int32 Int32

如果对 WaitAny 方法引发异常,则为等待句柄数组中被放弃的互斥体的索引,如果对 WaitOneWaitAll 方法引发异常,则为 -1。The index of the abandoned mutex in the array of wait handles if the exception is thrown for the WaitAny method, or -1 if the exception is thrown for the WaitOne or WaitAll methods.

handle
WaitHandle WaitHandle WaitHandle WaitHandle

一个 Mutex 对象,表示被放弃的互斥体。A Mutex object that represents the abandoned mutex.

注解

message 的内容被设计为人可理解的形式。The content of message is intended to be understood by humans. 此构造函数的调用方需要确保此字符串已针对当前系统区域性进行了本地化。The caller of this constructor is required to ensure that this string has been localized for the current system culture.

下表显示使用此构造函数AbandonedMutexException初始化的实例的初始属性值。The following table shows the initial property values for an instance of AbandonedMutexException initialized with this constructor.

PropertyProperty Value
InnerException nullnull.
Message messagemessage.
Mutex handlehandle.
MutexIndex locationlocation.
另请参阅

AbandonedMutexException(String, Exception, Int32, WaitHandle) AbandonedMutexException(String, Exception, Int32, WaitHandle) AbandonedMutexException(String, Exception, Int32, WaitHandle) AbandonedMutexException(String, Exception, Int32, WaitHandle)

用指定的错误信息、内部异常、被放弃的互斥体的索引(如果可用)以及表示该互斥体的 AbandonedMutexException 对象初始化 Mutex 类的新实例。Initializes a new instance of the AbandonedMutexException class with a specified error message, the inner exception, the index for the abandoned mutex, if applicable, and a Mutex object that represents the mutex.

public:
 AbandonedMutexException(System::String ^ message, Exception ^ inner, int location, System::Threading::WaitHandle ^ handle);
public AbandonedMutexException (string message, Exception inner, int location, System.Threading.WaitHandle handle);
new System.Threading.AbandonedMutexException : string * Exception * int * System.Threading.WaitHandle -> System.Threading.AbandonedMutexException
Public Sub New (message As String, inner As Exception, location As Integer, handle As WaitHandle)

参数

message
String String String String

解释异常原因的错误消息。An error message that explains the reason for the exception.

inner
Exception Exception Exception Exception

导致当前异常的异常。The exception that is the cause of the current exception. 如果 inner 参数不为 null,则当前异常将在处理内部异常的 catch 块中引发。If the inner parameter is not null, the current exception is raised in a catch block that handles the inner exception.

location
Int32 Int32 Int32 Int32

如果对 WaitAny 方法引发异常,则为等待句柄数组中被放弃的互斥体的索引,如果对 WaitOneWaitAll 方法引发异常,则为 -1。The index of the abandoned mutex in the array of wait handles if the exception is thrown for the WaitAny method, or -1 if the exception is thrown for the WaitOne or WaitAll methods.

handle
WaitHandle WaitHandle WaitHandle WaitHandle

一个 Mutex 对象,表示被放弃的互斥体。A Mutex object that represents the abandoned mutex.

注解

的内容message是用于向用户通知异常的文本字符串。The content of message is a text string intended to inform the user about the exception. 此构造函数的调用方需要确保此字符串已针对当前系统区域性进行了本地化。The caller of this constructor is required to ensure that this string has been localized for the current system culture.

因前一个异常而直接引发的异常应在 InnerException 属性中包含对前一个异常的引用。An exception that is thrown as a direct result of a previous exception should include a reference to the previous exception in the InnerException property. InnerException 属性返回的值与传递到构造函数中的值相同;或者,如果 null 属性没有向构造函数提供内部异常值,则为 InnerExceptionThe InnerException property returns the same value that is passed into the constructor, or null if the InnerException property does not supply the inner exception value to the constructor.

下表显示使用此构造函数AbandonedMutexException初始化的实例的初始属性值。The following table shows the initial property values for an instance of AbandonedMutexException initialized with this constructor.

PropertyProperty Value
InnerException innerinner.
Message messagemessage.
Mutex handlehandle.
MutexIndex locationlocation.
另请参阅

适用于