Table of Contents

NotableDateDurationDefinition Class

Definition

Namespace
Bodu.Globalization.Calendar
Assembly
Bodu.Globalization.Calendar.dll
Package
Bodu.Globalization.Calendar 1.0.1
Source
NotableDateDurationDefinition.cs

Represents how long a resolved notable-date occurrence lasts: either a fixed number of calendar days or a span whose end date is independently calculated.

public abstract record NotableDateDurationDefinition : IEquatable<NotableDateDurationDefinition>
Inheritance
NotableDateDurationDefinition
Implements
Derived
Inherited Members
Extension Methods

Remarks

A rule declares at most one duration definition. A null duration means the rule inherits the parent concept's DefaultDurationDays. The two concrete kinds - FixedDurationDefinition and CalculatedEndDateDurationDefinition - are mutually exclusive by construction, so a rule can never declare both a fixed day count and a calculated end date.

Constructors

NotableDateDurationDefinition()

protected NotableDateDurationDefinition()

NotableDateDurationDefinition(NotableDateDurationDefinition)

protected NotableDateDurationDefinition(NotableDateDurationDefinition original)

Parameters

original NotableDateDurationDefinition

Properties

EqualityContract

protected virtual Type EqualityContract { get; }

Property Value

Type

Methods

Equals(NotableDateDurationDefinition?)

Indicates whether the current object is equal to another object of the same type.

public virtual bool Equals(NotableDateDurationDefinition? other)

Parameters

other NotableDateDurationDefinition

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

Equals(object?)

Determines whether the specified object is equal to the current object.

public override bool Equals(object? obj)

Parameters

obj object

The object to compare with the current object.

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

PrintMembers(StringBuilder)

protected virtual bool PrintMembers(StringBuilder builder)

Parameters

builder StringBuilder

Returns

bool

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.

Operators

operator ==(NotableDateDurationDefinition?, NotableDateDurationDefinition?)

public static bool operator ==(NotableDateDurationDefinition? left, NotableDateDurationDefinition? right)

Parameters

left NotableDateDurationDefinition
right NotableDateDurationDefinition

Returns

bool

operator !=(NotableDateDurationDefinition?, NotableDateDurationDefinition?)

public static bool operator !=(NotableDateDurationDefinition? left, NotableDateDurationDefinition? right)

Parameters

left NotableDateDurationDefinition
right NotableDateDurationDefinition

Returns

bool

Applies to

ProductVersions
.NET8, 10

See Also