Пример #1
0
 public JsTask <TResult> TimedFunction <TResult>(Func <TResult> function, BaseProgram program = null, Func <Exception, bool> exHandler = null, JsTaskPriority priority = JsTaskPriority.EXECUTION) =>
 TimedFunction(DEFAULT_SCRIPT_TIMEOUT, function, program, exHandler, priority);
Пример #2
0
 public JsTask <TResult> Function <TResult>(Func <TResult> function, BaseProgram program = null, JsTaskPriority priority = JsTaskPriority.EXECUTION) =>
 scheduler.Run(function, program, priority);
Пример #3
0
 public JsTask <TResult> TimedFunction <TResult>(int timeout, Func <TResult> function, BaseProgram program = null, Func <Exception, bool> exHandler = null, JsTaskPriority priority = JsTaskPriority.LOWEST) =>
 scheduler.Run(() => TimedFn(timeout, function, exHandler), program, priority);
Пример #4
0
 public JsTask Function(Action function, BaseProgram program = null, JsTaskPriority priority = JsTaskPriority.EXECUTION) =>
 scheduler.Run(function, program, priority);
Пример #5
0
 public JsTask(Action function, JsTaskPriority priority = JsTaskPriority.LOWEST, BaseProgram program = null)
 {
     m_action = function;
     Program  = program;
     Priority = priority;
 }
 public virtual JsTask Run(Action action, BaseProgram program = null, JsTaskPriority priority = JsTaskPriority.LOWEST) => new JsTask(action, priority, program).Start(this);
 public virtual JsTask <TResult> Run <TResult>(Func <TResult> func, BaseProgram program = null, JsTaskPriority priority = JsTaskPriority.LOWEST) =>
 new JsTask <TResult>(func, priority, program).Start(this);