Observable.Toasync<T1, T2, T3, T4, T5, T6, TResult> – metoda (Func<T1, T2, T3, T4, T5, T6, TResult>, IScheduler)
Převede funkci na asynchronní funkci.
Obor názvů:System.Reactive.Linq
Sestavení: System.Reactive (v System.Reactive.dll)
Syntax
'Declaration
<ExtensionAttribute> _
Public Shared Function ToAsync(Of T1, T2, T3, T4, T5, T6, TResult) ( _
function As Func(Of T1, T2, T3, T4, T5, T6, TResult), _
scheduler As IScheduler _
) As Func(Of T1, T2, T3, T4, T5, T6, IObservable(Of TResult))
'Usage
Dim function As Func(Of T1, T2, T3, T4, T5, T6, TResult)
Dim scheduler As IScheduler
Dim returnValue As Func(Of T1, T2, T3, T4, T5, T6, IObservable(Of TResult))
returnValue = function.ToAsync(scheduler)
public static Func<T1, T2, T3, T4, T5, T6, IObservable<TResult>> ToAsync<T1, T2, T3, T4, T5, T6, TResult>(
this Func<T1, T2, T3, T4, T5, T6, TResult> function,
IScheduler scheduler
)
[ExtensionAttribute]
public:
generic<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename TResult>
static Func<T1, T2, T3, T4, T5, T6, IObservable<TResult>^>^ ToAsync(
Func<T1, T2, T3, T4, T5, T6, TResult>^ function,
IScheduler^ scheduler
)
static member ToAsync :
function:Func<'T1, 'T2, 'T3, 'T4, 'T5, 'T6, 'TResult> *
scheduler:IScheduler -> Func<'T1, 'T2, 'T3, 'T4, 'T5, 'T6, IObservable<'TResult>>
JScript does not support generic types and methods.
Parametry typu
- T1
První typ funkce.
- T2
Druhý typ funkce.
- T3
Třetí typ funkce.
- T4
Čtvrtý typ funkce.
- T5
Pátý typ funkce.
- T6
Šestý typ funkce.
- Tresult
Typ výsledku.
Parametry
- – funkce
Typ: System.Func<T1, T2, T3, T4, T5, T6, TResult>
Funkce použitá k synchronizaci.
- scheduler
Typ: System.Reactive.Concurrency.IScheduler
Plánovač použitý k synchronizaci.
Návratová hodnota
Typ: System.Func<T1, T2, T3, T4, T5, T6, IObservable<TResult>>
Funkce do asynchronní funkce.
Poznámka k využití
V jazyce Visual Basic a C# můžete tuto metodu volat jako metodu instance pro libovolný objekt typu Func<T1, T2, T3, T4, T5, T6, TResult>. Pokud k volání této metody použijete syntaxi metody instance, vynechejte první parametr. Další informace naleznete v tématech a .