SchedulerExtensions.With(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 TRet With<T, TRet>(this T scheduler, Func<T, TRet> block) where T : IScheduler - 2.
public static void With<T>(this T scheduler, Action<T> block) where T : IScheduler
1. Overload¶
public static TRet With<T, TRet>(this T scheduler, Func<T, 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 scheduler type. |
TRet | The return type. |
Parameters
| Name | Type | Description |
|---|---|---|
scheduler | T | The scheduler to use. |
block | Func | The function to execute. |
Returns: TRet -- The return value of the function.
2. Overload¶
public static void With<T>(this T scheduler, Action<T> 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 | Action | The action to execute. |