Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Struct

ProjectDuration

OfficeIMO.Project

Namespace
OfficeIMO.Project
Assembly
OfficeIMO.Project
Source revision
ba882f6b0d07 with working tree changes
Base
ValueType
Implements
IEquatable<ProjectDuration>
Modifiers
sealed

A duration quantity that distinguishes working time from elapsed time and retains its display unit.

Inheritance

  • ValueType
  • ProjectDuration

Usage

Explore 20 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Accepted by parameters 4

Constructors

public ProjectDuration(decimal value, ProjectDurationUnit unit, bool elapsed = false, bool estimated = false) #

Creates a duration. Negative values are reserved for dependency lag, not task duration.

Parameters

value decimal required
unit OfficeIMO.Project.ProjectDurationUnit required
elapsed bool = false optional
estimated bool = false optional

Methods

public static ProjectDuration ElapsedDays(decimal value) #

Creates an elapsed-day duration.

Parameters

value decimal required
public static ProjectDuration ElapsedHours(decimal value) #

Creates an elapsed-hour duration.

Parameters

value decimal required
Equals 2 overloads
public bool Equals(ProjectDuration other) #

Tests quantity, unit, elapsed semantics, and estimate marker.

Parameters

other OfficeIMO.Project.ProjectDuration required

Returns

bool
public override bool Equals(object? obj) #

Indicates whether this instance and a specified object are equal.

Parameters

obj object? required
The object to compare with the current instance.

Returns

bool true if obj and this instance are the same type and represent the same value; otherwise, false.
public ProjectDuration Estimated(bool value = true) #

Returns a copy with the estimate marker.

Parameters

value bool = true optional
public override int GetHashCode() #

Returns the hash code for this instance.

Returns

int A 32-bit signed integer that is the hash code for this instance.
public override string ToString() #

Returns an invariant diagnostic representation, not a locale-specific Project input string.

Returns

string
public static ProjectDuration WorkingDays(decimal value) #

Creates a working-day duration.

Parameters

value decimal required
public static ProjectDuration WorkingHours(decimal value) #

Creates a working-hour duration.

Parameters

value decimal required
public static ProjectDuration WorkingMinutes(decimal value) #

Creates a working-minute duration.

Parameters

value decimal required

Properties

public decimal Value { get; } #

Quantity in the selected unit.

public ProjectDurationUnit Unit { get; } #

Display and conversion unit.

public bool IsElapsed { get; } #

True when all time counts, including non-working time.

public bool IsEstimated { get; } #

True when the duration is marked as an estimate.