2 // System.Web.SiteMapProviderCollection
5 // Ben Maurer (bmaurer@users.sourceforge.net)
11 using System.Collections;
12 using System.Collections.Specialized;
14 using System.Configuration.Provider;
17 namespace System.Web {
18 public class SiteMapProviderCollection : ProviderCollection
20 public SiteMapProviderCollection () {}
22 public override void Add (IProvider provider)
25 throw new ArgumentNullException ("provider");
26 if ((provider as ISiteMapProvider) == null)
27 throw new InvalidOperationException(String.Format ("{0} must implement {1} to act as a site map provider", provider.GetType (), typeof (ISiteMapProvider)));
32 public virtual void AddArray (IProvider[] providerArray)
34 foreach (IProvider p in providerArray) {
35 if (this [p.Name] != null)
36 throw new ArgumentException ("Duplicate site map providers");
41 public ISiteMapProvider this [string name] { get { return (ISiteMapProvider) base [name]; } }