Observer

Observer.Create<T> Method (Action<T>, Action)

Creates an observer from the specified OnNext and OnCompleted actions.

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

Syntax

'Declaration
Public Shared Function Create(Of T) ( _
    onNext As Action(Of T), _
    onCompleted As Action _
) As IObserver(Of T)
'Usage
Dim onNext As Action(Of T)
Dim onCompleted As Action
Dim returnValue As IObserver(Of T)

returnValue = Observer.Create(onNext, _
    onCompleted)
public static IObserver<T> Create<T>(
    Action<T> onNext,
    Action onCompleted
)
public:
generic<typename T>
static IObserver<T>^ Create(
    Action<T>^ onNext, 
    Action^ onCompleted
)
static member Create : 
        onNext:Action<'T> * 
        onCompleted:Action -> IObserver<'T> 
JScript does not support generic types and methods.

Type Parameters

  • T
    The observer argument type.

Parameters

  • onNext
    Type: System.Action<T>
    The observer's OnNext action implementation.

  • onCompleted
    Type: System.Action
    The observer's OnCompleted action implementation.

Return Value

Type: System.IObserver<T>
The observer object implemented using the given actions.

See Also

Reference

Observer Class

Create Overload

System.Reactive Namespace

Observer.Create<T> Method (Action<T>, Action<Exception>)

Creates an observer from the specified OnNext and OnError actions.

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

Syntax

'Declaration
Public Shared Function Create(Of T) ( _
    onNext As Action(Of T), _
    onError As Action(Of Exception) _
) As IObserver(Of T)
'Usage
Dim onNext As Action(Of T)
Dim onError As Action(Of Exception)
Dim returnValue As IObserver(Of T)

returnValue = Observer.Create(onNext, _
    onError)
public static IObserver<T> Create<T>(
    Action<T> onNext,
    Action<Exception> onError
)
public:
generic<typename T>
static IObserver<T>^ Create(
    Action<T>^ onNext, 
    Action<Exception^>^ onError
)
static member Create : 
        onNext:Action<'T> * 
        onError:Action<Exception> -> IObserver<'T> 
JScript does not support generic types and methods.

Type Parameters

  • T
    The observer argument type.

Parameters

Return Value

Type: System.IObserver<T>
The observer object implemented using the given actions.

See Also

Reference

Observer Class

Create Overload

System.Reactive Namespace

Observer.Create<T> Method (Action<T>)

Creates an observer from the specified OnNext action.

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

Syntax

'Declaration
Public Shared Function Create(Of T) ( _
    onNext As Action(Of T) _
) As IObserver(Of T)
'Usage
Dim onNext As Action(Of T)
Dim returnValue As IObserver(Of T)

returnValue = Observer.Create(onNext)
public static IObserver<T> Create<T>(
    Action<T> onNext
)
public:
generic<typename T>
static IObserver<T>^ Create(
    Action<T>^ onNext
)
static member Create : 
        onNext:Action<'T> -> IObserver<'T> 
JScript does not support generic types and methods.

Type Parameters

  • T
    The observer argument type.

Parameters

  • onNext
    Type: System.Action<T>
    The observer's OnNext action implementation.

Return Value

Type: System.IObserver<T>
The observer object implemented using the given actions.

See Also

Reference

Observer Class

Create Overload

System.Reactive Namespace

Observer.Create<T> Method (Action<T>, Action<Exception>, Action)

Creates an observer from the specified OnNext, OnError, and OnCompleted actions.

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

Syntax

'Declaration
Public Shared Function Create(Of T) ( _
    onNext As Action(Of T), _
    onError As Action(Of Exception), _
    onCompleted As Action _
) As IObserver(Of T)
'Usage
Dim onNext As Action(Of T)
Dim onError As Action(Of Exception)
Dim onCompleted As Action
Dim returnValue As IObserver(Of T)

returnValue = Observer.Create(onNext, _
    onError, onCompleted)
public static IObserver<T> Create<T>(
    Action<T> onNext,
    Action<Exception> onError,
    Action onCompleted
)
public:
generic<typename T>
static IObserver<T>^ Create(
    Action<T>^ onNext, 
    Action<Exception^>^ onError, 
    Action^ onCompleted
)
static member Create : 
        onNext:Action<'T> * 
        onError:Action<Exception> * 
        onCompleted:Action -> IObserver<'T> 
JScript does not support generic types and methods.

Type Parameters

  • T
    The observer argument type.

Parameters

  • onNext
    Type: System.Action<T>
    The observer's OnNext action implementation.

  • onError
    Type: System.Action<Exception>
    The observer's OnError action implementation.

  • onCompleted
    Type: System.Action
    The observer's OnCompleted action implementation.

Return Value

Type: System.IObserver<T>
The observer object implemented using the given actions.

See Also

Reference

Observer Class

Create Overload

System.Reactive Namespace