Observable

Observable.ToAsync Method (Action)

Converts the function into an asynchronous function.

Namespace:  System.Reactive.Linq
Assembly:  System.Reactive (in System.Reactive.dll)

Syntax

'Declaration
<ExtensionAttribute> _
Public Shared Function ToAsync ( _
    action As Action _
) As Func(Of IObservable(Of Unit))
'Usage
Dim action As Action
Dim returnValue As Func(Of IObservable(Of Unit))

returnValue = action.ToAsync()
public static Func<IObservable<Unit>> ToAsync(
    this Action action
)
[ExtensionAttribute]
public:
static Func<IObservable<Unit>^>^ ToAsync(
    Action^ action
)
static member ToAsync : 
        action:Action -> Func<IObservable<Unit>> 
public static function ToAsync(
    action : Action
) : Func<IObservable<Unit>>

Parameters

Return Value

Type: System.Func<IObservable<Unit>>
The function into an asynchronous function.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Action. When you use instance method syntax to call this method, omit the first parameter. For more information, see or .

See Also

Reference

Observable Class

ToAsync Overload

System.Reactive.Linq Namespace

Observable.ToAsync Method (Action, IScheduler)

Converts the function into an asynchronous function.

Namespace:  System.Reactive.Linq
Assembly:  System.Reactive (in System.Reactive.dll)

Syntax

'Declaration
<ExtensionAttribute> _
Public Shared Function ToAsync ( _
    action As Action, _
    scheduler As IScheduler _
) As Func(Of IObservable(Of Unit))
'Usage
Dim action As Action
Dim scheduler As IScheduler
Dim returnValue As Func(Of IObservable(Of Unit))

returnValue = action.ToAsync(scheduler)
public static Func<IObservable<Unit>> ToAsync(
    this Action action,
    IScheduler scheduler
)
[ExtensionAttribute]
public:
static Func<IObservable<Unit>^>^ ToAsync(
    Action^ action, 
    IScheduler^ scheduler
)
static member ToAsync : 
        action:Action * 
        scheduler:IScheduler -> Func<IObservable<Unit>> 
public static function ToAsync(
    action : Action, 
    scheduler : IScheduler
) : Func<IObservable<Unit>>

Parameters

Return Value

Type: System.Func<IObservable<Unit>>
The function into an asynchronous function.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Action. When you use instance method syntax to call this method, omit the first parameter. For more information, see or .

See Also

Reference

Observable Class

ToAsync Overload

System.Reactive.Linq Namespace

Observable.ToAsync Method

Include Protected Members
Include Inherited Members

Converts the function into an asynchronous function.

This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.

Overload List

NameDescriptionPublic methodStatic memberToAsync(Action)Converts the function into an asynchronous function.Public methodStatic memberToAsync(Action)Converts the function into an asynchronous function.Public methodStatic memberToAsync<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>)Converts the function into an asynchronous function.Public methodStatic memberToAsync<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>(Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>)Converts the function into an asynchronous function.Public methodStatic memberToAsync<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>(Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>)Converts the function into an asynchronous function.Public methodStatic memberToAsync<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>(Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>)Converts the function into an asynchronous function.Public methodStatic memberToAsync<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>(Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>)Converts the function into an asynchronous function.Public methodStatic memberToAsync<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>(Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>)Converts the function into an asynchronous function.Public methodStatic memberToAsync<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>(Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>)Converts the function into an asynchronous function.Public methodStatic memberToAsync<T1, T2>(Action<T1, T2>)Converts the function into an asynchronous function.Public methodStatic memberToAsync<T1, T2, T3>(Action<T1, T2, T3>)Converts the function into an asynchronous function.Public methodStatic memberToAsync<T1, T2, T3, T4>(Action<T1, T2, T3, T4>)Converts the function into an asynchronous function.Public methodStatic memberToAsync<T1, T2, T3, T4, T5>(Action<T1, T2, T3, T4, T5>)Converts the function into an asynchronous function.Public methodStatic memberToAsync<T1, T2, T3, T4, T5, T6>(Action<T1, T2, T3, T4, T5, T6>)Converts the function into an asynchronous function.Public methodStatic memberToAsync<T1, T2, T3, T4, T5, T6, T7>(Action<T1, T2, T3, T4, T5, T6, T7>)Converts the function into an asynchronous function.Public methodStatic memberToAsync<T1, T2, T3, T4, T5, T6, T7, T8>(Action<T1, T2, T3, T4, T5, T6, T7, T8>)Converts the function into an asynchronous function.Public methodStatic memberToAsync<T1, T2, T3, T4, T5, T6, T7, T8, T9>(Action<T1, T2, T3, T4, T5, T6, T7, T8, T9>)Converts the function into an asynchronous function.Public methodStatic memberToAsync(Func)Converts the function into an asynchronous function.Public methodStatic memberToAsync<T1, T2, T3, T4, T5, T6, T7, T8, T9, TResult>(Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, TResult>)Converts the function into an asynchronous function.Public methodStatic memberToAsync<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, TResult>(Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, TResult>)Converts the function into an asynchronous function.Public methodStatic memberToAsync<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, TResult>(Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, TResult>)Converts the function into an asynchronous function.Public methodStatic memberToAsync<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, TResult>(Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, TResult>)Converts the function into an asynchronous function.Public methodStatic memberToAsync<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, TResult>(Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, TResult>)Converts the function into an asynchronous function.Public methodStatic memberToAsync<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, TResult>(Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, TResult>)Converts the function into an asynchronous function.Public methodStatic memberToAsync<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, TResult>(Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, TResult>)Converts the function into an asynchronous function.Public methodStatic memberToAsync<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, TResult>(Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, TResult>)Converts the function into an asynchronous function.Public methodStatic memberToAsync<T, TResult>(Func<T, TResult>)Converts the function into an asynchronous function.Public methodStatic memberToAsync<T1, T2, TResult>(Func<T1, T2, TResult>)Converts the function into an asynchronous function.Public methodStatic memberToAsync<T1, T2, T3, TResult>(Func<T1, T2, T3, TResult>)Converts the function into an asynchronous function.Public methodStatic memberToAsync<T1, T2, T3, T4, TResult>(Func<T1, T2, T3, T4, TResult>)Converts the function into an asynchronous function.Public methodStatic memberToAsync<T1, T2, T3, T4, T5, TResult>(Func<T1, T2, T3, T4, T5, TResult>)Converts the function into an asynchronous function.Public methodStatic memberToAsync<T1, T2, T3, T4, T5, T6, TResult>(Func<T1, T2, T3, T4, T5, T6, TResult>)Converts the function into an asynchronous function.Public methodStatic memberToAsync<T1, T2, T3, T4, T5, T6, T7, TResult>(Func<T1, T2, T3, T4, T5, T6, T7, TResult>)Converts the function into an asynchronous function.Public methodStatic memberToAsync<T1, T2, T3, T4, T5, T6, T7, T8, TResult>(Func<T1, T2, T3, T4, T5, T6, T7, T8, TResult>)Converts the function into an asynchronous function.Public methodStatic memberToAsync(Action, IScheduler)Converts the function into an asynchronous function.Public methodStatic memberToAsync(Action, IScheduler)Converts the function into an asynchronous function.Public methodStatic memberToAsync<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>, IScheduler)Converts the function into an asynchronous function.Public methodStatic memberToAsync<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>(Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>, IScheduler)Converts the function into an asynchronous function.Public methodStatic memberToAsync<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>(Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>, IScheduler)Converts the function into an asynchronous function.Public methodStatic memberToAsync<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>(Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>, IScheduler)Converts the function into an asynchronous function.Public methodStatic memberToAsync<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>(Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>, IScheduler)Converts the function into an asynchronous function.Public methodStatic memberToAsync<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>(Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>, IScheduler)Converts the function into an asynchronous function.Public methodStatic memberToAsync<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>(Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>, IScheduler)Converts the function into an asynchronous function.Public methodStatic memberToAsync<T1, T2>(Action<T1, T2>, IScheduler)Converts the function into an asynchronous function.Public methodStatic memberToAsync<T1, T2, T3>(Action<T1, T2, T3>, IScheduler)Converts the function into an asynchronous function.Public methodStatic memberToAsync<T1, T2, T3, T4>(Action<T1, T2, T3, T4>, IScheduler)Converts the function into an asynchronous function.Public methodStatic memberToAsync<T1, T2, T3, T4, T5>(Action<T1, T2, T3, T4, T5>, IScheduler)Converts the function into an asynchronous function.Public methodStatic memberToAsync<T1, T2, T3, T4, T5, T6>(Action<T1, T2, T3, T4, T5, T6>, IScheduler)Converts the function into an asynchronous function.Public methodStatic memberToAsync<T1, T2, T3, T4, T5, T6, T7>(Action<T1, T2, T3, T4, T5, T6, T7>, IScheduler)Converts the function into an asynchronous function.Public methodStatic memberToAsync<T1, T2, T3, T4, T5, T6, T7, T8>(Action<T1, T2, T3, T4, T5, T6, T7, T8>, IScheduler)Converts the function into an asynchronous function.Public methodStatic memberToAsync<T1, T2, T3, T4, T5, T6, T7, T8, T9>(Action<T1, T2, T3, T4, T5, T6, T7, T8, T9>, IScheduler)Converts the function into an asynchronous function.Public methodStatic memberToAsync(Func, IScheduler)Converts the function into an asynchronous function.Public methodStatic memberToAsync<T1, T2, T3, T4, T5, T6, T7, T8, T9, TResult>(Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, TResult>, IScheduler)Converts the function into an asynchronous function.Public methodStatic memberToAsync<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, TResult>(Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, TResult>, IScheduler)Converts the function into an asynchronous function.Public methodStatic memberToAsync<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, TResult>(Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, TResult>, IScheduler)Converts the function into an asynchronous function.Public methodStatic memberToAsync<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, TResult>(Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, TResult>, IScheduler)Converts the function into an asynchronous function.Public methodStatic memberToAsync<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, TResult>(Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, TResult>, IScheduler)Converts the function into an asynchronous function.Public methodStatic memberToAsync<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, TResult>(Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, TResult>, IScheduler)Converts the function into an asynchronous function.Public methodStatic memberToAsync<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, TResult>(Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, TResult>, IScheduler)Converts the function into an asynchronous function.Public methodStatic memberToAsync<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, TResult>(Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, TResult>, IScheduler)Converts the function into an asynchronous function.Public methodStatic memberToAsync<T, TResult>(Func<T, TResult>, IScheduler)Converts the function into an asynchronous function.Public methodStatic memberToAsync<T1, T2, TResult>(Func<T1, T2, TResult>, IScheduler)Converts the function into an asynchronous function.Public methodStatic memberToAsync<T1, T2, T3, TResult>(Func<T1, T2, T3, TResult>, IScheduler)Converts the function into an asynchronous function.Public methodStatic memberToAsync<T1, T2, T3, T4, TResult>(Func<T1, T2, T3, T4, TResult>, IScheduler)Converts the function into an asynchronous function.Public methodStatic memberToAsync<T1, T2, T3, T4, T5, TResult>(Func<T1, T2, T3, T4, T5, TResult>, IScheduler)Converts the function into an asynchronous function.Public methodStatic memberToAsync<T1, T2, T3, T4, T5, T6, TResult>(Func<T1, T2, T3, T4, T5, T6, TResult>, IScheduler)Converts the function into an asynchronous function.Public methodStatic memberToAsync<T1, T2, T3, T4, T5, T6, T7, TResult>(Func<T1, T2, T3, T4, T5, T6, T7, TResult>, IScheduler)Converts the function into an asynchronous function.Public methodStatic memberToAsync<T1, T2, T3, T4, T5, T6, T7, T8, TResult>(Func<T1, T2, T3, T4, T5, T6, T7, T8, TResult>, IScheduler)Converts the function into an asynchronous function.Top

See Also

Reference

Observable Class

System.Reactive.Linq Namespace