AbandonedMutexException 构造函数
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
初始化 AbandonedMutexException 类的新实例。
重载
| 名称 | 说明 |
|---|---|
| AbandonedMutexException() |
使用默认值初始化 AbandonedMutexException 类的新实例。 |
| AbandonedMutexException(String) |
使用指定的错误消息初始化类的新实例 AbandonedMutexException 。 |
| AbandonedMutexException(Int32, WaitHandle) |
使用放弃的互斥体(如果适用)的指定索引和Mutex表示互斥体的对象初始化类的新实例AbandonedMutexException。 |
| AbandonedMutexException(SerializationInfo, StreamingContext) |
已过时.
使用序列化的数据初始化 AbandonedMutexException 类的新实例。 |
| AbandonedMutexException(String, Exception) |
使用指定的错误消息和内部异常初始化类的新实例 AbandonedMutexException 。 |
| AbandonedMutexException(String, Int32, WaitHandle) |
使用指定的错误消息、放弃的互斥表达式的索引以及放弃的互斥体初始化类的新实例 AbandonedMutexException (如果适用)。 |
| AbandonedMutexException(String, Exception, Int32, WaitHandle) |
使用指定的错误消息、内部异常、放弃的互斥体索引(如果适用)和Mutex表示互斥体的对象初始化类的新实例AbandonedMutexException。 |
AbandonedMutexException()
- Source:
- AbandonedMutexException.cs
- Source:
- AbandonedMutexException.cs
- Source:
- AbandonedMutexException.cs
- Source:
- AbandonedMutexException.cs
- Source:
- AbandonedMutexException.cs
使用默认值初始化 AbandonedMutexException 类的新实例。
public:
AbandonedMutexException();
public AbandonedMutexException();
Public Sub New ()
注解
此构造函数将 Message 新实例的属性初始化为系统提供的消息,该消息描述错误,例如“由于放弃互斥而完成等待”。此消息将考虑当前系统区域性。
下表显示了 AbandonedMutexException实例的初始属性值。
| 财产 | 价值 |
|---|---|
| InnerException |
null。 |
| Message | 系统提供的错误消息字符串。 |
| Mutex |
null。 |
| MutexIndex | -1 (减一)。 |
另请参阅
适用于
AbandonedMutexException(String)
- Source:
- AbandonedMutexException.cs
- Source:
- AbandonedMutexException.cs
- Source:
- AbandonedMutexException.cs
- Source:
- AbandonedMutexException.cs
- Source:
- AbandonedMutexException.cs
使用指定的错误消息初始化类的新实例 AbandonedMutexException 。
public:
AbandonedMutexException(System::String ^ message);
public AbandonedMutexException(string message);
public AbandonedMutexException(string? message);
new System.Threading.AbandonedMutexException : string -> System.Threading.AbandonedMutexException
Public Sub New (message As String)
参数
- message
- String
说明异常原因的错误消息。
注解
内容 message 旨在由人类理解。 此构造函数的调用方必须确保此字符串已本地化为当前系统区域性。
下表显示了使用此构造函数初始化的 AbandonedMutexException 实例的初始属性值。
| 财产 | 价值 |
|---|---|
| InnerException |
null。 |
| Message |
message。 |
| Mutex |
null。 |
| MutexIndex | -1 (减一)。 |
另请参阅
适用于
AbandonedMutexException(Int32, WaitHandle)
- Source:
- AbandonedMutexException.cs
- Source:
- AbandonedMutexException.cs
- Source:
- AbandonedMutexException.cs
- Source:
- AbandonedMutexException.cs
- Source:
- AbandonedMutexException.cs
使用放弃的互斥体(如果适用)的指定索引和Mutex表示互斥体的对象初始化类的新实例AbandonedMutexException。
public:
AbandonedMutexException(int location, System::Threading::WaitHandle ^ handle);
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)
参数
- handle
- WaitHandle
一个 Mutex 表示已放弃的互斥体的对象。
注解
此构造函数将 Message 新实例的属性初始化为系统提供的消息,该消息描述错误,例如“由于放弃互斥而完成等待”。此消息将考虑当前系统区域性。
下表显示了使用此构造函数初始化的 AbandonedMutexException 实例的初始属性值。
| 财产 | 价值 |
|---|---|
| InnerException |
null。 |
| Message | 系统提供的错误消息字符串。 |
| Mutex |
handle。 |
| MutexIndex |
location。 |
另请参阅
适用于
AbandonedMutexException(SerializationInfo, StreamingContext)
- Source:
- AbandonedMutexException.cs
- Source:
- AbandonedMutexException.cs
- Source:
- AbandonedMutexException.cs
- Source:
- AbandonedMutexException.cs
- Source:
- AbandonedMutexException.cs
注意
This API supports obsolete formatter-based serialization. It should not be called or extended by application code.
使用序列化的数据初始化 AbandonedMutexException 类的新实例。
protected:
AbandonedMutexException(System::Runtime::Serialization::SerializationInfo ^ info, System::Runtime::Serialization::StreamingContext context);
[System.Obsolete("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId="SYSLIB0051", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
protected AbandonedMutexException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
protected AbandonedMutexException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
[<System.Obsolete("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId="SYSLIB0051", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
new System.Threading.AbandonedMutexException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Threading.AbandonedMutexException
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 所引发异常的序列化对象数据的对象。
- context
- StreamingContext
StreamingContext包含有关源或目标的上下文信息的对象。
- 属性
注解
在反序列化期间调用此构造函数以重新构造通过流传输的异常对象。 有关详细信息,请参阅 XML 和 SOAP 序列化。
另请参阅
适用于
AbandonedMutexException(String, Exception)
- Source:
- AbandonedMutexException.cs
- Source:
- AbandonedMutexException.cs
- Source:
- AbandonedMutexException.cs
- Source:
- AbandonedMutexException.cs
- Source:
- AbandonedMutexException.cs
使用指定的错误消息和内部异常初始化类的新实例 AbandonedMutexException 。
public:
AbandonedMutexException(System::String ^ message, Exception ^ inner);
public AbandonedMutexException(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
说明异常原因的错误消息。
- inner
- Exception
是当前异常原因的异常。 如果未 innernull 参数,则会在处理内部异常的 catch 块中引发当前异常。
注解
内容 message 旨在由人类理解。 此构造函数的调用方必须确保此字符串已本地化为当前系统区域性。
作为上一个异常的直接结果引发的异常应包括对 InnerException 属性中上一个异常的引用。
InnerException 属性返回传入构造函数的相同值,或者如果 null 属性未向构造函数提供内部异常值,则返回 InnerException。
下表显示了使用此构造函数初始化的 AbandonedMutexException 实例的初始属性值。
| 财产 | 价值 |
|---|---|
| InnerException |
inner。 |
| Message |
message。 |
| Mutex |
null。 |
| MutexIndex | -1 (减一)。 |
另请参阅
适用于
AbandonedMutexException(String, Int32, WaitHandle)
- Source:
- AbandonedMutexException.cs
- Source:
- AbandonedMutexException.cs
- Source:
- AbandonedMutexException.cs
- Source:
- AbandonedMutexException.cs
- Source:
- AbandonedMutexException.cs
使用指定的错误消息、放弃的互斥表达式的索引以及放弃的互斥体初始化类的新实例 AbandonedMutexException (如果适用)。
public:
AbandonedMutexException(System::String ^ message, int location, System::Threading::WaitHandle ^ handle);
public AbandonedMutexException(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
说明异常原因的错误消息。
- handle
- WaitHandle
一个 Mutex 表示已放弃的互斥体的对象。
注解
内容 message 旨在由人类理解。 此构造函数的调用方必须确保此字符串已本地化为当前系统区域性。
下表显示了使用此构造函数初始化的 AbandonedMutexException 实例的初始属性值。
| 财产 | 价值 |
|---|---|
| InnerException |
null。 |
| Message |
message。 |
| Mutex |
handle。 |
| MutexIndex |
location。 |
另请参阅
适用于
AbandonedMutexException(String, Exception, Int32, WaitHandle)
- Source:
- AbandonedMutexException.cs
- Source:
- AbandonedMutexException.cs
- Source:
- AbandonedMutexException.cs
- Source:
- AbandonedMutexException.cs
- Source:
- AbandonedMutexException.cs
使用指定的错误消息、内部异常、放弃的互斥体索引(如果适用)和Mutex表示互斥体的对象初始化类的新实例AbandonedMutexException。
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);
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
说明异常原因的错误消息。
- inner
- Exception
是当前异常原因的异常。 如果未 innernull 参数,则会在处理内部异常的 catch 块中引发当前异常。
- handle
- WaitHandle
一个 Mutex 表示已放弃的互斥体的对象。
注解
内容 message 是一个文本字符串,旨在告知用户异常。 此构造函数的调用方必须确保此字符串已本地化为当前系统区域性。
作为上一个异常的直接结果引发的异常应包括对 InnerException 属性中上一个异常的引用。
InnerException 属性返回传入构造函数的相同值,或者如果 null 属性未向构造函数提供内部异常值,则返回 InnerException。
下表显示了使用此构造函数初始化的 AbandonedMutexException 实例的初始属性值。
| 财产 | 价值 |
|---|---|
| InnerException |
inner。 |
| Message |
message。 |
| Mutex |
handle。 |
| MutexIndex |
location。 |