OleDbErrorCollection.cs 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. //
  2. // System.Data.OleDb.OleDbErrorCollection
  3. //
  4. // Authors:
  5. // Rodrigo Moya ([email protected])
  6. // Tim Coleman ([email protected])
  7. //
  8. // Copyright (C) Rodrigo Moya, 2002
  9. // Copyright (C) Tim Coleman, 2002
  10. //
  11. using System.Collections;
  12. using System.Data;
  13. using System.Data.Common;
  14. namespace System.Data.OleDb
  15. {
  16. public sealed class OleDbErrorCollection : ICollection, IEnumerable
  17. {
  18. #region Fields
  19. ArrayList list;
  20. #endregion // Fields
  21. #region Properties
  22. public int Count {
  23. get {
  24. return list.Count;
  25. }
  26. }
  27. public OleDbError this[int index] {
  28. get {
  29. return (OleDbError) list[index];
  30. }
  31. }
  32. object ICollection.SyncRoot {
  33. get {
  34. return list.SyncRoot;
  35. }
  36. }
  37. bool ICollection.IsSynchronized {
  38. get {
  39. return list.IsSynchronized;
  40. }
  41. }
  42. #endregion // Properties
  43. #region Methods
  44. internal void Add (OleDbError error)
  45. {
  46. list.Add ((object) error);
  47. }
  48. [MonoTODO]
  49. public void CopyTo (Array array, int index)
  50. {
  51. ((OleDbError[])(list.ToArray ())).CopyTo (array, index);
  52. throw new NotImplementedException ();
  53. }
  54. public IEnumerator GetEnumerator ()
  55. {
  56. return list.GetEnumerator ();
  57. }
  58. IEnumerator IEnumerable.GetEnumerator ()
  59. {
  60. return GetEnumerator ();
  61. }
  62. #endregion // Methods
  63. }
  64. }