Share via


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)

Syntax

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

returnValue = Subject.Create(observer, _
    observable)
public static ISubject<TSource, TResult> Create<TSource, TResult>(
    IObserver<TSource> observer,
    IObservable<TResult> observable
)
public:
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.

Parameters

  • 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<TSource, TResult>
Subject implemented using the given observer and observable.

See Also

Reference

Subject Class

System.Reactive.Subjects Namespace