NotableDateRuleIdentity Struct
Definition
- Namespace
- Bodu.Globalization.Calendar
- Assembly
- Bodu.Globalization.Calendar.dll
- Package
- Bodu.Globalization.Calendar 1.0.1
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
ResourceIdstringThe identifier of the resource that declares the rule.
NotableDateIdstringThe identifier of the notable-date concept that owns the rule.
RuleIdstringThe 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
ResourceId
The identifier of the resource that declares the rule.
public string ResourceId { get; init; }
Property Value
RuleId
The identifier of the rule within its notable-date concept.
public string RuleId { get; init; }
Property Value
Methods
Deconstruct(out string, out string, out string)
public void Deconstruct(out string ResourceId, out string NotableDateId, out string RuleId)
Parameters
Equals(NotableDateRuleIdentity)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(NotableDateRuleIdentity other)
Parameters
otherNotableDateRuleIdentityAn object to compare with this object.
Returns
Equals(object)
Indicates whether this instance and a specified object are equal.
public override bool Equals(object obj)
Parameters
objobjectThe object to compare with the current instance.
Returns
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
leftNotableDateRuleIdentityrightNotableDateRuleIdentity
Returns
operator !=(NotableDateRuleIdentity, NotableDateRuleIdentity)
public static bool operator !=(NotableDateRuleIdentity left, NotableDateRuleIdentity right)
Parameters
leftNotableDateRuleIdentityrightNotableDateRuleIdentity
Returns
Applies to
| Product | Versions |
|---|---|
| .NET | 8, 10 |