2010-06-21 Atsushi Enomoto <atsushi@ximian.com>
[mcs.git] / class / System.ServiceModel.Routing / System.ServiceModel.Routing.Configuration / BackupListCollection.cs
blob5f25b8a09eee7d84e4d18b45e05948cf7f3de171
1 using System;
2 using System.Collections.Generic;
3 using System.Collections.ObjectModel;
4 using System.Configuration;
5 using System.ServiceModel;
6 using System.ServiceModel.Channels;
7 using System.ServiceModel.Configuration;
8 using System.ServiceModel.Description;
9 using System.ServiceModel.Dispatcher;
11 namespace System.ServiceModel.Routing.Configuration
13 [ConfigurationCollection (typeof (BackupEndpointCollection), AddItemName = "backupList")]
14 public class BackupListCollection : ConfigurationElementCollection
16 public void Add (BackupEndpointCollection element)
18 BaseAdd (element);
21 public void Clear ()
23 BaseClear ();
26 protected override ConfigurationElement CreateNewElement ()
28 return new BackupEndpointElement ();
31 protected override Object GetElementKey (ConfigurationElement element)
33 return ((BackupEndpointElement) element).EndpointName;
36 public void Remove (BackupEndpointCollection element)
38 BaseRemove (element);
41 public new BackupEndpointCollection this [string name] {
42 get {
43 foreach (BackupEndpointCollection c in this)
44 if (c.Name == name)
45 return c;
46 return null;