Class WorkItemStatusServiceExtensions
Extension methods for IWorkItemStatusService.
Inheritance
System.Object
WorkItemStatusServiceExtensions
Namespace: DNVGL.One.Compute.Core.Extensions
Assembly: DNVGL.One.Compute.Core.dll
Syntax
public static class WorkItemStatusServiceExtensions : object
Methods
View SourceAggregateJobDuration(IWorkItemStatusService, String)
Aggregates the duration of the job.
Declaration
public static long AggregateJobDuration(this IWorkItemStatusService statusService, string jobId)
Parameters
Type | Name | Description |
---|---|---|
IWorkItemStatusService | statusService | The status service. |
System.String | jobId | The job identifier. |
Returns
Type | Description |
---|---|
System.Int64 | The job duration in milliseconds. |
GetJobStatus(IJobStatusService, Job)
Gets the job status.
Declaration
public static JobInfo GetJobStatus(this IJobStatusService statusService, Job job)
Parameters
Type | Name | Description |
---|---|---|
IJobStatusService | statusService | The job status service. |
Job | job | The job. |
Returns
Type | Description |
---|---|
JobInfo | The Job info. |
UpdateJobStatus(IJobStatusService, Job, WorkStatus, Double, String)
Updates the job status.
Declaration
public static void UpdateJobStatus(this IJobStatusService statusService, Job job, WorkStatus status, double progress, string message = null)
Parameters
Type | Name | Description |
---|---|---|
IJobStatusService | statusService | The job status service. |
Job | job | The job. |
WorkStatus | status | The status. |
System.Double | progress | The progress. |
System.String | message | The message. |
UpdateJobStatus(IJobStatusService, String, WorkStatus, Double, String)
Updates the job status.
Declaration
public static void UpdateJobStatus(this IJobStatusService statusService, string jobId, WorkStatus status, double progress, string message = null)
Parameters
Type | Name | Description |
---|---|---|
IJobStatusService | statusService | The job status service. |
System.String | jobId | The job identifier. |
WorkStatus | status | The status. |
System.Double | progress | The progress. |
System.String | message | The message. |
UpdateWorkItemStatus(IWorkItemStatusService, String, String, String, WorkStatus, Double, String)
Updates the work item status.
Declaration
public static void UpdateWorkItemStatus(this IWorkItemStatusService statusService, string jobId, string itemId, string parentItemId, WorkStatus state, double progress, string message = null)
Parameters
Type | Name | Description |
---|---|---|
IWorkItemStatusService | statusService | The status service. |
System.String | jobId | The job identifier. |
System.String | itemId | The item identifier. |
System.String | parentItemId | The parent item identifier. |
WorkStatus | state | The state. |
System.Double | progress | The progress. |
System.String | message | The message. |