Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version
Go to top

MultiList: .NET Generic List with Multiple Sort Orders

, 1 Feb 2008
The MultiList class extends the functionality of the generic list. The MultiList class manages multiple sort orders on lists. It is best suited to object lists where searching is required on more than one criteria.
multilist.zip
AsAbove
Collections
MultiList
MultiList
bin
Release
AsAbove.Collections.MultiList.dll
Documentation
Help
MultiList.chm
Properties
Source
AsAbove
Collections
Test
bin
Release
AsAbove.Collections.MultiList.dll
Test.dll
Properties
// 
// MultiList library - Copyright 2008 by Michael Moorman / AsAbove.net
// This work is released to the public domain, and may be used for any purpose, without any conditions.
// 
using System;
using System.Collections.Generic;
using System.Text;

namespace AsAbove.Collections.Exception
{
	/// <summary>
	/// EnumeratorTypeExpectedException is thrown when the <see cref="AsAbove.Collections.MultiList&lt;T&gt;">MultiList</see> class is constructed with an 
	/// invalid type in the first argument. The first argument must an enumerator type.
	/// </summary>
	public class EnumeratorTypeExpectedException : ApplicationException
	{
		/// <summary>
		/// 
		/// </summary>
		public EnumeratorTypeExpectedException ()
			:
			base ("The constructor argument 'typeOfEnum' must be an enumerator type which defines " +
				"the sort orders to be apply to the MultiSort class object")
		{}
	}

	/// <summary>
	/// InsufficientIComparerCountException is thrown by the <see cref="AsAbove.Collections.MultiList&lt;T&gt;">MultiList</see> constructor does not contain
	/// a sufficient number of comparer classes. 
	/// </summary>
	public class InsufficientIComparerCountException : ApplicationException
	{
		/// <summary>
		/// 
		/// </summary>
		/// <param name="count"></param>
		public InsufficientIComparerCountException (int count)
			:
			base ("There were not enough IComparer objects passed to the constructor of the MultiSort class. " +
				"The constructor expected " + count + "IComparer objects")
		{}
	}

	/// <summary>
	/// InvalidEnumeratorException is thrown if a method enumerator argument is provided that does not the 
	/// enumerator type used in the <see cref="AsAbove.Collections.MultiList&lt;T&gt;">MultiList</see> constructor.
	/// </summary>
	public class InvalidEnumeratorException : ApplicationException
	{
		/// <summary>
		/// 
		/// </summary>
		public InvalidEnumeratorException ()
			:
			base ("Invalid enumerator.")
		{ }
	}

	/// <summary>
	/// MultiListObjectNotFoundException is thrown by the <see cref="AsAbove.Collections.MultiList&lt;T&gt;">MultiList</see> class
	/// <see cref="AsAbove.Collections.MultiList&lt;T&gt;.Find&lt;ComparisonType&gt; (AsAbove.Collections.MultiList&lt;T&gt;.ITypeComparer&lt;ComparisonType&gt;, ComparisonType)">Find</see> method when no match is found.
	/// </summary>
	public class MultiListObjectNotFoundException : ApplicationException
	{
		/// <summary>
		/// 
		/// </summary>
		public MultiListObjectNotFoundException ()
			:
			base ("Object not found in list.")
		{ }
	}

}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

gogglin

United States United States
No Biography provided

| Advertise | Privacy | Mobile
Web01 | 2.8.140921.1 | Last Updated 2 Feb 2008
Article Copyright 2008 by gogglin
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid