Observable.ToAsync<T1, T2> Method (Action<T1, T2>, IScheduler)

March 22, 2012

Converts the action into an asynchronous function.

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

public static Func<T1, T2, IObservable<Unit>> ToAsync<T1, T2>(
	this Action<T1, T2> action,
	IScheduler scheduler
)

Type Parameters

T1
T2

Parameters

action
Type: System.Action<T1, T2>
scheduler
Type: Microsoft.Phone.Reactive.IScheduler

Return Value

Type: System.Func<T1, T2, IObservable<Unit>>
Returns Func<T1, T2, TResult>.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Action<T1, T2>. 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: