| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- //
- // 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];
- }
- }
- }
- }
|