Esempio n. 1
0
        public bool Equals(MonthlyCalendar obj)
        {
            //a little trick here : Monthly calendar knows nothing
            //about the precise month it is dealing with, so
            //FebruaryCalendars will be only equal if their
            //31st days are equally included
            //but that's not going to be a problem since
            //there's no need to redefine default value of false
            //for such days
            if (obj == null)
            {
                return(false);
            }
            bool baseEqual = GetBaseCalendar() == null || GetBaseCalendar().Equals(obj.GetBaseCalendar());

            return(baseEqual && DaysExcluded.SequenceEqual(obj.DaysExcluded));
        }
Esempio n. 2
0
        public bool Equals(MonthlyCalendar obj)
        {
            //a little trick here : Monthly calendar knows nothing
            //about the precise month it is dealing with, so
            //FebruaryCalendars will be only equal if their
            // 31st days are equally included ))
            //but that's not going to be a problem since
            //there's no need to redefine default value of false
            //for such days
            if (obj == null)
            {
                return(false);
            }
            var baseEqual = GetBaseCalendar() != null?
                            GetBaseCalendar().Equals(obj.GetBaseCalendar()) : true;

            return(baseEqual && (ArraysEqualElementsOnEqualPlaces(DaysExcluded, obj.DaysExcluded)
                                 ));
        }
Esempio n. 3
0
        public bool Equals(MonthlyCalendar obj)
        {
            //a little trick here : Monthly calendar knows nothing
            //about the precise month it is dealing with, so
            //FebruaryCalendars will be only equal if their
            // 31st days are equally included ))
            //but that's not going to be a problem since
            //there's no need to redefine default value of false
            //for such days
            if (obj == null)
            {
                return false;
            }
            bool baseEqual = GetBaseCalendar() == null || GetBaseCalendar().Equals(obj.GetBaseCalendar());

            return baseEqual && (ArraysEqualElementsOnEqualPlaces(DaysExcluded, obj.DaysExcluded)
                                );
        }