Example #1
0
        public override bool CanBeEquals(Pullenti.Ner.Referent obj, Pullenti.Ner.Core.ReferentsEqualType typ)
        {
            DateRangeReferent dr = obj as DateRangeReferent;

            if (dr == null)
            {
                return(false);
            }
            if (DateFrom != null)
            {
                if (!DateFrom.CanBeEquals(dr.DateFrom, typ))
                {
                    return(false);
                }
            }
            else if (dr.DateFrom != null)
            {
                return(false);
            }
            if (DateTo != null)
            {
                if (!DateTo.CanBeEquals(dr.DateTo, typ))
                {
                    return(false);
                }
            }
            else if (dr.DateTo != null)
            {
                return(false);
            }
            return(true);
        }