Пример #1
0
		public override void MergeInto(ArrayList records, ArrayList newRecords)
		{
			var comp = new AndSorterComparer(m_sorters);
			MergeInto(records, newRecords, comp);
		}
Пример #2
0
		// This will probably never be used, but for the sake of completeness, here it is
		protected internal override IComparer getComparer()
		{
			IComparer comp = new AndSorterComparer(m_sorters);
			return comp;
		}
Пример #3
0
		public override void Sort(/*ref*/ ArrayList records)
		{
#if DEBUG
			DateTime dt1 = DateTime.Now;
			int tc1 = Environment.TickCount;
#endif
			var comp = new AndSorterComparer(m_sorters);
			MergeSort.Sort(ref records, comp);

#if DEBUG
			// only do this if the timing switch is info or verbose
			if (RuntimeSwitches.RecordTimingSwitch.TraceInfo)
			{
			int tc2 = Environment.TickCount;
			TimeSpan ts1 = DateTime.Now - dt1;
			string s = "AndSorter:  Sorting " + records.Count + " records took " +
				(tc2 - tc1) + " ticks," + " or " + ts1.Minutes + ":" + ts1.Seconds + "." +
				ts1.Milliseconds.ToString("d3") + " min:sec.";
				Debug.WriteLine(s, RuntimeSwitches.RecordTimingSwitch.DisplayName);
			}
#endif
		}
Пример #4
0
		public override void MergeInto(ArrayList records, ArrayList newRecords)
		{
			using (AndSorterComparer comp = new AndSorterComparer(m_sorters))
				base.MergeInto(records, newRecords, comp);
		}