Class TaskContext
Inherited Members
Namespace: LemonEdge.API.Core.Tasks
Assembly: LemonEdge.API.dll
Syntax
public class TaskContext : ITaskRunner, IProcessor
Properties
Cache
A local cache for performance
Declaration
public IReadOnlyCache Cache { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyCache |
Reporter
A reporter to provide feedback to a log, or client depending on the context the process is running under
Declaration
public BusyProgressReporter Reporter { get; set; }
Property Value
| Type | Description |
|---|---|
| BusyProgressReporter |
Services
Provides the IServiceContext giving access to core LemonEdge components.
Declaration
public IServiceContext Services { get; }
Property Value
| Type | Description |
|---|---|
| IServiceContext |
Task
The current task being processed by this task runner
Declaration
public IServerTask Task { get; }
Property Value
| Type | Description |
|---|---|
| IServerTask |
TimeStarted
The datetime stamp the processing of this task was started
Declaration
public DateTime TimeStarted { get; }
Property Value
| Type | Description |
|---|---|
| DateTime |
Updater
A context to ensure the process can query, load and modify all LemonEdge data
Declaration
public IEntityUpdater Updater { get; }
Property Value
| Type | Description |
|---|---|
| IEntityUpdater |
User
The current logged in user the process is running under
Declaration
public UserInfo User { get; }
Property Value
| Type | Description |
|---|---|
| UserInfo |
Methods
CreateFromRunnerForSubTask(ITaskRunner, IServerTask, IEntityUpdater)
Declaration
public static ITaskRunner CreateFromRunnerForSubTask(ITaskRunner existingRunner, IServerTask subTask, IEntityUpdater newContext)
Parameters
| Type | Name | Description |
|---|---|---|
| ITaskRunner | existingRunner | |
| IServerTask | subTask | |
| IEntityUpdater | newContext |
Returns
| Type | Description |
|---|---|
| ITaskRunner |
CreateUpdater()
Creates a new context for querying and updating the entire lemonedge platform
Can be used by tasks that perform multiple isolated actions
Declaration
public Task<IEntityUpdater> CreateUpdater()
Returns
| Type | Description |
|---|---|
| Task<IEntityUpdater> | A new context for querying and updating the entire lemonedge platform |