Exemple #1
0
        public bool Equals(ReinsuranceSubject other)
        {
            if (other == null)
            {
                return(false);
            }

            if (IsDerived)
            {
                return(Enumerable.SequenceEqual(ChildrenCoverNodeList.OrderBy(t => t), other.ChildrenCoverNodeList.OrderBy(t => t)));
            }
            else
            {
                if (other is ReinsuranceSubject)
                {
                    if (this.schedule.ScheduleListEquals((other as ReinsuranceSubject).schedule) &
                        base.Equals(other))
                    {
                        return(true);
                    }
                    else
                    {
                        return(false);
                    }
                }
                else
                {
                    return(false);
                }
            }
        }
Exemple #2
0
 public bool Equals(PrimarySubject other)
 {
     if (IsDerived)
     {
         return(Enumerable.SequenceEqual(ChildrenCoverNodeList.OrderBy(t => t), other.ChildrenCoverNodeList.OrderBy(t => t)));
     }
     else
     {
         if (this.schedule.ScheduleListEquals((other as PrimarySubject).schedule) &
             base.Equals(other) & this.IsPerRisk == other.IsPerRisk)
         {
             return(true);
         }
         else
         {
             return(false);
         }
     }
 }