Sdílet prostřednictvím


Observable.Toasync<T1, T2, T3, T4, T5, T6, T7, TResult> – metoda (Func<T1, T2, T3, T4, T5, T6, T7, TResult>)

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, T7, TResult) ( _
    function As Func(Of T1, T2, T3, T4, T5, T6, T7, TResult) _
) As Func(Of T1, T2, T3, T4, T5, T6, T7, IObservable(Of TResult))
'Usage
Dim function As Func(Of T1, T2, T3, T4, T5, T6, T7, TResult)
Dim returnValue As Func(Of T1, T2, T3, T4, T5, T6, T7, IObservable(Of TResult))

returnValue = function.ToAsync()
public static Func<T1, T2, T3, T4, T5, T6, T7, IObservable<TResult>> ToAsync<T1, T2, T3, T4, T5, T6, T7, TResult>(
    this Func<T1, T2, T3, T4, T5, T6, T7, TResult> function
)
[ExtensionAttribute]
public:
generic<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename TResult>
static Func<T1, T2, T3, T4, T5, T6, T7, IObservable<TResult>^>^ ToAsync(
    Func<T1, T2, T3, T4, T5, T6, T7, TResult>^ function
)
static member ToAsync : 
        function:Func<'T1, 'T2, 'T3, 'T4, 'T5, 'T6, 'T7, 'TResult> -> Func<'T1, 'T2, 'T3, 'T4, 'T5, 'T6, 'T7, 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.
  • T7
    Sedmý typ funkce
  • Tresult
    Typ výsledku.

Parametry

  • – funkce
    Typ: System.Func<T1, T2, T3, T4, T5, T6, T7, TResult>
    Funkce použitá k synchronizaci.

Návratová hodnota

Typ: System.Func<T1, T2, T3, T4, T5, T6, T7, IObservable<TResult>>
Z 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, T7, TResult>. Pokud k volání této metody použijete syntaxi metody instance, vynechejte první parametr. Další informace naleznete v tématech a .

Viz také

Reference

Pozorovatelná třída

ToAsync – přetížení

System.Reactive.Linq – obor názvů