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)

public abstract TResult Accept<TResult>(
	Func<T, TResult> onNext,
	Func<Exception, TResult> onError,
	Func<TResult> onCompleted
)

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..
Show: