SchedulerExtensions.WithScheduler(IScheduler) 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
public static IDisposable WithScheduler(IScheduler scheduler)
Summary: WithScheduler overrides the default Deferred and Taskpool schedulers with the given scheduler until the return value is disposed. This is useful in a unit test runner to force RxXaml objects to schedule via a TestScheduler object.
Parameters
| Name | Type | Description |
|---|---|---|
scheduler | [IScheduler](# | The scheduler to use. |
Returns: IDisposable -- An object that when disposed, restores the previous default schedulers.