Class BulkTaskResult<TResult>
A record that stores details about the result of task execution. For tasks that have not completed yet, OptimaJet.Workflow.Core.Runtime.Bulk.BulkTaskResult%601.Empty is used.
Inheritance
↳ object
↳ BulkTaskResult<TResult>
Implements
IEquatable<BulkTaskResult<TResult>>
Inherited Members
Equals(object)
Equals(object, object)
GetHashCode()
GetType()
MemberwiseClone()
ReferenceEquals(object, object)
ToString()
Namespace: OptimaJet.Workflow.Core.Runtime.Bulk
Assembly: OptimaJet.Workflow.Core.dll
Syntaxpublic record BulkTaskResult<TResult> : IEquatable<BulkTaskResult<TResult>>
Constructors
BulkTaskResult(BulkTaskState, TResult?, Exception?, DateTimeOffset?, DateTimeOffset?)
A record that stores details about the result of task execution. For tasks that have not completed yet, OptimaJet.Workflow.Core.Runtime.Bulk.BulkTaskResult%601.Empty is used.
Declarationpublic BulkTaskResult(BulkTaskState State, TResult? Result = default, Exception? Exception = null, DateTimeOffset? StartedAt = null, DateTimeOffset? FinalizedAt = null)
Type | Name | Description |
---|---|---|
BulkTaskState | State | The state of the task. |
{TResult} | Result | If the task has completed with the status <xref href="OptimaJet.Workflow.Core.Runtime.Bulk.BulkTaskState.Completed" data-throw-if-not-resolved="false"></xref>, the result will be stored here; otherwise, it will be null. |
Exception | Exception | If the task has completed with the status <xref href="OptimaJet.Workflow.Core.Runtime.Bulk.BulkTaskState.Failed" data-throw-if-not-resolved="false"></xref>, the exception will be stored here; otherwise, it will be null. |
DateTimeOffset? | StartedAt | The time recorded immediately after changing the task status to <xref href="OptimaJet.Workflow.Core.Runtime.Bulk.BulkTaskState.Running" data-throw-if-not-resolved="false"></xref> and before the start of the task execution. |
DateTimeOffset? | FinalizedAt | The time recorded before generating and returning the result of the task execution, after changing the state to <xref href="OptimaJet.Workflow.Core.Runtime.Bulk.BulkTaskState.Completed" data-throw-if-not-resolved="false"></xref> or <xref href="OptimaJet.Workflow.Core.Runtime.Bulk.BulkTaskState.Failed" data-throw-if-not-resolved="false"></xref>. |
Properties
State
The state of the task.
Declarationpublic BulkTaskState State { get; init; }
Type | Description |
---|---|
BulkTaskState |
Result
If the task has completed with the status BulkTaskState.Completed, the result will be stored here; otherwise, it will be null.
Declarationpublic TResult? Result { get; init; }
Type | Description |
---|---|
{TResult} |
Exception
If the task has completed with the status BulkTaskState.Failed, the exception will be stored here; otherwise, it will be null.
Declarationpublic Exception? Exception { get; init; }
Type | Description |
---|---|
Exception |
StartedAt
The time recorded immediately after changing the task status to BulkTaskState.Running and before the start of the task execution.
Declarationpublic DateTimeOffset? StartedAt { get; init; }
Type | Description |
---|---|
DateTimeOffset? |
FinalizedAt
The time recorded before generating and returning the result of the task execution, after changing the state to BulkTaskState.Completed or BulkTaskState.Failed.
Declarationpublic DateTimeOffset? FinalizedAt { get; init; }
Type | Description |
---|---|
DateTimeOffset? |
Empty
The result used for an incomplete task.
Declarationpublic static BulkTaskResult<TResult> Empty { get; }
Type | Description |
---|---|
BulkTaskResult<<TResult>> |
Duration
The duration of task execution.
Declarationpublic TimeSpan? Duration { get; }
Type | Description |
---|---|
TimeSpan? |