Exemplo n.º 1
0
 /// <inheritdoc />
 public bool Equals(BasePNRDataItem x, BasePNRDataItem y)
 {
     return
         (RefList <int> .Equals(x.TravellerRef, y.TravellerRef) &&
          RefList <int> .Equals(x.SegmentRef, y.SegmentRef) &&
          RefList <int> .Equals(x.ServiceRef, y.ServiceRef));
 }
Exemplo n.º 2
0
        public bool Equals(BasePNRDataItem other, bool checkTravellerRefs = true, bool checkServiceRefs = true, bool checkSegmentsRef = true)
        {
            if (other == null)
            {
                return(false);
            }

            if (Type != other.Type)
            {
                return(false);
            }

            if (checkTravellerRefs && !RefList <int> .Equals(TravellerRef, other.TravellerRef))
            {
                return(false);
            }

            if (checkServiceRefs && !RefList <int> .Equals(ServiceRef, other.ServiceRef))
            {
                return(false);
            }

            if (checkSegmentsRef && !RefList <int> .Equals(SegmentRef, other.SegmentRef))
            {
                return(false);
            }

            return(DataItemElementEquals(other));
        }