Class ExecutableWorkBase
Base class for implementations of IComputationalWork.
Inheritance
ExecutableWorkBase
Inherited Members
Namespace: DNVGL.One.Compute.WorkExecution.ExecutionModel
Assembly: DNVGL.One.Compute.WorkExecution.dll
Syntax
public abstract class ExecutableWorkBase : WorkItem, IFlowModelItem, IComputationalWork
Properties
View SourceSource
Gets or sets the source.
Declaration
public WorkItem Source { get; set; }
Property Value
| Type | Description |
|---|---|
| WorkItem | The source. |
See Also
Methods
View SourceCanExecute()
Determines whether this instance can execute.
Declaration
public virtual bool CanExecute()
Returns
| Type | Description |
|---|---|
| bool |
|
See Also
View SourceComplete(IExecutionContext, object, string)
Completes the specified context.
Declaration
protected static object Complete(IExecutionContext context, object result, string message = null)
Parameters
| Type | Name | Description |
|---|---|---|
| IExecutionContext | context | The context. |
| object | result | The result. |
| string | message | The message. |
Returns
| Type | Description |
|---|---|
| object | The completed work. |
See Also
View SourceCreateRootExecutionContext()
Creates the execution context.
Declaration
protected IExecutionContext CreateRootExecutionContext()
Returns
| Type | Description |
|---|---|
| IExecutionContext | A new root IExecutionContext. |
See Also
View SourceExecute(object, IExecutionContext)
Executes with the specified input.
Declaration
public object Execute(object input, IExecutionContext executionContext = null)
Parameters
| Type | Name | Description |
|---|---|---|
| object | input | The input. |
| IExecutionContext | executionContext | The execution context. |
Returns
| Type | Description |
|---|---|
| object | Result from execution. |
See Also
View SourceFail(IExecutionContext, string, Exception)
Fails the specified context.
Declaration
protected static Exception Fail(IExecutionContext context, string message = null, Exception exception = null)
Parameters
| Type | Name | Description |
|---|---|---|
| IExecutionContext | context | The context. |
| string | message | The message. |
| Exception | exception | The exception. |
Returns
| Type | Description |
|---|---|
| Exception | An exception. |
See Also
View SourceGetDescendants()
Gets the descendants.
Declaration
public override IEnumerable<WorkItem> GetDescendants()
Returns
| Type | Description |
|---|---|
| IEnumerable<WorkItem> | Descendant items. |
Overrides
See Also
View SourceProcess(object, IExecutionContext)
Processes the specified input.
Declaration
protected abstract object Process(object input, IExecutionContext executionContext)
Parameters
| Type | Name | Description |
|---|---|---|
| object | input | The input. |
| IExecutionContext | executionContext | The execution context. |
Returns
| Type | Description |
|---|---|
| object | Processing result. May be null. |