EndpointDiscoveryElement.cs 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. using System;
  2. using System.ComponentModel;
  3. using System.Configuration;
  4. using System.ServiceModel.Configuration;
  5. namespace System.ServiceModel.Discovery.Configuration
  6. {
  7. public sealed class EndpointDiscoveryElement : BehaviorExtensionElement
  8. {
  9. static ConfigurationPropertyCollection properties;
  10. static ConfigurationProperty types, enabled, extensions, scopes;
  11. static EndpointDiscoveryElement ()
  12. {
  13. types = new ConfigurationProperty ("types", typeof (ContractTypeNameElementCollection), null, null, null, ConfigurationPropertyOptions.None);
  14. enabled = new ConfigurationProperty ("enabled", typeof (bool), null, null, null, ConfigurationPropertyOptions.None);
  15. extensions = new ConfigurationProperty ("extensions", typeof (XmlElementElementCollection), null, null, null, ConfigurationPropertyOptions.None);
  16. scopes = new ConfigurationProperty ("scopes", typeof (ScopeElementCollection), null, null, null, ConfigurationPropertyOptions.None);
  17. properties = new ConfigurationPropertyCollection ();
  18. properties.Add (types);
  19. properties.Add (enabled);
  20. properties.Add (extensions);
  21. properties.Add (scopes);
  22. }
  23. public EndpointDiscoveryElement ()
  24. {
  25. }
  26. public override Type BehaviorType {
  27. get { return typeof (EndpointDiscoveryBehavior); }
  28. }
  29. [ConfigurationProperty ("types")]
  30. public ContractTypeNameElementCollection ContractTypeNames {
  31. get { return (ContractTypeNameElementCollection) base [types]; }
  32. }
  33. [ConfigurationPropertyAttribute("enabled", DefaultValue = true)]
  34. public bool Enabled {
  35. get { return (bool) base [enabled]; }
  36. set { base [enabled] = value; }
  37. }
  38. [ConfigurationPropertyAttribute("extensions")]
  39. public XmlElementElementCollection Extensions {
  40. get { return (XmlElementElementCollection) base [extensions]; }
  41. }
  42. [ConfigurationPropertyAttribute("scopes")]
  43. public ScopeElementCollection Scopes {
  44. get { return (ScopeElementCollection) base [scopes]; }
  45. }
  46. protected override object CreateBehavior ()
  47. {
  48. throw new NotImplementedException ();
  49. }
  50. }
  51. }