blob: 1358b94a3c883fc6097e64d1cefbd25e0331ae25 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
//------------------------------------------------------------------------------
// <copyright file="OdbcErrorCollection.cs" company="Microsoft">
// Copyright (c) Microsoft Corporation. All rights reserved.
// </copyright>
// <owner current="true" primary="true">[....]</owner>
// <owner current="true" primary="false">[....]</owner>
//------------------------------------------------------------------------------
namespace System.Data.Odbc {
using System;
using System.Collections;
using System.Data;
[Serializable]
public sealed class OdbcErrorCollection : ICollection {
private ArrayList _items = new ArrayList();
internal OdbcErrorCollection() {
}
Object System.Collections.ICollection.SyncRoot {
get { return this; }
}
bool System.Collections.ICollection.IsSynchronized {
get { return false; }
}
public int Count {
get {
return _items.Count;
}
}
public OdbcError this[int i] {
get {
return (OdbcError)_items[i];
}
}
internal void Add(OdbcError error) {
_items.Add(error);
}
public void CopyTo (Array array, int i) {
_items.CopyTo(array, i);
}
public void CopyTo (OdbcError[] array, int i) {
_items.CopyTo(array, i);
}
public IEnumerator GetEnumerator() {
return _items.GetEnumerator();
}
internal void SetSource (string Source) {
foreach (object error in _items) {
((OdbcError)error).SetSource(Source);
}
}
}
}
|