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

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

Syntax

'Declaration
<ExtensionAttribute> _
Public Shared Function ToAsync(Of TResult) ( _
    function As Func(Of TResult), _
    scheduler As IScheduler _
) As Func(Of IObservable(Of TResult))
public static Func<IObservable<TResult>> ToAsync<TResult>(
    this Func<TResult> function,
    IScheduler scheduler
)
[ExtensionAttribute]
public:
generic<typename TResult>
static Func<IObservable<TResult>^>^ ToAsync(
    Func<TResult>^ function, 
    IScheduler^ scheduler
)
static member ToAsync : 
        function:Func<'TResult> * 
        scheduler:IScheduler -> Func<IObservable<'TResult>> 

Type Parameters

  • TResult

Parameters

Return Value

Type: System.Func<IObservable<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. 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

Observable Class

ToAsync Overload

Microsoft.Phone.Reactive Namespace