2 // Microsoft.Web.Services.Referral.ReferralCollection.cs
4 // Name: Duncan Mak (duncan@ximian.com)
6 // Copyright (C) Ximian, Inc. 2003
10 using System.Collections;
11 using System.Globalization;
12 using System.Web.Services.Protocols;
15 using Microsoft.Web.Services.Xml;
18 namespace Microsoft.Web.Services.Referral {
20 public class ReferralCollection : SoapHeader, ICollection, IEnumerable, IXmlElement
24 public ReferralCollection ()
26 list = new ArrayList ();
29 public void Add (Referral referral)
34 public void AddRange (Referral [] referrals)
36 list.AddRange (referrals);
44 public bool Contains (Referral referral)
46 return list.Contains (referral);
49 public bool Contains (Uri uri)
51 return list.Contains (new Referral (uri));
55 public void CopyTo (Array array, int index)
57 public virtual void CopyTo (Array array, int index)
60 list.CopyTo (array, index);
66 public virtual int Count {
68 get { return list.Count; }
72 public IEnumerator GetEnumerator ()
74 public virtual IEnumerator GetEnumerator ()
77 return list.GetEnumerator ();
82 public XmlElement GetXml (XmlDocument document)
84 public virtual XmlElement GetXml (XmlDocument document)
88 throw new ArgumentNullException (
89 Locale.GetText ("Argument is null."));
91 throw new NotImplementedException ();
94 public bool IsSynchronized {
96 public virtual bool IsSynchronized {
98 get { return list.IsSynchronized; }
103 public void LoadXml (XmlElement element)
105 public virtual void LoadXml (XmlElement element)
109 throw new ArgumentNullException (
110 Locale.GetText ("Argument is null."));
112 throw new NotImplementedException ();
115 public void Remove (Referral referral)
117 list.Remove (referral);
120 public void Remove (Uri uri)
122 list.Remove (new Referral (uri));
126 public object SyncRoot {
128 public virtual object SyncRoot {
130 get { return list.SyncRoot; }