Observable.ToAsync<TSource> Method (Action<TSource>, IScheduler)
Namespace: Microsoft.Phone.Reactive
Assembly: Microsoft.Phone.Reactive (in Microsoft.Phone.Reactive.dll)
Syntax
'Declaration
<ExtensionAttribute> _
Public Shared Function ToAsync(Of TSource) ( _
action As Action(Of TSource), _
scheduler As IScheduler _
) As Func(Of TSource, IObservable(Of Unit))
public static Func<TSource, IObservable<Unit>> ToAsync<TSource>(
this Action<TSource> action,
IScheduler scheduler
)
[ExtensionAttribute]
public:
generic<typename TSource>
static Func<TSource, IObservable<Unit>^>^ ToAsync(
Action<TSource>^ action,
IScheduler^ scheduler
)
static member ToAsync :
action:Action<'TSource> *
scheduler:IScheduler -> Func<'TSource, IObservable<Unit>>
Type Parameters
- TSource
Parameters
- action
Type: System.Action<TSource>
- scheduler
Type: Microsoft.Phone.Reactive.IScheduler
Return Value
Type: System.Func<TSource, IObservable<Unit>>
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type Action<TSource>. 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.