mscorlib(4.0.0.0) API with additions
HostExecutionContext.cs
1 using System.Security;
2 
3 namespace System.Threading
4 {
7  {
8  private object state;
9 
12  protected internal object State
13  {
14  get
15  {
16  return state;
17  }
18  set
19  {
20  state = value;
21  }
22  }
23 
26  {
27  }
28 
31  public HostExecutionContext(object state)
32  {
33  this.state = state;
34  }
35 
38  [SecuritySafeCritical]
40  {
41  object obj = state;
42  if (state is IUnknownSafeHandle)
43  {
44  obj = ((IUnknownSafeHandle)state).Clone();
45  }
46  return new HostExecutionContext(state);
47  }
48 
50  public void Dispose()
51  {
52  Dispose(disposing: true);
53  GC.SuppressFinalize(this);
54  }
55 
59  public virtual void Dispose(bool disposing)
60  {
61  }
62  }
63 }
Encapsulates and propagates the host execution context across threads.
void Dispose()
Releases all resources used by the current instance of the T:System.Threading.HostExecutionContext cl...
static void SuppressFinalize(object obj)
Requests that the common language runtime not call the finalizer for the specified object.
Definition: GC.cs:308
Provides a mechanism for releasing unmanaged resources.To browse the .NET Framework source code for t...
Definition: IDisposable.cs:8
HostExecutionContext(object state)
Initializes a new instance of the T:System.Threading.HostExecutionContext class using the specified s...
Definition: __Canon.cs:3
virtual void Dispose(bool disposing)
When overridden in a derived class, releases the unmanaged resources used by the T:System....
internal object State
Gets or sets the state of the host execution context.
HostExecutionContext()
Initializes a new instance of the T:System.Threading.HostExecutionContext class.
virtual HostExecutionContext CreateCopy()
Creates a copy of the current host execution context.
Controls the system garbage collector, a service that automatically reclaims unused memory.
Definition: GC.cs:11