BindingParameterCollection.cs 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. //------------------------------------------------------------
  2. // Copyright (c) Microsoft Corporation. All rights reserved.
  3. //------------------------------------------------------------
  4. namespace System.ServiceModel.Channels
  5. {
  6. using System.Collections.Generic;
  7. using System.Runtime.Serialization;
  8. // Some binding elements can sometimes consume extra information when building factories.
  9. // BindingParameterCollection is a collection of objects with this extra information.
  10. // See comments in SecurityBindingElement and TransactionFlowBindingElement for examples
  11. // of binding elements that go looking for certain data in this collection.
  12. public class BindingParameterCollection : KeyedByTypeCollection<object>
  13. {
  14. public BindingParameterCollection() { }
  15. internal BindingParameterCollection(params object[] parameters)
  16. {
  17. if (parameters == null)
  18. throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("parameters");
  19. for (int i = 0; i < parameters.Length; i++)
  20. {
  21. base.Add(parameters[i]);
  22. }
  23. }
  24. internal BindingParameterCollection(BindingParameterCollection parameters)
  25. {
  26. if (parameters == null)
  27. throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("parameters");
  28. for (int i = 0; i < parameters.Count; i++)
  29. {
  30. base.Add(parameters[i]);
  31. }
  32. }
  33. }
  34. }