Class WorkExecutionMonitor
Monitors work execution through the root execution context of the executing work.
Inherited Members
Namespace: DNVGL.One.Compute.WorkExecution.ExecutionModel
Assembly: DNVGL.One.Compute.WorkExecution.dll
Syntax
public class WorkExecutionMonitor : IWorkExecutionMonitor, IDisposable
Constructors
View SourceWorkExecutionMonitor(Task<object>, IExecutionContext)
Initializes a new instance of the WorkExecutionMonitor class.
Declaration
public WorkExecutionMonitor(Task<object> executionTask, IExecutionContext rootExecutionContext)
Parameters
Type | Name | Description |
---|---|---|
Task<dynamic> | executionTask | The execution task. |
IExecutionContext | rootExecutionContext | The root execution context. |
See Also
Properties
View SourceCancellationToken
Gets the cancellation token.
Declaration
public CancellationToken CancellationToken { get; }
Property Value
Type | Description |
---|---|
CancellationToken | The cancellation token. |
See Also
View SourceException
Gets the exception if an exception occurred while executing the ExecutableWork.
Declaration
public Exception Exception { get; }
Property Value
Type | Description |
---|---|
Exception | The exception. |
See Also
View SourceExecutionResult
Gets the result from executing the work.
Declaration
public Task<object> ExecutionResult { get; }
Property Value
Type | Description |
---|---|
Task<dynamic> | The result. |
See Also
View SourceMessage
Gets the message.
Declaration
public string Message { get; }
Property Value
Type | Description |
---|---|
string | The message. |
See Also
View SourceProgress
Gets the progress as a fraction between 0 (no progress) and 1 (complete).
Declaration
public double Progress { get; }
Property Value
Type | Description |
---|---|
double | The progress as a fraction between 0 and 1. |
See Also
View SourceResult
Gets the result.
Declaration
public object Result { get; }
Property Value
Type | Description |
---|---|
object | The result. |
See Also
View SourceRootExecutionContext
Gets the root execution context.
Declaration
public IExecutionContext RootExecutionContext { get; }
Property Value
Type | Description |
---|---|
IExecutionContext | The root execution context. |
See Also
View SourceStatus
Gets the work status.
Declaration
public WorkStatus Status { get; }
Property Value
Type | Description |
---|---|
WorkStatus | The status. |
See Also
Events
View SourceWorkEvent
Occurs when the status or progress of a work item changes.
Declaration
public event EventHandler<ExecutableWorkEventArgs> WorkEvent
Event Type
Type | Description |
---|---|
EventHandler<ExecutableWorkEventArgs> |