mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-17 19:10:23 -10:00
match MS.NET * OleDbCommandBuilder.cs: fixed GetUpdatetCommand typo * OleDbErrorCollection: added default internal ctor to match MS.NET * OleDbInfoMessageEventArgs.cs: added default internal ctor to match MS.NET * OleDbParameter.cs: added setter for IsNullable * OleDbParameterCollection: added default internal ctor to match MS.NET * OleDbPermission.cs: removed extra IsSubsetOf method svn path=/trunk/mcs/; revision=26996
101 lines
2.3 KiB
C#
101 lines
2.3 KiB
C#
//
|
|
// System.Data.OleDb.OleDbErrorCollection
|
|
//
|
|
// Authors:
|
|
// Rodrigo Moya ([email protected])
|
|
// Tim Coleman ([email protected])
|
|
//
|
|
// Copyright (C) Rodrigo Moya, 2002
|
|
// Copyright (C) Tim Coleman, 2002
|
|
//
|
|
|
|
using System.Collections;
|
|
using System.ComponentModel;
|
|
using System.Data;
|
|
using System.Data.Common;
|
|
|
|
namespace System.Data.OleDb
|
|
{
|
|
[ListBindableAttribute ( false)]
|
|
|
|
public sealed class OleDbErrorCollection : ICollection, IEnumerable
|
|
{
|
|
#region Fields
|
|
|
|
ArrayList list;
|
|
|
|
#endregion // Fields
|
|
|
|
#region Constructors
|
|
|
|
internal OleDbErrorCollection() {
|
|
}
|
|
|
|
#endregion Constructors
|
|
|
|
#region Properties
|
|
|
|
public int Count {
|
|
get {
|
|
return list.Count;
|
|
}
|
|
}
|
|
|
|
public OleDbError this[int index] {
|
|
get {
|
|
return (OleDbError) list[index];
|
|
}
|
|
}
|
|
|
|
object ICollection.SyncRoot {
|
|
get {
|
|
return list.SyncRoot;
|
|
}
|
|
}
|
|
|
|
bool ICollection.IsSynchronized {
|
|
get {
|
|
return list.IsSynchronized;
|
|
}
|
|
}
|
|
|
|
#endregion // Properties
|
|
|
|
#region Methods
|
|
|
|
internal void Add (OleDbError error)
|
|
{
|
|
list.Add ((object) error);
|
|
}
|
|
|
|
public void CopyTo (Array array, int index)
|
|
{
|
|
if (array == null)
|
|
throw new ArgumentNullException("array");
|
|
|
|
if ((index < array.GetLowerBound (0)) || (index > array.GetUpperBound (0)))
|
|
throw new ArgumentOutOfRangeException("index");
|
|
|
|
// is the check for IsFixedSize required?
|
|
if ((array.IsFixedSize) || (index + this.Count > array.GetUpperBound (0)))
|
|
throw new ArgumentException("array");
|
|
|
|
((OleDbError[])(list.ToArray ())).CopyTo (array, index);
|
|
|
|
|
|
}
|
|
|
|
public IEnumerator GetEnumerator ()
|
|
{
|
|
return list.GetEnumerator ();
|
|
}
|
|
|
|
IEnumerator IEnumerable.GetEnumerator ()
|
|
{
|
|
return GetEnumerator ();
|
|
}
|
|
|
|
#endregion // Methods
|
|
}
|
|
}
|