Notification<T>.Accept<TResult> Method (Func<T, TResult>, Func<Exception, TResult>, Func<TResult>)
Invokes the delegate corresponding to the notification and returns the produced result.
Namespace: System.Reactive
Assembly: System.Reactive (in System.Reactive.dll)
Syntax
'Declaration
Public MustOverride Function Accept(Of TResult) ( _
onNext As Func(Of T, TResult), _
onError As Func(Of Exception, TResult), _
onCompleted As Func(Of TResult) _
) As TResult
'Usage
Dim instance As Notification
Dim onNext As Func(Of T, TResult)
Dim onError As Func(Of Exception, TResult)
Dim onCompleted As Func(Of TResult)
Dim returnValue As TResult
returnValue = instance.Accept(onNext, _
onError, onCompleted)
public abstract TResult Accept<TResult>(
Func<T, TResult> onNext,
Func<Exception, TResult> onError,
Func<TResult> onCompleted
)
public:
generic<typename TResult>
virtual TResult Accept(
Func<T, TResult>^ onNext,
Func<Exception^, TResult>^ onError,
Func<TResult>^ onCompleted
) abstract
abstract Accept :
onNext:Func<'T, 'TResult> *
onError:Func<Exception, 'TResult> *
onCompleted:Func<'TResult> -> 'TResult
JScript does not support generic types and methods.
Type Parameters
- TResult
The result argument type.
Parameters
- onNext
Type: System.Func<T, TResult>
The delegate to invoke for an OnNext notification.
- onError
Type: System.Func<Exception, TResult>
The delegate to invoke for an OnError notification.
- onCompleted
Type: System.Func<TResult>
The delegate to invoke for an OnCompleted notification.
Return Value
Type: TResult
The result produced by the observation..