Ejemplo n.º 1
0
 /// <summary>
 /// Returns a hash code for this instance.
 /// </summary>
 /// <returns>A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.</returns>
 public override int GetHashCode()
 {
     unchecked
     {
         var result = base.GetHashCode();
         result = (result * 397) ^ (EffectiveCoverageDateRange != null ? EffectiveCoverageDateRange.GetHashCode() : 0);
         result = (result * 397) ^ (MemberNumber != null ? MemberNumber.GetHashCode() : 0);
         result = (result * 397) ^ (Payor != null ? Payor.GetHashCode() : 0);
         result = (result * 397) ^ (PayorSubscriber != null ? PayorSubscriber.GetHashCode() : 0);
         return(result);
     }
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="PayorCoverage"/> class.
        /// </summary>
        /// <param name="payor">The payor.</param>
        /// <param name="payorSubscriber">The payor subscriber.</param>
        /// <param name="memberNumber">The member number.</param>
        /// <param name="effectiveCoverageDateRange">The effective coverage date range.</param>
        /// <param name="payorCoverageType">Type of the payor coverage.</param>
        public PayorCoverage(Payor payor, PayorSubscriber payorSubscriber, string memberNumber, DateRange effectiveCoverageDateRange, PayorCoverageType payorCoverageType)
        {
            Check.IsNotNull(payor, () => Payor);
            Check.IsNotNull(payorSubscriber, () => PayorSubscriber);
            Check.IsNotNull(memberNumber, () => MemberNumber);
            Check.IsNotNull(effectiveCoverageDateRange, () => EffectiveCoverageDateRange);
            Check.IsNotNull(payorCoverageType, () => PayorCoverageType);

            Payor        = payor;
            MemberNumber = memberNumber;
            EffectiveCoverageDateRange = effectiveCoverageDateRange;
            PayorSubscriber            = payorSubscriber;
            PayorCoverageType          = payorCoverageType;
        }