Class Result
Wraps the application result from processing a WorkUnit.
Inherited Members
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 SourceResult()
Initializes a new instance of the Result class.
Declaration
public Result()
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 SourceBatchNumber
Gets or sets the batch number.
Declaration
[DataMember]
public int BatchNumber { get; set; }
Property Value
Type | Description |
---|---|
int | The batch number. |
Id
Gets or sets the context identifier.
Declaration
[JsonProperty("id")]
[DataMember]
public string Id { get; set; }
Property Value
Type | Description |
---|---|
string | The context identifier. |
JobId
Gets or sets the job identifier.
Declaration
[DataMember]
public string JobId { get; set; }
Property Value
Type | Description |
---|---|
string | The job identifier. |
ParentId
Gets or sets the parent identifier.
Declaration
[DataMember]
public string ParentId { get; set; }
Property Value
Type | Description |
---|---|
string | The parent identifier. |
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.
WorkItemId
Gets the work item identifier.
Declaration
public string WorkItemId { get; }
Property Value
Type | Description |
---|---|
string | The work item identifier. |
Methods
View SourceGetContent()
Gets the data content.
Declaration
public JToken GetContent()
Returns
Type | Description |
---|---|
JToken | The content. |
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 |
Type Parameters
Name | Description |
---|---|
T | Type of result. |