Observable.ToAsync<TResult> Method (Func<TResult>, IScheduler)

March 22, 2012

Converts the function into an asynchronous function.

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

public static Func<IObservable<TResult>> ToAsync<TResult>(
	this Func<TResult> function,
	IScheduler scheduler
)

Type Parameters

TResult

Parameters

function
Type: System.Func<TResult>
scheduler
Type: Microsoft.Phone.Reactive.IScheduler

Return Value

Type: System.Func<IObservable<TResult>>
Returns Func<TResult>.

Usage Note

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