C# Class CommanderDemo.Web.TaskRegistry

Configure the schedule for the background tasks we want FluentScheduler to run for us in the background.
Inheritance: Registry
Show file Open project: Command-R/CommanderDemo

Public Methods

Method Description
TaskRegistry ( SimpleInjector.Container container ) : System

Private Methods

Method Description
PingMe ( ) : void

Just an example, serves no point, but you should see it in the Output window due to the LoggingHandler.

Send ( object command, System.AppContext context ) : void

Since each task execution runs in an background thread, set up container lifetime and provide context.

StartQueueInfiniteLoop ( ) : void

The MongoQueueService uses tailable cursors which block until a new item is added. Since all tasks run in the background, no problem.

TaskManager_UnobservedTaskException ( FluentScheduler.Model.TaskExceptionInformation sender, UnhandledExceptionEventArgs e ) : void

Any exceptions that occur in the background task threads are caught here. We should probably log.

Method Details

TaskRegistry() public method

public TaskRegistry ( SimpleInjector.Container container ) : System
container SimpleInjector.Container
return System