Table of Contents

FixedDurationDefinition Class

Definition

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

Represents a fixed occurrence duration expressed as a number of calendar days, inclusive of the occurrence start date.

public sealed record FixedDurationDefinition : NotableDateDurationDefinition, IEquatable<NotableDateDurationDefinition>, IEquatable<FixedDurationDefinition>
Inheritance
FixedDurationDefinition
Implements
Inherited Members
Extension Methods

Remarks

A fixed duration of one day is a single-day occurrence. The resolved end date is Date + Days - 1. Values below one are clamped to one at resolution time.

Constructors

FixedDurationDefinition(int)

Represents a fixed occurrence duration expressed as a number of calendar days, inclusive of the occurrence start date.

public FixedDurationDefinition(int Days)

Parameters

Days int

The number of calendar days the occurrence spans, inclusive of the first day.

Remarks

A fixed duration of one day is a single-day occurrence. The resolved end date is Date + Days - 1. Values below one are clamped to one at resolution time.

See Also

Properties

Days

The number of calendar days the occurrence spans, inclusive of the first day.

public int Days { get; init; }

Property Value

int

EqualityContract

protected override Type EqualityContract { get; }

Property Value

Type

Methods

Deconstruct(out int)

public void Deconstruct(out int Days)

Parameters

Days int

Equals(FixedDurationDefinition?)

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

public bool Equals(FixedDurationDefinition? other)

Parameters

other FixedDurationDefinition

An object to compare with this object.

Returns

bool

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

Equals(NotableDateDurationDefinition?)

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

public override sealed 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 override 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 ==(FixedDurationDefinition?, FixedDurationDefinition?)

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

Parameters

left FixedDurationDefinition
right FixedDurationDefinition

Returns

bool

operator !=(FixedDurationDefinition?, FixedDurationDefinition?)

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

Parameters

left FixedDurationDefinition
right FixedDurationDefinition

Returns

bool

Applies to

ProductVersions
.NET8, 10

See Also