)>
Defined in Type: CompositeDisposableAsync
Namespace: ReactiveUI.Extensions.Async.Disposables
Assembly: ReactiveUI.Extensions.dll
Applies to
net10.0, net10.0-browserwasm1.0, net10.0-desktop1.0, net9.0, net9.0-browserwasm1.0, net9.0-desktop1.0, net8.0, net8.0-ios17.5, net8.0-maccatalyst17.5, net8.0-macos14.2, net8.0-macos14.5, net8.0-tvos17.2, netstandard2.1, net462, net481
Overloads
- 1.
public CompositeDisposableAsync() - 2.
public CompositeDisposableAsync(int capacity) - 3.
public CompositeDisposableAsync(params IAsyncDisposable[] disposables) - 4.
public CompositeDisposableAsync(IEnumerable<IAsyncDisposable> disposables)
1. Overload
public CompositeDisposableAsync()
Summary: Initializes a new instance of the CompositeDisposableAsync class. The backing array is allocated lazily on the first AddAsync call; an unused composite costs only its instance header + gate.
2. Overload
public CompositeDisposableAsync(int capacity)
Summary: Initializes a new instance of the CompositeDisposableAsync class with the specified initial capacity.
Parameters
| Name | Type | Description |
|---|---|---|
capacity | int | The number of elements that the collection can initially store. Must be greater than or equal to 0. |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentOutOfRangeException | Thrown when capacity is less than 0. |
3. Overload
public CompositeDisposableAsync(params IAsyncDisposable[] disposables)
Summary: Initializes a new instance of the CompositeDisposableAsync class that contains the specified disposables — the backing array is sized exactly so no resize occurs.
Parameters
| Name | Type | Description |
|---|---|---|
params disposables | IAsyncDisposable[] | An array of objects implementing IAsyncDisposable. |
4. Overload
public CompositeDisposableAsync(IEnumerable<IAsyncDisposable> disposables)
Summary:
Initializes a new instance of the CompositeDisposableAsync class that contains the specified
disposables. The backing array is sized exactly when disposables implements
ICollection; otherwise it grows from the default capacity.
Parameters
| Name | Type | Description |
|---|---|---|
disposables | IEnumerable | The collection of IAsyncDisposable instances to include. |