Observer.ToObserver<T> Method

March 22, 2012

Creates an observer from a notification callback.

Namespace:  Microsoft.Phone.Reactive
Assembly:  Microsoft.Phone.Reactive (in Microsoft.Phone.Reactive.dll)

public static IObserver<T> ToObserver<T>(
	this Action<Notification<T>> handler
)

Type Parameters

T

Parameters

handler
Type: System.Action<Notification<T>>

Return Value

Type: System.IObserver<T>
Returns IObserver<T>.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Action<Notification<T>>. When you use instance method syntax to call this method, omit the first parameter.

Windows Phone OS

Supported in: 7.1, 7.0

Windows Phone

Show: