PeriodRatingInfoExtensions¶
PeriodRatingInfoExtensions is a Public Module of extension methods on iPeriodRatingInfo that centralizes the market-type classification and equality/hash logic every rating-period implementer would otherwise have to duplicate, giving all consumers a single, consistent definition of "voluntary", "assigned risk", and rating-period equality (BR-POL-015, BR-POL-018).
Purpose¶
- Classify a rating period as Voluntary or Assigned Risk purely from its
MarketTypeproperty, so callers never re-implement the market-type check (BR-POL-015). - Provide a single, complete equality (
BaseEquals) and hash (BaseGetHashCode) definition across all eightiPeriodRatingInfoattributes for any implementer to reuse (BR-POL-018).
Context¶
- Namespace:
SAIF.Business.Policy - Assembly/package:
SAIF.Business.Policy(PolicyCommon)
Public members¶
| Member | Signature | Purpose |
|---|---|---|
IsVoluntary |
<Extension()> Function IsVoluntary(info As iPeriodRatingInfo) As Boolean |
Returns True when info.MarketType = Enums.MarketTypes.Voluntary (BR-POL-015). |
IsAssignedRisk |
<Extension()> Function IsAssignedRisk(info As iPeriodRatingInfo) As Boolean |
Returns True when info.MarketType = Enums.MarketTypes.AssignedRisk (BR-POL-015). |
BaseEquals |
<Extension()> Function BaseEquals(info As iPeriodRatingInfo, other As iPeriodRatingInfo) As Boolean |
Returns True only when anniversary rating date, rating effective date, ARD-extended flag, RED-extended flag, effective date, expiration date, rate tier code, and market type all match (BR-POL-018). |
BaseGetHashCode |
<Extension()> Function BaseGetHashCode(info As iPeriodRatingInfo) As Integer |
Concatenates the same eight rating attributes into a string and hashes the result, keeping the hash consistent with BaseEquals (BR-POL-018). |
Behavioral notes¶
- These are pure comparison helpers with no data access or side effects; they operate solely on the properties exposed by
iPeriodRatingInfo.
Constraints and usage notes¶
- Implementers of
iPeriodRatingInfo/iPolicyPeriodBaseshould delegate their ownEquals/GetHashCodeoverrides toBaseEquals/BaseGetHashCodeto keep comparison semantics consistent across the codebase.*
Note: Statements marked with * were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts.
Sources¶
- SAIF.Business.Policy/iPeriodRatingInfo.vb