Observable.ToAsync<T, TResult> Method (Func<T, TResult>, IScheduler)
Namespace: Microsoft.Phone.Reactive
Assembly: Microsoft.Phone.Reactive (in Microsoft.Phone.Reactive.dll)
Syntax
'Declaration
<ExtensionAttribute> _
Public Shared Function ToAsync(Of T, TResult) ( _
function As Func(Of T, TResult), _
scheduler As IScheduler _
) As Func(Of T, IObservable(Of TResult))
public static Func<T, IObservable<TResult>> ToAsync<T, TResult>(
this Func<T, TResult> function,
IScheduler scheduler
)
[ExtensionAttribute]
public:
generic<typename T, typename TResult>
static Func<T, IObservable<TResult>^>^ ToAsync(
Func<T, TResult>^ function,
IScheduler^ scheduler
)
static member ToAsync :
function:Func<'T, 'TResult> *
scheduler:IScheduler -> Func<'T, IObservable<'TResult>>
Type Parameters
- T
- TResult
Parameters
- function
Type: System.Func<T, TResult>
- scheduler
Type: Microsoft.Phone.Reactive.IScheduler
Return Value
Type: System.Func<T, IObservable<TResult>>
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type Func<T, 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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.