)>
Defined in Type: CompositeDisposable
Namespace: System.Reactive.Disposables
Assembly: System.Reactive.dll
Applies to
netstandard2.0
Overloads
- 1.
public CompositeDisposable() - 2.
public CompositeDisposable(int capacity) - 3.
public CompositeDisposable(params IDisposable[] disposables) - 4.
public CompositeDisposable(IEnumerable<IDisposable> disposables)
1. Overload
public CompositeDisposable()
Summary: Initializes a new instance of the CompositeDisposable class with no disposables contained by it initially.
2. Overload
public CompositeDisposable(int capacity)
Summary: Initializes a new instance of the CompositeDisposable class with the specified number of disposables.
Parameters
| Name | Type | Description |
|---|---|---|
capacity | int | The number of disposables that the new CompositeDisposable can initially store. |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentOutOfRangeException | capacity is less than zero. |
3. Overload
public CompositeDisposable(params IDisposable[] disposables)
Summary: Initializes a new instance of the CompositeDisposable class from a group of disposables.
Parameters
| Name | Type | Description |
|---|---|---|
params disposables | IDisposable[] | Disposables that will be disposed together. |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | disposables is null. |
| System.ArgumentException | Any of the disposables in the disposables collection is null. |
4. Overload
public CompositeDisposable(IEnumerable<IDisposable> disposables)
Summary: Initializes a new instance of the CompositeDisposable class from a group of disposables.
Parameters
| Name | Type | Description |
|---|---|---|
disposables | IEnumerable | Disposables that will be disposed together. |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | disposables is null. |
| System.ArgumentException | Any of the disposables in the disposables collection is null. |