Clear Up
SharpKit Reference

Scheduler Class

Provides a set of static methods for creating Schedulers.

Namespace: SharpKit.Rx

Base Types

System.Object

Properties

Name Description
CurrentThread Scheduler that runs actions on the current thread using a trampoline. When using time-based operations, script execution may block, which is often undesirable. In such scenarios, use Rx.Schedule.Timeout instead.
Immediate Scheduler that runs actions synchronously on the current thread. When using time-based operations, script execution may block, which is often undesirable. In such scenarios, use Rx.Scheduler.Timeout instead.
now Gets the current time.
Timeout Scheduler that runs actions using the setTimeout JavaScript function.

Methods

Name Description
normalize(Int64) Normalizes the given relative time span, i.e. negative time is rounded up to 0.
schedule(IScheduler, JsAction) Schedules the specified action immediately.

E.g. var cancel = Rx.Scheduler.CurrentThread.schedule(function () { alert('Hello!'); });

scheduleRecursive(IScheduler, JsAction<T>) Schedules the specified action recursively.

E.g. var cancel = Rx.Scheduler.CurrentThread.schedule(function (self) { alert('Hello!'); self(); });

scheduleRecursiveWithAbsolute(IScheduler, JsDate, JsAction<T>) Schedules the specified action recursively using absolute due times.

E.g. var cancel = Rx.Scheduler.Timeout.schedule(new DateTime(2011, 2, 11), function (self) { alert('Hello!'); self(new Date(new Date().getFullYear() + 1, 2, 11)); });

scheduleRecursiveWithRelative(IScheduler, Int64, JsAction<T>) Schedules the specified action recursively using relative due times.

E.g. var cancel = Rx.Scheduler.Timeout.schedule(1000 /* 1s */, function (self) { alert('Hello!'); self(1000 /* 1s */); });

scheduleWithAbsolute(IScheduler, JsDate, JsAction) Schedules the specified action at the given absolute due time.

E.g. var cancel = Rx.Scheduler.Timeout.schedule(new Date(2012, 2, 11), function () { alert('Hello!'); });

scheduleWithRelative(IScheduler, Int64, JsAction) Schedules the specified action at the given relative due time.

E.g. var cancel = Rx.Scheduler.Timeout.schedule(1000 /* 1s */, function () { alert('Hello!'); });

scheduleWithState<TState>(IScheduler, TState, JsAction<T>)
© Copyright 2005-2011 SharpKit. All rights reserved.