mscorlib(4.0.0.0) API with additions
AbandonedMutexException.cs
3 
4 namespace System.Threading
5 {
8  [ComVisible(false)]
9  [__DynamicallyInvokable]
11  {
12  private int m_MutexIndex = -1;
13 
14  private Mutex m_Mutex;
15 
18  [__DynamicallyInvokable]
19  public Mutex Mutex
20  {
21  [__DynamicallyInvokable]
22  get
23  {
24  return m_Mutex;
25  }
26  }
27 
30  [__DynamicallyInvokable]
31  public int MutexIndex
32  {
33  [__DynamicallyInvokable]
34  get
35  {
36  return m_MutexIndex;
37  }
38  }
39 
41  [__DynamicallyInvokable]
43  : base(Environment.GetResourceString("Threading.AbandonedMutexException"))
44  {
45  SetErrorCode(-2146233043);
46  }
47 
50  [__DynamicallyInvokable]
51  public AbandonedMutexException(string message)
52  : base(message)
53  {
54  SetErrorCode(-2146233043);
55  }
56 
60  [__DynamicallyInvokable]
61  public AbandonedMutexException(string message, Exception inner)
62  : base(message, inner)
63  {
64  SetErrorCode(-2146233043);
65  }
66 
70  [__DynamicallyInvokable]
71  public AbandonedMutexException(int location, WaitHandle handle)
72  : base(Environment.GetResourceString("Threading.AbandonedMutexException"))
73  {
74  SetErrorCode(-2146233043);
75  SetupException(location, handle);
76  }
77 
82  [__DynamicallyInvokable]
83  public AbandonedMutexException(string message, int location, WaitHandle handle)
84  : base(message)
85  {
86  SetErrorCode(-2146233043);
87  SetupException(location, handle);
88  }
89 
95  [__DynamicallyInvokable]
96  public AbandonedMutexException(string message, Exception inner, int location, WaitHandle handle)
97  : base(message, inner)
98  {
99  SetErrorCode(-2146233043);
100  SetupException(location, handle);
101  }
102 
103  private void SetupException(int location, WaitHandle handle)
104  {
105  m_MutexIndex = location;
106  if (handle != null)
107  {
108  m_Mutex = (handle as Mutex);
109  }
110  }
111 
116  : base(info, context)
117  {
118  }
119  }
120 }
Encapsulates operating system–specific objects that wait for exclusive access to shared resources.
Definition: WaitHandle.cs:15
AbandonedMutexException(string message, Exception inner)
Initializes a new instance of the T:System.Threading.AbandonedMutexException class with a specified e...
Serves as the base class for system exceptions namespace.
AbandonedMutexException(string message)
Initializes a new instance of the T:System.Threading.AbandonedMutexException class with a specified e...
Definition: __Canon.cs:3
A synchronization primitive that can also be used for interprocess synchronization.
Definition: Mutex.cs:17
Mutex Mutex
Gets the abandoned mutex that caused the exception, if known.
AbandonedMutexException(SerializationInfo info, StreamingContext context)
Initializes a new instance of the T:System.Threading.AbandonedMutexException class with serialized da...
Describes the source and destination of a given serialized stream, and provides an additional caller-...
Provides information about, and means to manipulate, the current environment and platform....
Definition: Environment.cs:21
int MutexIndex
Gets the index of the abandoned mutex that caused the exception, if known.
The exception that is thrown when one thread acquires a T:System.Threading.Mutex object that another ...
Stores all the data needed to serialize or deserialize an object. This class cannot be inherited.
AbandonedMutexException(string message, Exception inner, int location, WaitHandle handle)
Initializes a new instance of the T:System.Threading.AbandonedMutexException class with a specified e...
AbandonedMutexException(int location, WaitHandle handle)
Initializes a new instance of the T:System.Threading.AbandonedMutexException class with a specified i...
AbandonedMutexException()
Initializes a new instance of the T:System.Threading.AbandonedMutexException class with default value...
Represents errors that occur during application execution.To browse the .NET Framework source code fo...
Definition: Exception.cs:22
Specifies that the class can be serialized.
AbandonedMutexException(string message, int location, WaitHandle handle)
Initializes a new instance of the T:System.Threading.AbandonedMutexException class with a specified e...