Skip to content

)} )}

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

View source

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

NameDescription
TThe scheduler type.
TRetThe return type.

Parameters

NameTypeDescription
schedulerTThe scheduler to use.
blockFuncThe 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

View source

Summary: With is an extension method that uses the given scheduler as the default Deferred and Taskpool schedulers for the given Action.

Type parameters

NameDescription
TThe type.

Parameters

NameTypeDescription
schedulerTThe scheduler to use.
blockActionThe action to execute.