1 //------------------------------------------------------------------------------
2 // Copyright (c) Microsoft Corporation.  All rights reserved.
3 //------------------------------------------------------------------------------
4 
5 namespace System.ServiceModel.Configuration
6 {
7     using System;
8     using System.ServiceModel.Channels;
9     using System.Collections;
10     using System.Configuration;
11     using System.Globalization;
12 
13     [ConfigurationCollection(typeof(CustomBindingElement), AddItemName = ConfigurationStrings.Binding)]
14     public sealed class CustomBindingElementCollection : ServiceModelEnhancedConfigurationElementCollection<CustomBindingElement>
15     {
CustomBindingElementCollection()16         public CustomBindingElementCollection()
17             : base(ConfigurationStrings.Binding)
18         { }
19 
GetElementKey(ConfigurationElement element)20         protected override Object GetElementKey(ConfigurationElement element)
21         {
22             if (element == null)
23             {
24                 throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("element");
25             }
26 
27             CustomBindingElement configElementKey = (CustomBindingElement)element;
28             return configElementKey.Name;
29         }
30     }
31 
32 }
33 
34 
35