Files
mono/mcs/class/System/System.ComponentModel/AttributeCollection.cs
T
Gonzalo Paniagua Javier 64b78bcb89 2002-05-05 Gonzalo Paniagua Javier <[email protected]>
* System.build: excluded EventDescriptor.cs,
	EventDescriptorCollection.cs and ICustomTypeDescriptor.cs.

	* System.ComponentModel/AttributeCollection.cs: added a cast to make it
	compile

svn path=/trunk/mcs/; revision=4283
2002-05-04 21:41:25 +00:00

93 lines
1.7 KiB
C#

//
// System.ComponentModel.AttributeCollection.cs
//
// Author: Rodrigo Moya ([email protected])
//
// (C) Ximian, Inc.
//
using System;
using System.Collections;
namespace System.ComponentModel
{
public class AttributeCollection : ICollection, IEnumerable
{
private ArrayList attrList;
public static readonly AttributeCollection Empty;
public AttributeCollection (Attribute[] attributes) {
for (int i = 0; i < attributes.Length; i++)
attrList.Add (attributes[i]);
}
public bool Contains (Attribute attr) {
for (int i = 0; i < attrList.Count; i++) {
if (attrList[i] == attr)
return true;
}
return false;
}
[MonoTODO]
public bool Contains (Attribute[] attributes) {
throw new NotImplementedException ();
}
public void CopyTo (Array array, int index) {
attrList.CopyTo (array, index);
}
public IEnumerator GetEnumerator () {
return attrList.GetEnumerator ();
}
[MonoTODO]
public bool Matches (Attribute attr) {
throw new NotImplementedException ();
}
[MonoTODO]
public bool Matches (Attribute[] attributes) {
throw new NotImplementedException ();
}
[MonoTODO]
protected Attribute GetDefaultAttribute (Type attributeType) {
throw new NotImplementedException ();
}
public bool IsSynchronized {
get {
return attrList.IsSynchronized;
}
}
public object SyncRoot {
get {
return attrList.SyncRoot;
}
}
public int Count {
get {
return attrList.Count;
}
}
public virtual Attribute this[Type type] {
[MonoTODO]
get {
throw new NotImplementedException ();
}
}
public virtual Attribute this[int index] {
get {
return (Attribute) attrList[index];
}
}
}
}