Class ContextDisposable
Represents a disposable resource whose disposal invocation will be posted to the specified SynchronizationContext.
Inherited Members
Namespace: System.Reactive.Disposables
Assembly: System.Reactive.Core.dll
Syntax
public sealed class ContextDisposable : ICancelable, IDisposable
Constructors
| Improve this Doc View SourceContextDisposable(SynchronizationContext, IDisposable)
Initializes a new instance of the ContextDisposable class that uses the specified SynchronizationContext on which to dispose the specified disposable resource.
Declaration
public ContextDisposable(SynchronizationContext context, IDisposable disposable)
Parameters
Type | Name | Description |
---|---|---|
SynchronizationContext | context | Context to perform disposal on. |
IDisposable | disposable | Disposable whose Dispose operation to run on the given synchronization context. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException |
|
Properties
| Improve this Doc View SourceContext
Gets the provided SynchronizationContext.
Declaration
public SynchronizationContext Context { get; }
Property Value
Type | Description |
---|---|
SynchronizationContext |
IsDisposed
Gets a value that indicates whether the object is disposed.
Declaration
public bool IsDisposed { get; }
Property Value
Type | Description |
---|---|
Boolean |
Methods
| Improve this Doc View SourceDispose()
Disposes the underlying disposable on the provided SynchronizationContext.
Declaration
public void Dispose()