imported everything from my branch (which is slightly harmless).
[mono.git] / mcs / class / FirebirdSql.Data.Firebird / FirebirdSql.Data.Common / IscErrorCollection.cs
1 /*\r
2  *      Firebird ADO.NET Data provider for .NET and     Mono \r
3  * \r
4  *         The contents of this file are subject to the Initial \r
5  *         Developer's Public License Version 1.0 (the "License"); \r
6  *         you may not use this file except in compliance with the \r
7  *         License. You may obtain a copy of the License at \r
8  *         http://www.firebirdsql.org/index.php?op=doc&id=idpl\r
9  *\r
10  *         Software distributed under the License is distributed on \r
11  *         an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either \r
12  *         express or implied. See the License for the specific \r
13  *         language governing rights and limitations under the License.\r
14  * \r
15  *      Copyright (c) 2002, 2005 Carlos Guzman Alvarez\r
16  *      All Rights Reserved.\r
17  */\r
18 \r
19 using System;\r
20 using System.Collections;\r
21 \r
22 namespace FirebirdSql.Data.Common\r
23 {\r
24         internal sealed class IscErrorCollection : CollectionBase\r
25         {\r
26                 #region Indexers\r
27 \r
28                 public IscError this[int index]\r
29                 {\r
30                         get { return (IscError)this.List[index]; }\r
31                 }\r
32 \r
33                 #endregion\r
34 \r
35                 #region Methods\r
36 \r
37                 public IscError Add(int type, string strParam)\r
38                 {\r
39                         return this.Add(new IscError(type, strParam));\r
40                 }\r
41 \r
42                 public IscError Add(int type, int errorCode)\r
43                 {\r
44                         return this.Add(new IscError(type, errorCode));\r
45                 }\r
46 \r
47                 public IscError Add(IscError error)\r
48                 {\r
49                         this.List.Add(error);\r
50 \r
51                         return error;\r
52                 }\r
53 \r
54                 #endregion\r
55         }\r
56 }\r