2 // System.ComponentModel.EventDescriptorCollection.cs
4 // Author: Rodrigo Moya (rodrigo@ximian.com)
9 using System.Collections;
11 namespace System.ComponentModel
13 public class EventDescriptorCollection : IList, ICollection, IEnumerable
15 private ArrayList eventList;
17 public static readonly EventDescriptorCollection Empty;
19 public EventDescriptorCollection (EventDescriptor[] events) {
20 for (int i = 0; i < events.Length; i++)
24 public int Add (EventDescriptor value) {
25 return eventList.Add (value);
28 public void Clear () {
32 public bool Contains (EventDescriptor value) {
33 return eventList.Contains (value);
37 public virtual EventDescriptor Find (string name, bool ignoreCase) {
38 throw new NotImplementedException ();
41 public IEnumerator GetEnumerator () {
42 return eventList.GetEnumerator ();
45 public int IndexOf (EventDescriptor value) {
46 return eventList.IndexOf (value);
49 public void Insert (int index, EventDescriptor value) {
50 eventList.Insert (index, value);
53 public void Remove (EventDescriptor value) {
54 eventList.Remove (value);
57 public void RemoveAt (int index) {
58 eventList.RemoveAt (index);
63 public virtual EventDescriptorCollection Sort () {
64 throw new NotImplementedException ();
68 public virtual EventDescriptorCollection Sort (IComparer comparer) {
69 throw new NotImplementedException ();
73 public virtual EventDescriptorCollection Sort (string[] order) {
74 throw new NotImplementedException ();
78 public virtual EventDescriptorCollection Sort (string[] order,
80 throw new NotImplementedException ();
84 public virtual EventDescriptorCollection InternalSort (IComparer comparer) {
85 throw new NotImplementedException ();
89 public virtual EventDescriptorCollection InternalSort (string[] order) {
90 throw new NotImplementedException ();
95 return eventList.Count;
99 public virtual EventDescriptor this[string name] {
102 throw new NotImplementedException ();
106 public virtual EventDescriptor this[int index] {
108 return (EventDescriptor) eventList[index];
114 int IList.Add (object value) {
115 return Add ((EventDescriptor) value);
118 bool IList.Contains (object value) {
119 return Contains ((EventDescriptor) value);
122 int IList.IndexOf (object value) {
123 return IndexOf ((EventDescriptor) value);
126 void IList.Insert (int index, object value) {
127 Insert (index, (EventDescriptor) value);
130 void IList.Remove (object value) {
131 Remove ((EventDescriptor) value);
134 bool IList.IsFixedSize {
135 get { return false; }
139 bool IList.IsReadOnly {
140 get { return false; }
143 object IList.this [int index] {
144 get { return this [index]; }
146 set { throw new NotImplementedException (); }
149 // ICollection methods
152 void ICollection.CopyTo (Array array, int index) {
153 throw new NotImplementedException ();
156 bool ICollection.IsSynchronized {
157 get { return false; }
160 object ICollection.SyncRoot {