Compartilhar via


Método Subject.Create<TSource, TResult>

Cria um assunto do observador especificado e observável.

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

Sintaxe

'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.

Parâmetros de tipo

  • TSource
    A origem do tipo.
  • TResult
    O tipo de resultado.

Parâmetros

  • Observador
    Tipo: System.IObserver<TSource>
    O observador usado para publicar mensagens no assunto.
  • Observável
    Tipo: System.IObservable<TResult>
    O observável usado para assinar mensagens enviadas do assunto.

Valor Retornado

Tipo: System.Reactive.Subjects.ISubject<TSource, TResult>
Assunto implementado usando o observador especificado e observável.

Consulte Também

Referência

Classe Subject

System.Reactive.Subjects Namespace