SubjectAsync.Create() method¶
Defined in
Type: SubjectAsync
Namespace: ReactiveUI.Extensions.Async.Subjects
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 static ISubjectAsync<T> Create<T>() - 2.
public static ISubjectAsync<T> Create<T>(SubjectCreationOptions? options)
1. Overload¶
public static ISubjectAsync<T> Create<T>()
Summary: Creates a new asynchronous subject instance for the specified type.
Type parameters
| Name | Description |
|---|---|
T | The type of elements processed by the subject. |
Returns: ISubjectAsync
Remarks
The created subject uses the default subject creation options. Use the overload that accepts SubjectCreationOptions to customize subject behavior.
2. Overload¶
public static ISubjectAsync<T> Create<T>(SubjectCreationOptions? options)
Summary: Creates a new asynchronous subject instance with the specified publishing and state options.
Type parameters
| Name | Description |
|---|---|
T | The type of elements processed by the subject. |
Parameters
| Name | Type | Description |
|---|---|---|
options | [SubjectCreationOptions?](# | The options that configure the publishing behavior and statefulness of the subject. Must specify valid values for publishing and statelessness. |
Returns: ISubjectAsync
Remarks
Use this method to create an ISubjectAsync with the desired concurrency and state management characteristics. The returned subject type depends on the values provided in the options parameter.
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentOutOfRangeException | Thrown if the specified combination of publishing and statelessness options is not supported. |