Show / Hide Table of Contents

Class ExecutableWorkBase

Base class for implementations of IComputationalWork.

Inheritance
System.Object
FlowModelObject
WorkItem
ExecutableWorkBase
ExecutableWorkBase<TIn, TOut>
SequentialWorkExecutor
WorkUnitExecutor
Implements
IFlowModelItem
IComputationalWork
Inherited Members
WorkItem.Tag
WorkItem.JobId
WorkItem.ParentId
WorkItem.Id
WorkItem.GetParent()
DNVGL.One.Compute.Core.FlowModel.WorkItem.Select<T>(Func<, >)
DNVGL.One.Compute.Core.FlowModel.WorkItem.Traverse(Action<, >, DNVGL.One.Compute.Core.FlowModel.WorkItem)
DNVGL.One.Compute.Core.FlowModel.WorkItem.FindItems(Func<, >, System.Boolean)
WorkItem.OnInitialize(Job)
WorkItem.ToString()
FlowModelObject.BatchNumber
FlowModelObject.Properties
FlowModelObject.PropertiesContent
FlowModelObject.Item[String]
FlowModelObject.UpdateProperties(String)
Namespace: DNVGL.One.Compute.WorkExecution.ExecutionModel
Assembly: DNVGL.One.Compute.WorkExecution.dll
Syntax
public abstract class ExecutableWorkBase : WorkItem, IFlowModelItem, IComputationalWork

Properties

View Source

Source

Gets or sets the source.

Declaration
public WorkItem Source { get; set; }
Property Value
Type Description
WorkItem

The source.

Methods

View Source

CanExecute()

Determines whether this instance can execute.

Declaration
public virtual bool CanExecute()
Returns
Type Description
System.Boolean

true if this instance can execute; otherwise, false.

View Source

Complete(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.

System.Object result

The result.

System.String message

The message.

Returns
Type Description
System.Object

The completed work.

View Source

CreateRootExecutionContext()

Creates the execution context.

Declaration
protected IExecutionContext CreateRootExecutionContext()
Returns
Type Description
IExecutionContext

A new root IExecutionContext.

View Source

Execute(Object, IExecutionContext)

Executes with the specified input.

Declaration
public object Execute(object input, IExecutionContext executionContext = null)
Parameters
Type Name Description
System.Object input

The input.

IExecutionContext executionContext

The execution context.

Returns
Type Description
System.Object

Result from execution.

View Source

Fail(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.

System.String message

The message.

Exception exception

The exception.

Returns
Type Description
Exception

An exception.

View Source

GetDescendants()

Gets the descendants.

Declaration
public override IEnumerable<WorkItem> GetDescendants()
Returns
Type Description
IEnumerable<WorkItem>

Descendant items.

Overrides
WorkItem.GetDescendants()
View Source

Process(Object, IExecutionContext)

Processes the specified input.

Declaration
protected abstract object Process(object input, IExecutionContext executionContext)
Parameters
Type Name Description
System.Object input

The input.

IExecutionContext executionContext

The execution context.

Returns
Type Description
System.Object

Processing result. May be null.

Implements

IFlowModelItem
IComputationalWork

Extension Methods

WorkItemExtensions.BuildExecutableWork(WorkItem)

See Also

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