(DISTFILES): Comment out a few missing files.
[mono-project.git] / mcs / class / Microsoft.Web.Services / Microsoft.Web.Services.Addressing / AddressList.cs
blob00f206cf6472f2d67eeb9d76edad1245528ee2a4
1 //
2 // Microsoft.Web.Services.Addressing.AddressList.cs
3 //
4 // Author: Todd Berman <tberman@gentoo.org>
5 //
6 // (C) 2003 Todd Berman
8 using System;
9 using System.Collections;
11 namespace Microsoft.Web.Services.Addressing
14 public class AddressList : ICollection, IEnumerable
17 private ArrayList _list;
19 public AddressList ()
21 _list = new ArrayList ();
24 public int Add (Address address)
26 if(address == null) {
27 throw new ArgumentNullException ("address");
29 return _list.Add (address);
32 public bool Contains (Address address)
34 if(address == null) {
35 throw new ArgumentNullException ("address");
37 return _list.Contains (address);
40 public void CopyTo (Array array, int index)
42 if(array == null) {
43 throw new ArgumentNullException ("array");
45 if(index < 0 || index > _list.Count) {
46 throw new ArgumentOutOfRangeException ("index");
48 _list.CopyTo (array, index);
51 public IEnumerator GetEnumerator ()
53 return _list.GetEnumerator ();
56 public int IndexOf (Address address)
58 if(address == null) {
59 throw new ArgumentNullException ("address");
61 return _list.IndexOf (address);
64 public void Insert (int index, Address address)
66 if(index < 0 || index > _list.Count) {
67 throw new ArgumentOutOfRangeException ("index");
69 if(address == null) {
70 throw new ArgumentNullException ("address");
72 _list.Insert (index, address);
75 public void Remove (Address address)
77 _list.Remove (address);
80 public void RemoveAt (int index)
82 if (index < 0 || index > _list.Count) {
83 throw new ArgumentOutOfRangeException ("index");
85 _list.RemoveAt (index);
88 public int Count {
89 get { return _list.Count; }
92 public bool IsFixedSize {
93 get { return _list.IsFixedSize; }
96 public bool IsReadOnly {
97 get { return _list.IsReadOnly; }
100 public bool IsSynchronized {
101 get { return _list.IsSynchronized; }
104 public Address this[int index] {
105 get {
106 if(index < 0 || index > _list.Count) {
107 throw new ArgumentOutOfRangeException ("index");
109 return (Address) _list[index];
111 set {
112 if(index < 0 || index > _list.Count) {
113 throw new ArgumentOutOfRangeException ("index");
115 _list[index] = value;
119 public object SyncRoot {
120 get { return _list.SyncRoot; }