Observer.ToObserver<T> Method

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

Syntax

'Declaration
<ExtensionAttribute> _
Public Shared Function ToObserver(Of T) ( _
    handler As Action(Of Notification(Of T)) _
) As IObserver(Of T)
public static IObserver<T> ToObserver<T>(
    this Action<Notification<T>> handler
)
[ExtensionAttribute]
public:
generic<typename T>
static IObserver<T>^ ToObserver(
    Action<Notification<T>^>^ handler
)
static member ToObserver : 
        handler:Action<Notification<'T>> -> IObserver<'T> 

Type Parameters

  • T

Parameters

Return Value

Type: System.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. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Version Information

.NET for Windows Phone apps

Supported in: Windows Phone 8, Silverlight 8.1

.NET Framework Security

See Also

Reference

Observer Class

Microsoft.Phone.Reactive Namespace