The recording of the first ever ReactiveUI virtual conference is available on our YouTube Channel.

Subject.Create<TSource, TResult>()

Subject.Create<TSource, TResult> Method

Creates a subject from the specified observer and observable.

Namespace:  System.Reactive.Subjects
Assembly:  System.Reactive (in System.Reactive.dll)


Public Shared Function Create(Of TSource, TResult) ( _
    observer As IObserver(Of TSource), _
    observable As IObservable(Of TResult) _
) As ISubject(Of TSource, TResult)
Dim observer As IObserver(Of TSource)
Dim observable As IObservable(Of TResult)
Dim returnValue As ISubject(Of TSource, TResult)

returnValue = Subject.Create(observer, _
public static ISubject<TSource, TResult> Create<TSource, TResult>(
    IObserver<TSource> observer,
    IObservable<TResult> observable
generic<typename TSource, typename TResult>
static ISubject<TSource, TResult>^ Create(
    IObserver<TSource>^ observer, 
    IObservable<TResult>^ observable
static member Create : 
        observer:IObserver<'TSource> * 
        observable:IObservable<'TResult> -> ISubject<'TSource, 'TResult> 
JScript does not support generic types and methods.

Type Parameters

  • TSource
    The type source.

  • TResult
    The type of result.


  • observer
    Type: System.IObserver<TSource>
    The observer used to publish messages to the subject.

  • observable
    Type: System.IObservable<TResult>
    The observable used to subscribe to messages sent from the subject.

Return Value

Type: [System.Reactive.Subjects.ISubject](ISubject/ISubject(TSource,)<TSource, TResult>
Subject implemented using the given observer and observable.

See Also


Subject Class

System.Reactive.Subjects Namespace