Class Result
Wraps the application result from processing a WorkUnit.
Inheritance
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 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 |
---|---|---|
System.Object | applicationResult | The application result object associated with the WorkUnit that produced this Result. |
Properties
View SourceBatchNumber
Gets or sets the batch number.
Declaration
public int BatchNumber { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | The batch number. |
Id
Gets or sets the context identifier.
Declaration
public string Id { get; set; }
Property Value
Type | Description |
---|---|
System.String | The context identifier. |
JobId
Gets or sets the job identifier.
Declaration
public string JobId { get; set; }
Property Value
Type | Description |
---|---|
System.String | The job identifier. |
ParentId
Gets or sets the parent identifier.
Declaration
public string ParentId { get; set; }
Property Value
Type | Description |
---|---|
System.String | The parent identifier. |
Tag
Gets 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 identifier.
WorkItemId
Gets the work item identifier.
Declaration
public string WorkItemId { get; }
Property Value
Type | Description |
---|---|
System.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. |