Show / Hide Table of Contents

Class Result

Wraps the application result from processing a WorkUnit.

Inheritance
System.Object
Result
Implements
IResult
IFlowModelItem
Namespace: DNVGL.One.Compute.Core.FlowModel
Assembly: DNVGL.One.Compute.Core.dll
Syntax
public class Result : object, IResult, IFlowModelItem
Remarks

Result wraps an application result object in exactly the same way as WorkUnit wraps application input. The application worker processes the associated WorkUnit by taking the application input from the it and optionally producing an application result object that is returned from the ExecuteAsync method of the worker. The WorkerHost invoking the worker will then wrap the application result object in a Result and store it to permanent storage using an implementation of IFlowModelStorageService<T>.

Constructors

View Source

Result()

Initializes a new instance of the Result class.

Declaration
public Result()
View Source

Result(Object)

Initializes a new instance of the Result class.

Declaration
public Result(object applicationResult)
Parameters
Type Name Description
System.Object applicationResult

The application result object associated with the WorkUnit that produced this Result.

Properties

View Source

BatchNumber

Gets or sets the batch number.

Declaration
public int BatchNumber { get; set; }
Property Value
Type Description
System.Int32

The batch number.

View Source

Data

Gets or sets the data container of results from the processing of the WorkUnit.

Declaration
public DataContainer Data { get; set; }
Property Value
Type Description
DataContainer

The results container.

View Source

Id

Gets or sets the context identifier.

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

The context identifier.

View Source

JobId

Gets or sets the job identifier.

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

The job identifier.

View Source

ParentId

Gets or sets the parent identifier.

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

The parent identifier.

View Source

Tag

Gets or sets the tag.

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

The tag.

Remarks

This is a client specified tag that does not need to be unique. It is used as a recognizable prefix for the job id

View Source

WorkItemId

Gets the work item identifier.

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

The work item identifier.

Methods

View Source

GetContent()

Gets the data content.

Declaration
public JToken GetContent()
Returns
Type Description
JToken

The content.

View Source

GetResult<T>(ISerializationContext)

Gets the result from an WorkUnit.

Declaration
public T GetResult<T>(ISerializationContext serializationContext = null)
    where T : class
Parameters
Type Name Description
ISerializationContext serializationContext

The serialization Context.

Returns
Type Description
T

Result as T

Type Parameters
Name Description
T

Type of result

Implements

IResult
IFlowModelItem
  • View Source
Back to top Copyright © DNV GL AS. All rights reserved.