Show / Hide Table of Contents

Class WorkItemExtensions

Extension methods for WorkItem and sub classes.

Inheritance
object
WorkItemExtensions
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: DNVGL.One.Compute.Core.Extensions
Assembly: DNVGL.One.Compute.Core.dll
Syntax
public static class WorkItemExtensions

Methods

View Source

GetAncestors(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 workItem relative to ancestor. An empty collection is returned if workItem is not part of ancestor.

View Source

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.

View Source

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
double

Weight of workItem relative to rootItem.

View Source

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
bool

True if the given state is a terminal state.

  • View Source
In this article
Back to top Copyright © DNV AS. All rights reserved.