C# Class PortableRx.Reactive.Concurrency.Scheduler

Mostrar archivo Open project: robfe/PortableRx

Private Properties

Property Type Description
Initialize IScheduler
Invoke IDisposable

Public Methods

Method Description
AsLongRunning ( this scheduler ) : ISchedulerLongRunning

Returns the ISchedulerLongRunning implementation of the specified scheduler, or null if no such implementation is available.

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.

AsPeriodic ( this scheduler ) : ISchedulerPeriodic

Returns the IStopwatchProvider implementation of the specified scheduler, or null if no such implementation is available.

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 Scheduler.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.

AsStopwatchProvider ( this scheduler ) : IStopwatchProvider

Returns the IStopwatchProvider implementation of the specified scheduler, or null if no such implementation is available.

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 Scheduler.StartStopwatch in case a stopwatch is required, but use of emulation stopwatch based on the scheduler's clock is acceptable. Use of this method is recommended for best-effort use of the stopwatch provider scheduler service, where the caller falls back to not using stopwatches if this facility wasn't found.

Normalize ( System.TimeSpan timeSpan ) : System.TimeSpan

Normalizes the specified TimeSpan value to a positive value.

Schedule ( this scheduler, System.Action action ) : IDisposable

Schedules an action to be executed.

Schedule ( this scheduler, DateTimeOffset dueTime, System.Action action ) : IDisposable

Schedules an action to be executed at the specified absolute due time.

Schedule ( this scheduler, System.TimeSpan dueTime, System.Action action ) : IDisposable

Schedules an action to be executed after the specified relative due time.

ScheduleLongRunning ( this scheduler, Action action ) : IDisposable

Schedules an action to be executed.

Private Methods

Method Description
Initialize ( string name ) : IScheduler
Invoke ( IScheduler scheduler, System.Action action ) : IDisposable

Method Details

AsLongRunning() public static method

Returns the ISchedulerLongRunning implementation of the specified scheduler, or null if no such implementation is available.
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.
public static AsLongRunning ( this scheduler ) : ISchedulerLongRunning
scheduler this Scheduler to get the ISchedulerLongRunning implementation for.
return ISchedulerLongRunning

AsPeriodic() public static method

Returns the IStopwatchProvider implementation of the specified scheduler, or null if no such implementation is available.

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 Scheduler.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.

public static AsPeriodic ( this scheduler ) : ISchedulerPeriodic
scheduler this Scheduler to get the IStopwatchProvider implementation for.
return ISchedulerPeriodic

AsStopwatchProvider() public static method

Returns the IStopwatchProvider implementation of the specified scheduler, or null if no such implementation is available.

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 Scheduler.StartStopwatch in case a stopwatch is required, but use of emulation stopwatch based on the scheduler's clock is acceptable. Use of this method is recommended for best-effort use of the stopwatch provider scheduler service, where the caller falls back to not using stopwatches if this facility wasn't found.

public static AsStopwatchProvider ( this scheduler ) : IStopwatchProvider
scheduler this Scheduler to get the IStopwatchProvider implementation for.
return IStopwatchProvider

Normalize() public static method

Normalizes the specified TimeSpan value to a positive value.
public static Normalize ( System.TimeSpan timeSpan ) : System.TimeSpan
timeSpan System.TimeSpan The TimeSpan value to normalize.
return System.TimeSpan

Schedule() public static method

Schedules an action to be executed.
or is null.
public static Schedule ( this scheduler, System.Action action ) : IDisposable
scheduler this Scheduler to execute the action on.
action System.Action Action to execute.
return IDisposable

Schedule() public static method

Schedules an action to be executed at the specified absolute due time.
or is null.
public static Schedule ( this scheduler, DateTimeOffset dueTime, System.Action action ) : IDisposable
scheduler this Scheduler to execute the action on.
dueTime DateTimeOffset Absolute time at which to execute the action.
action System.Action Action to execute.
return IDisposable

Schedule() public static method

Schedules an action to be executed after the specified relative due time.
or is null.
public static Schedule ( this scheduler, System.TimeSpan dueTime, System.Action action ) : IDisposable
scheduler this Scheduler to execute the action on.
dueTime System.TimeSpan Relative time after which to execute the action.
action System.Action Action to execute.
return IDisposable

ScheduleLongRunning() public static method

Schedules an action to be executed.
or is null.
public static ScheduleLongRunning ( this scheduler, Action action ) : IDisposable
scheduler this Scheduler to execute the action on.
action Action Action to execute.
return IDisposable