示例#1
0
        //ToDo: This needs a memberwise hash code implementation
        public override int GetHashCode()
        {
            var hashCode = ByDay.GetHashCode() ^ ByHour.GetHashCode() ^ ByMinute.GetHashCode() ^ ByMonth.GetHashCode()
                           ^ ByMonthDay.GetHashCode() ^ BySecond.GetHashCode() ^ BySetPosition.GetHashCode() ^ ByWeekNo.GetHashCode()
                           ^ ByYearDay.GetHashCode() ^ Count.GetHashCode() ^ Frequency.GetHashCode();

            if (Interval.Equals(1))
            {
                hashCode ^= 0x1;
            }
            else
            {
                hashCode ^= Interval.GetHashCode();
            }

            hashCode ^= Until.GetHashCode();
            hashCode ^= FirstDayOfWeek.GetHashCode();
            return(hashCode);
        }
示例#2
0
        public override int GetHashCode()
        {
            int hashCode =
                ByDay.GetHashCode() ^ ByHour.GetHashCode() ^ ByMinute.GetHashCode() ^
                ByMonth.GetHashCode() ^ ByMonthDay.GetHashCode() ^ BySecond.GetHashCode() ^
                BySetPos.GetHashCode() ^ ByWeekNo.GetHashCode() ^ ByYearDay.GetHashCode() ^
                Count.GetHashCode() ^ Frequency.GetHashCode();

            if (Interval.Equals(1) || Interval.Equals(int.MinValue))
            {
                hashCode ^= 0x1;
            }
            else
            {
                hashCode ^= Interval.GetHashCode();
            }

            hashCode ^= Until.GetHashCode();
            hashCode ^= Wkst.GetHashCode();
            return(hashCode);
        }