Show / Hide Table of Contents

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 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
System.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
System.Boolean

True if the given state is a terminal state

  • View Source
Back to top Copyright © DNV GL AS. All rights reserved.