/
OdbcErrorCollection.cs
72 lines (60 loc) · 1.66 KB
/
OdbcErrorCollection.cs
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
65
66
67
68
69
70
71
72
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System.Collections;
namespace System.Data.Odbc
{
[Serializable]
[System.Runtime.CompilerServices.TypeForwardedFrom("System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public sealed class OdbcErrorCollection : ICollection
{
private readonly ArrayList _items = new ArrayList(); // Do not rename (binary serialization)
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);
}
}
}
}