**** Merged from MCS ****
[mono-project.git] / mcs / class / Microsoft.Web.Services / Microsoft.Web.Services.Routing / ViaCollection.cs
blob9f83f6fd64fda1921502c6bf4c41b811c53ec6fc
1 //
2 // Microsoft.Web.Services.Routing.ViaCollection.cs
3 //
4 // Author: Daniel Kornhauser <dkor@alum.mit.edu>
5 //
6 // Copyright (C) Ximian, Inc. 2003
7 //
9 using System;
10 using System.Collections;
12 namespace Microsoft.Web.Services.Routing {
14 public class ViaCollection : ICollection, IEnumerable, ICloneable
16 ArrayList list;
18 public ViaCollection ()
20 list = new ArrayList ();
23 ViaCollection (ArrayList list)
25 this.list = list;
29 public int Count {
30 get { return list.Count; }
34 public bool IsSynchronized {
35 get { return list.IsSynchronized; }
39 public Via this [int filter] {
40 get {
41 return (Via) list [filter];
43 set {
44 list[filter] = value;
49 public virtual object SyncRoot {
50 get {
51 return list.SyncRoot;
55 public int Add (Via via)
57 return list.Add (via);
60 public virtual object Clone ()
62 return new ViaCollection (list);
65 public virtual void CopyTo (Array array, int index)
67 list.CopyTo(array, index);
70 public virtual IEnumerator GetEnumerator ()
72 return list.GetEnumerator();
75 public void Insert (int index, Via via)
77 list.Insert(index, via);
80 public void InsertRange (int index, ViaCollection collection)
82 list.InsertRange(index, collection);
85 public void RemoveAt (int index)
87 list.RemoveAt(index);