Files
mono/mcs/class/System.Data/System.Data.Odbc/OdbcErrorCollection.cs
T
Brian Ritchie cc810f5abf Implemented full error handling support: OdbcException, OdbcError, OdbcErrorCollection
includes full error text returned by ODBC driver

svn path=/trunk/mcs/; revision=8449
2002-10-21 16:44:14 +00:00

88 lines
1.3 KiB
C#
Executable File

//
// System.Data.Odbc.OdbcErrorCollection
//
// Author:
// Brian Ritchie ([email protected])
//
// Copyright (C) Brian Ritchie, 2002
//
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Data.Common;
namespace System.Data.Odbc
{
public sealed class OdbcErrorCollection : ICollection, IEnumerable
{
#region Fields
ArrayList list = new ArrayList ();
#endregion // Fields
#region Properties
public int Count
{
get
{
return list.Count;
}
}
public OdbcError this[int index]
{
get
{
return (OdbcError) list[index];
}
}
object ICollection.SyncRoot
{
get
{
return list.SyncRoot;
}
}
bool ICollection.IsSynchronized
{
get
{
return list.IsSynchronized;
}
}
#endregion // Properties
#region Methods
public void Add (OdbcError error)
{
list.Add ((object) error);
}
[MonoTODO]
public void CopyTo (Array array, int index)
{
((OdbcError[])(list.ToArray ())).CopyTo (array, index);
throw new NotImplementedException ();
}
public IEnumerator GetEnumerator ()
{
return list.GetEnumerator ();
}
IEnumerator IEnumerable.GetEnumerator ()
{
return GetEnumerator ();
}
#endregion // Methods
}
}