Skip to content

PeriodRatingInfoExtensions

Supplies reusable extension methods for iPeriodRatingInfo implementations so callers can test market-type scenarios and perform value-based equality/hash logic without duplicating the same field comparisons in every implementing type.

Purpose

  • Provide shared market-type predicates for voluntary and assigned-risk periods.
  • Centralize the base equality comparison across the iPeriodRatingInfo field set.
  • Centralize the hash-code calculation used with that equality model.

Context

  • Namespace: SAIF.Business.Policy
  • Assembly/package: SAIF.Business.Policy

Public members

Member Signature Purpose
IsVoluntary Public Function IsVoluntary(ByVal target As iPeriodRatingInfo) As Boolean Returns True when the target period is classified as MarketTypes.Voluntary.
IsAssignedRisk Public Function IsAssignedRisk(ByVal target As iPeriodRatingInfo) As Boolean Returns True when the target period is classified as MarketTypes.AssignedRisk.
BaseEquals Public Function BaseEquals(ByVal target As iPeriodRatingInfo, ByVal inObject As iPeriodRatingInfo) As Boolean Compares the shared rating fields that define value equality for two period-rating objects.
BaseGetHashCode Public Function BaseGetHashCode(ByVal target As iPeriodRatingInfo) As Integer Builds a hash from the shared rating fields so implementations can align hashing with BaseEquals.

Behavioral notes

  • BaseEquals compares the anniversary/rating dates, extension flags, effective/expiration dates, rate-tier code, and market type.
  • BaseGetHashCode concatenates the same shared fields as strings before calling GetHashCode() on the combined value.

Constraints and usage notes

  • Callers must ensure target and inObject are non-null before invoking the extension methods.

Sources

  • SAIF.Business.Policy\iPeriodRatingInfo.vb