Scheduler.AsPeriodic(IScheduler) method¶
Defined in
Type: Scheduler
Namespace: System.Reactive.Concurrency
Assembly: System.Reactive.dll
Applies to
netstandard2.0
public static ISchedulerPeriodic? AsPeriodic(this IScheduler scheduler)
Summary:
Returns the ISchedulerPeriodic implementation of the specified scheduler, or null if no such implementation is available.
Parameters
| Name | Type | Description |
|---|---|---|
scheduler | [IScheduler](# | Scheduler to get the [ISchedulerPeriodic](# implementation for. |
Returns: ISchedulerPeriodic? -- The scheduler's ISchedulerPeriodic implementation if available; null otherwise.
Remarks
This helper method is made available for query operator authors in order to discover scheduler services by using the required IServiceProvider pattern, which allows for interception or redefinition of scheduler services.
Consider using the SchedulePeriodic extension methods for IScheduler in case periodic scheduling is required and emulation of periodic behavior using other scheduler services is desirable. Use of this method is recommended for best-effort use of the periodic scheduling service, where the caller falls back to not using periodic scheduling if this facility wasn't found.