MexBindingBindingCollectionElement.cs 1.4 KB

123456789101112131415161718192021222324252627282930
  1. //------------------------------------------------------------------------------
  2. // Copyright (c) Microsoft Corporation. All rights reserved.
  3. //------------------------------------------------------------------------------
  4. namespace System.ServiceModel.Configuration
  5. {
  6. using System.Configuration;
  7. using System.ServiceModel;
  8. using System.Globalization;
  9. using System.ServiceModel.Security;
  10. using System.Text;
  11. using System.ComponentModel;
  12. using System.ServiceModel.Channels;
  13. using System.ServiceModel.Description;
  14. public abstract class MexBindingBindingCollectionElement<TStandardBinding, TBindingConfiguration> : StandardBindingCollectionElement<TStandardBinding, TBindingConfiguration>
  15. where TStandardBinding : Binding
  16. where TBindingConfiguration : StandardBindingElement, new()
  17. {
  18. protected internal override bool TryAdd(string name, Binding binding, Configuration config)
  19. {
  20. // We will never match a binding to the mex*Bindings. The logic to do so would be:
  21. // 1) The binding was created using the mex*Binding config, or MetadataExchangeBindings.CreateMex*Binding()
  22. // 2) The binding has not been modified.
  23. // (2) is complicated and we don't have the time at this point.
  24. return false;
  25. }
  26. }
  27. }