Wiki Navigation
- Loading...
The IWorkInterval interface exposes methods and properties for the threadpool to be able to process the workload related to the object that implements this info for and infinite amount of time at a given interval. It exposes the following attributes to the threadpool:
- An object that implements the IWork interface which holds the workload to be processed at intervals
- A property which holds the interval for the workload
- A property which contains the Date/Time of the last run for this workload
- A property which tell whether or not the workload is currently being processed
- A method that gets called by the threadpool when the threadpool is being stopped
- A method that gets called by the threadpool to reset the WorkState of the workload
Methods
- void OnThreadPoolStopped() - Called by the threadpool when it is being stopped
- void ResetWorkState() - Called by the threadpool to reset the WorkState of the workload
Properties
- IWork Work { get; } - The actual workload that should be performed at a given interval
- TimeSpan WorkInterval { get; } - The interval for this workload
- DateTime LastRun { get; set; } - last date/time the workload was processed
- bool Running { get; set; } - indicates whether or not the threadpool is processing the workload currently

This page has no comments.