Share via


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

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) _
) As Func(Of IObservable(Of TResult))
public static Func<IObservable<TResult>> ToAsync<TResult>(
    this Func<TResult> function
)
[ExtensionAttribute]
public:
generic<typename TResult>
static Func<IObservable<TResult>^>^ ToAsync(
    Func<TResult>^ function
)
static member ToAsync : 
        function:Func<'TResult> -> 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