SchedulerExtensions.WithAsync(T, Func>) method¶
Defined in
Type: SchedulerExtensions
Namespace: ReactiveUI.Testing
Assembly: ReactiveUI.Testing.dll
Applies to
net10.0, net10.0-browserwasm1.0, net10.0-desktop1.0, net9.0, net9.0-browserwasm1.0, net9.0-desktop1.0, net8.0, net8.0-ios17.5, net8.0-maccatalyst17.5, net8.0-macos14.2, net8.0-macos14.5, net8.0-tvos17.2, netstandard2.1, net471
Overloads¶
- 1.
public static Task<TRet> WithAsync<T, TRet>(this T scheduler, Func<T, Task<TRet>> block) where T : IScheduler - 2.
public static Task WithAsync<T>(this T scheduler, Func<T, Task> block) where T : IScheduler
1. Overload¶
public static Task<TRet> WithAsync<T, TRet>(this T scheduler, Func<T, Task<TRet>> block) where T : IScheduler
Summary: With is an extension method that uses the given scheduler as the default Deferred and Taskpool schedulers for the given Func. Use this to initialize objects that store the default scheduler (most RxXaml objects).
Type parameters
| Name | Description |
|---|---|
T | The type. |
TRet | The return type. |
Parameters
| Name | Type | Description |
|---|---|---|
scheduler | T | The scheduler to use. |
block | Func | The function to execute. |
Returns: Task
2. Overload¶
public static Task WithAsync<T>(this T scheduler, Func<T, Task> block) where T : IScheduler
Summary: With is an extension method that uses the given scheduler as the default Deferred and Taskpool schedulers for the given Action.
Type parameters
| Name | Description |
|---|---|
T | The type. |
Parameters
| Name | Type | Description |
|---|---|---|
scheduler | T | The scheduler to use. |
block | Func | The action to execute. |
Returns: Task -- A Task representing the asynchronous operation.