2 // System.Data.Common.FieldNameLookup.cs
5 // Tim Coleman (tim@timcoleman.com)
7 // Copyright (C) Tim Coleman, 2002
10 using System.Collections;
13 namespace System.Data.Common {
15 // FIXME: Need to clean this up
16 public sealed class FieldNameLookup
18 internal sealed class FieldNameLookup : ICollection, IEnumerable
29 public FieldNameLookup ()
31 list = new ArrayList ();
34 public FieldNameLookup (DataTable schemaTable)
37 foreach (DataRow row in schemaTable.Rows)
38 list.Add ((string) row["ColumnName"]);
46 get { return list.Count; }
49 public bool IsFixedSize {
53 public bool IsReadOnly {
57 public bool IsSynchronized {
58 get { return list.IsSynchronized; }
61 public string this [int index] {
62 get { return (string) list[index]; }
63 set { list[index] = value; }
66 public object SyncRoot {
67 get { return list.SyncRoot; }
74 public int Add (object value)
76 return list.Add (value);
84 public bool Contains (object value)
86 return list.Contains (value);
89 public void CopyTo (Array array, int index)
91 list.CopyTo (array, index);
94 #if ONLY_1_0 || ONLY_1_1
95 IEnumerator IEnumerable.GetEnumerator ()
97 return list.GetEnumerator ();
101 public int IndexOf (object value)
103 return list.IndexOf (value);
106 public void Insert (int index, object value)
108 list.Insert (index, value);
111 public void Remove (object value)
116 public void RemoveAt (int index)
118 list.RemoveAt (index);
121 #endregion // Methods