Class WorkItemExtensions
Extension methods for WorkItem and sub classes.
Inheritance
System.Object
WorkItemExtensions
Namespace: DNVGL.One.Compute.Core.Extensions
Assembly: DNVGL.One.Compute.Core.dll
Syntax
public static class WorkItemExtensions : object
Methods
View SourceGetAncestors(WorkItem, WorkItem)
Gets the ancestors.
Declaration
public static IEnumerable<CompositeWork> GetAncestors(this WorkItem workItem, WorkItem ancestor)
Parameters
Type | Name | Description |
---|---|---|
WorkItem | workItem | The work item. |
WorkItem | ancestor | The ancestor. |
Returns
Type | Description |
---|---|
IEnumerable<CompositeWork> | Ancestors of |
GetDependencies(WorkUnit)
Gets the dependencies of the given work unit.
Declaration
public static IEnumerable<WorkUnit> GetDependencies(this WorkUnit workUnit)
Parameters
Type | Name | Description |
---|---|---|
WorkUnit | workUnit | The work unit. |
Returns
Type | Description |
---|---|
IEnumerable<WorkUnit> | The dependencies of the given work unit. |
GetRelativeWeight(WorkItem, WorkItem)
Gets the relative weight of the given workItem
in the tree spanning from rootItem
.
Declaration
public static double GetRelativeWeight(this WorkItem workItem, WorkItem rootItem)
Parameters
Type | Name | Description |
---|---|---|
WorkItem | workItem | The work item. |
WorkItem | rootItem | The root item. |
Returns
Type | Description |
---|---|
System.Double | Weight of |
IsTerminal(WorkStatus)
Determines whether the specified state is a terminal state.
Declaration
public static bool IsTerminal(this WorkStatus state)
Parameters
Type | Name | Description |
---|---|---|
WorkStatus | state | The state. |
Returns
Type | Description |
---|---|
System.Boolean | True if the given |