Share via


Observable.ToAsync<TSource> Method (Action<TSource>)

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

Type Parameters

  • TSource

Parameters

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

See Also

Reference

Observable Class

ToAsync Overload

Microsoft.Phone.Reactive Namespace