RefCountDisposable(IDisposable) constructor¶
Defined in
Type: RefCountDisposable
Namespace: System.Reactive.Disposables
Assembly: System.Reactive.dll
Applies to
netstandard2.0
Overloads¶
- 1.
public RefCountDisposable(IDisposable disposable) - 2.
public RefCountDisposable(IDisposable disposable, bool throwWhenDisposed)
1. Overload¶
public RefCountDisposable(IDisposable disposable)
Summary: Initializes a new instance of the RefCountDisposable class with the specified disposable.
Parameters
| Name | Type | Description |
|---|---|---|
disposable | IDisposable | Underlying disposable. |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | disposable is null. |
2. Overload¶
public RefCountDisposable(IDisposable disposable, bool throwWhenDisposed)
Summary: Initializes a new instance of the RefCountDisposable class with the specified disposable.
Parameters
| Name | Type | Description |
|---|---|---|
disposable | IDisposable | Underlying disposable. |
throwWhenDisposed | bool | Indicates whether subsequent calls to [GetDisposable](# should throw when this instance is disposed. |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | disposable is null. |