disable broken tests on net_4_0
[mcs.git] / class / Managed.Windows.Forms / System.Windows.Forms.Layout / ArrangedElementCollection.cs
blob8adf30e6ec86359295ec5c0c309fa011aee06c7a
1 //
2 // ArrangedElementCollection.cs
3 //
4 // Permission is hereby granted, free of charge, to any person obtaining
5 // a copy of this software and associated documentation files (the
6 // "Software"), to deal in the Software without restriction, including
7 // without limitation the rights to use, copy, modify, merge, publish,
8 // distribute, sublicense, and/or sell copies of the Software, and to
9 // permit persons to whom the Software is furnished to do so, subject to
10 // the following conditions:
11 //
12 // The above copyright notice and this permission notice shall be
13 // included in all copies or substantial portions of the Software.
14 //
15 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
19 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
20 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 // Copyright (c) 2006 Jonathan Pobst
25 // Authors:
26 // Jonathan Pobst (monkey@jpobst.com)
28 #if NET_2_0
30 using System.Collections;
32 namespace System.Windows.Forms.Layout
34 public class ArrangedElementCollection : IList, ICollection, IEnumerable
36 internal ArrayList list;
38 internal ArrangedElementCollection ()
40 this.list = new ArrayList ();
43 #region Public Properties
44 public virtual int Count { get { return list.Count; } }
45 public virtual bool IsReadOnly { get { return list.IsReadOnly; } }
46 #endregion
48 #region Public Methods
49 public void CopyTo (Array array, int index)
51 list.CopyTo (array, index);
54 public override bool Equals (object obj)
56 if (obj is ArrangedElementCollection && this == obj)
57 return (true);
58 else
59 return (false);
62 public virtual IEnumerator GetEnumerator ()
64 return list.GetEnumerator ();
67 public override int GetHashCode ()
69 return base.GetHashCode ();
71 #endregion
73 #region IList Members
74 int IList.Add (object value)
76 return Add (value);
79 internal int Add (object value)
81 return list.Add (value);
84 void IList.Clear ()
86 Clear ();
89 internal void Clear ()
91 list.Clear ();
94 bool IList.Contains (object value)
96 return Contains (value);
99 internal bool Contains (object value)
101 return list.Contains (value);
104 int IList.IndexOf (object value)
106 return IndexOf (value);
109 internal int IndexOf (object value)
111 return list.IndexOf (value);
114 void IList.Insert (int index, object value)
116 throw new NotSupportedException ();
119 internal void Insert (int index, object value)
121 list.Insert (index, value);
124 bool IList.IsFixedSize {
125 get { return this.IsFixedSize; }
128 internal bool IsFixedSize {
129 get { return list.IsFixedSize; }
132 void IList.Remove (object value)
134 Remove (value);
137 internal void Remove (object value)
139 list.Remove (value);
142 void IList.RemoveAt (int index)
144 list.RemoveAt (index);
147 internal void InternalRemoveAt (int index)
149 list.RemoveAt (index);
152 object IList.this[int index] {
153 get { return this[index]; }
154 set { this[index] = value; }
157 internal object this[int index] {
158 get { return list[index]; }
159 set { list[index] = value; }
161 #endregion
163 #region ICollection Members
164 bool ICollection.IsSynchronized {
165 get { return list.IsSynchronized; }
168 object ICollection.SyncRoot {
169 get { return list.IsSynchronized; }
171 #endregion
174 #endif