init
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* ExceptionalList.cs
|
||||
*
|
||||
* Copyright © 2009
|
||||
* Diversified Technical Systems, Inc.
|
||||
* All Rights Reserved
|
||||
*/
|
||||
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace DatabaseExport
|
||||
{
|
||||
/// <summary>
|
||||
/// A version of <see cref="T:List"/> that provides its own exception type.
|
||||
/// </summary>
|
||||
///
|
||||
/// <typeparam name="T">
|
||||
/// The type of object contained by this list.
|
||||
/// </typeparam>
|
||||
///
|
||||
/// <remarks>
|
||||
/// Sample usage:
|
||||
/// public class A : ExceptionalList <int>
|
||||
/// {
|
||||
/// public void ScrewItUp( )
|
||||
/// {
|
||||
/// private bool error = true;
|
||||
/// if ( error ) throw new A.Exception( "Class A-specific screwup." );
|
||||
/// }
|
||||
/// }
|
||||
///
|
||||
/// ...
|
||||
///
|
||||
/// try
|
||||
/// {
|
||||
/// A.ScrewItUp( );
|
||||
/// B.ScrewItUp( );
|
||||
/// C.ScrewItUp( );
|
||||
/// }
|
||||
/// catch ( A.Exception ex )
|
||||
/// {
|
||||
/// // Can pick A's exceptions out of a crowd, or not and just treat it
|
||||
/// // polymorphically as a System.Exception.
|
||||
/// }
|
||||
/// </remarks>
|
||||
///
|
||||
[global::System.Serializable]
|
||||
public class ExceptionalList<T> : List<T>
|
||||
{
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user