Show / Hide Table of Contents

Class WorkExecutionMonitor

Monitors work execution through the root execution context of the executing work.

Inheritance
System.Object
WorkExecutionMonitor
Implements
IWorkExecutionMonitor
IDisposable
Namespace: DNVGL.One.Compute.WorkExecution.ExecutionModel
Assembly: DNVGL.One.Compute.WorkExecution.dll
Syntax
public class WorkExecutionMonitor : object, IWorkExecutionMonitor

Constructors

View Source

WorkExecutionMonitor(Task<Object>, IExecutionContext)

Initializes a new instance of the WorkExecutionMonitor class.

Declaration
public WorkExecutionMonitor(Task<object> executionTask, IExecutionContext rootExecutionContext)
Parameters
Type Name Description
Task<System.Object> executionTask

The execution task.

IExecutionContext rootExecutionContext

The root execution context.

Properties

View Source

CancellationToken

Gets the cancellation token.

Declaration
public CancellationToken CancellationToken { get; }
Property Value
Type Description
CancellationToken

The cancellation token.

View Source

Exception

Gets the exception if an exception occurred while executing the ExecutableWork.

Declaration
public Exception Exception { get; }
Property Value
Type Description
Exception

The exception.

View Source

ExecutionResult

Gets the result from executing the work.

Declaration
public Task<object> ExecutionResult { get; }
Property Value
Type Description
Task<System.Object>

The result.

View Source

Message

Gets the message.

Declaration
public string Message { get; }
Property Value
Type Description
System.String

The message.

View Source

Progress

Gets the progress as a fraction between 0 (no progress) and 1 (complete).

Declaration
public double Progress { get; }
Property Value
Type Description
System.Double

The progress as a fraction between 0 and 1.

View Source

Result

Gets the result.

Declaration
public object Result { get; }
Property Value
Type Description
System.Object

The result.

View Source

RootExecutionContext

Gets the root execution context.

Declaration
public IExecutionContext RootExecutionContext { get; }
Property Value
Type Description
IExecutionContext

The root execution context.

View Source

Status

Gets the work status.

Declaration
public WorkStatus Status { get; }
Property Value
Type Description
WorkStatus

The status.

Events

View Source

WorkEvent

Occurs when the status or progress of a work item changes.

Declaration
public event EventHandler<ExecutableWorkEventArgs> WorkEvent
Event Type
Type Description
EventHandler<ExecutableWorkEventArgs>

Implements

IWorkExecutionMonitor
IDisposable

See Also

IWorkExecutionMonitor
  • View Source
In This Article
Back to top Copyright © DNV AS. All rights reserved.