,System.IObservable{--1})} ,System.IObservable{--0})}
Subject.Create(IObserver, IObservable) method¶
Defined in
Type: Subject
Namespace: System.Reactive.Subjects
Assembly: System.Reactive.dll
Applies to
netstandard2.0
Overloads¶
- 1.
public static ISubject<TSource, TResult> Create<TSource, TResult>(IObserver<TSource> observer, IObservable<TResult> observable) - 2.
public static ISubject<T> Create<T>(IObserver<T> observer, IObservable<T> observable)
1. Overload¶
public static ISubject<TSource, TResult> Create<TSource, TResult>(IObserver<TSource> observer, IObservable<TResult> observable)
Summary: Creates a subject from the specified observer and observable.
Type parameters
| Name | Description |
|---|---|
TSource | The type of the elements received by the observer. |
TResult | The type of the elements produced by the observable sequence. |
Parameters
| Name | Type | Description |
|---|---|---|
observer | IObserver | The observer used to send messages to the subject. |
observable | IObservable | The observable used to subscribe to messages sent from the subject. |
Returns: ISubject
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | observer or observable is null. |
2. Overload¶
public static ISubject<T> Create<T>(IObserver<T> observer, IObservable<T> observable)
Summary: Creates a subject from the specified observer and observable.
Type parameters
| Name | Description |
|---|---|
T | The type of the elements received by the observer and produced by the observable sequence. |
Parameters
| Name | Type | Description |
|---|---|---|
observer | IObserver | The observer used to send messages to the subject. |
observable | IObservable | The observable used to subscribe to messages sent from the subject. |
Returns: ISubject
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | observer or observable is null. |