Skip to content

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>()

View source

Summary: Creates a new asynchronous subject instance for the specified type.

Type parameters

NameDescription
TThe type of elements processed by the subject.

Returns: ISubjectAsync -- An ISubjectAsync that represents the newly created asynchronous subject.

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)

View source

Summary: Creates a new asynchronous subject instance with the specified publishing and state options.

Type parameters

NameDescription
TThe type of elements processed by the subject.

Parameters

NameTypeDescription
options[SubjectCreationOptions?](#The options that configure the publishing behavior and statefulness of the subject. Must specify valid values for publishing and statelessness.

Returns: ISubjectAsync -- An asynchronous subject instance configured according to the specified options.

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

TypeCondition
System.ArgumentOutOfRangeExceptionThrown if the specified combination of publishing and statelessness options is not supported.