Пример #1
0
        public void FetchAndResetChange(
            DateSetType addedDates,
            DateSetType removedDates)
        {
#if DEBUG
            //{
            //	// currently there is no case could cause addedDates and removedDates overlap.
            //	// just for sure to double check

            //	foreach (var it in m_addedDates)
            //	{
            //		global::System.Diagnostics.Debug.Assert(!m_removedDates.Any(d => m_lessThanComparer(it, d))); // TODO UNO d, it ?
            //	}
            //}
#endif
            foreach (var date in m_addedDates)
            {
                addedDates.Add(date);
            }
            m_addedDates.Clear();

            foreach (var date in m_removedDates)
            {
                removedDates.Add(date);
            }
            m_removedDates.Clear();
        }
Пример #2
0
 public TrackableDateCollection()
 {
     m_dateComparer          = new DateComparer();
     m_lessThanComparer      = (m_dateComparer.LessThanComparer);
     m_areEquivalentComparer = (m_dateComparer.AreEquivalentComparer);
     m_addedDates            = new DateSetType(m_lessThanComparer);
     m_removedDates          = new DateSetType(m_lessThanComparer);
 }