Show / Hide Table of Contents

Class Result

Wraps the application result from processing a WorkUnit.

Inheritance
object
Result
Implements
IResult
IFlowModelItem
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: DNVGL.One.Compute.Core.FlowModel
Assembly: DNVGL.One.Compute.Core.dll
Syntax
[DataContract]
public class Result : 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
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
[DataMember]
public int BatchNumber { get; set; }
Property Value
Type Description
int

The batch number.

View Source

Id

Gets or sets the context identifier.

Declaration
[JsonProperty("id")]
[DataMember]
public string Id { get; set; }
Property Value
Type Description
string

The context identifier.

View Source

JobId

Gets or sets the job identifier.

Declaration
[DataMember]
public string JobId { get; set; }
Property Value
Type Description
string

The job identifier.

View Source

ParentId

Gets or sets the parent identifier.

Declaration
[DataMember]
public string ParentId { get; set; }
Property Value
Type Description
string

The parent identifier.

View Source

Tag

Gets the tag.

Declaration
[DataMember]
public string Tag { get; set; }
Property Value
Type Description
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 identifier.

View Source

WorkItemId

Gets the work item identifier.

Declaration
public string WorkItemId { get; }
Property Value
Type Description
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
In this article
Back to top Copyright © DNV AS. All rights reserved.