Qbservable.ToAsync<TResult> – metoda (IQbservableProvider, Expression<Func<TResult>>)
Převede funkci na asynchronní funkci.
Obor názvů:System.Reactive.Linq
Sestavení: System.Reactive.Providers (v System.Reactive.Providers.dll)
Syntax
'Declaration
<ExtensionAttribute> _
Public Shared Function ToAsync(Of TResult) ( _
provider As IQbservableProvider, _
function As Expression(Of Func(Of TResult)) _
) As Func(Of IQbservable(Of TResult))
'Usage
Dim provider As IQbservableProvider
Dim function As Expression(Of Func(Of TResult))
Dim returnValue As Func(Of IQbservable(Of TResult))
returnValue = provider.ToAsync(function)
public static Func<IQbservable<TResult>> ToAsync<TResult>(
this IQbservableProvider provider,
Expression<Func<TResult>> function
)
[ExtensionAttribute]
public:
generic<typename TResult>
static Func<IQbservable<TResult>^>^ ToAsync(
IQbservableProvider^ provider,
Expression<Func<TResult>^>^ function
)
static member ToAsync :
provider:IQbservableProvider *
function:Expression<Func<'TResult>> -> Func<IQbservable<'TResult>>
JScript does not support generic types and methods.
Parametry typu
- Tresult
Typ výsledku.
Parametry
- Zprostředkovatel
Typ: System.Reactive.Linq.IQbservableProvider
Místní poskytovatel Qbservable.
- – funkce
Typ: System.Linq.Expressions.Expression<Func<TResult>>
Funkce použitá k synchronizaci.
Návratová hodnota
Typ: System.Func<IQbservable<TResult>>
Funkce do asynchronní funkce.
Poznámka k využití
V jazyce Visual Basic a C# můžete tuto metodu volat jako metodu instance na libovolném objektu typu IQbservableProvider. Pokud k volání této metody použijete syntaxi metody instance, vynechejte první parametr. Další informace naleznete v tématech a .