Table of Contents

NotableDateRuleIdentity Struct

Definition

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

Represents the full, stable identity of a calculation rule: the owning resource, the notable-date concept, and the rule itself.

public readonly struct NotableDateRuleIdentity : IEquatable<NotableDateRuleIdentity>
Implements
Inherited Members
Extension Methods

Remarks

Identity is the single key used for lookup, override targeting, and result attribution. Display names are never used as identity, so two rules that merely share a display name (for example a national and a regional Constitution Day) remain distinct, and an override that targets one rule never collapses its siblings.

Constructors

NotableDateRuleIdentity(string, string, string)

Represents the full, stable identity of a calculation rule: the owning resource, the notable-date concept, and the rule itself.

public NotableDateRuleIdentity(string ResourceId, string NotableDateId, string RuleId)

Parameters

ResourceId string

The identifier of the resource that declares the rule.

NotableDateId string

The identifier of the notable-date concept that owns the rule.

RuleId string

The identifier of the rule within its notable-date concept.

Remarks

Identity is the single key used for lookup, override targeting, and result attribution. Display names are never used as identity, so two rules that merely share a display name (for example a national and a regional Constitution Day) remain distinct, and an override that targets one rule never collapses its siblings.

Properties

NotableDateId

The identifier of the notable-date concept that owns the rule.

public string NotableDateId { get; init; }

Property Value

string

ResourceId

The identifier of the resource that declares the rule.

public string ResourceId { get; init; }

Property Value

string

RuleId

The identifier of the rule within its notable-date concept.

public string RuleId { get; init; }

Property Value

string

Methods

Deconstruct(out string, out string, out string)

public void Deconstruct(out string ResourceId, out string NotableDateId, out string RuleId)

Parameters

ResourceId string
NotableDateId string
RuleId string

Equals(NotableDateRuleIdentity)

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

public bool Equals(NotableDateRuleIdentity other)

Parameters

other NotableDateRuleIdentity

An object to compare with this object.

Returns

bool

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

Equals(object)

Indicates whether this instance and a specified object are equal.

public override bool Equals(object obj)

Parameters

obj object

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.

GetHashCode()

Returns the hash code for this instance.

public override int GetHashCode()

Returns

int

A 32-bit signed integer that is the hash code for this instance.

ToString()

Returns the canonical string form of the identity, joining its components with a forward slash.

public override string ToString()

Returns

string

The identity rendered as resourceId/notableDateId/ruleId.

Operators

operator ==(NotableDateRuleIdentity, NotableDateRuleIdentity)

public static bool operator ==(NotableDateRuleIdentity left, NotableDateRuleIdentity right)

Parameters

left NotableDateRuleIdentity
right NotableDateRuleIdentity

Returns

bool

operator !=(NotableDateRuleIdentity, NotableDateRuleIdentity)

public static bool operator !=(NotableDateRuleIdentity left, NotableDateRuleIdentity right)

Parameters

left NotableDateRuleIdentity
right NotableDateRuleIdentity

Returns

bool

Applies to

ProductVersions
.NET8, 10