AnnouncementEndpointElement.cs 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. using System;
  2. using System.ComponentModel;
  3. using System.Configuration;
  4. using System.ServiceModel.Configuration;
  5. using System.ServiceModel.Description;
  6. namespace System.ServiceModel.Discovery.Configuration
  7. {
  8. public class AnnouncementEndpointElement : StandardEndpointElement
  9. {
  10. static ConfigurationPropertyCollection properties;
  11. static ConfigurationProperty discovery_version, max_announcement_delay;
  12. static AnnouncementEndpointElement ()
  13. {
  14. discovery_version = new ConfigurationProperty ("discoveryVersion", typeof (DiscoveryVersion), "WSDiscovery11", new DiscoveryVersionConverter (), null, ConfigurationPropertyOptions.None);
  15. max_announcement_delay = new ConfigurationProperty ("maxAnnouncementDelay", typeof (TimeSpan), "00:00:00", new TimeSpanConverter (), null, ConfigurationPropertyOptions.None);
  16. properties = new ConfigurationPropertyCollection ();
  17. properties.Add (discovery_version);
  18. properties.Add (max_announcement_delay);
  19. }
  20. public AnnouncementEndpointElement ()
  21. {
  22. }
  23. [TypeConverter (typeof (DiscoveryVersionConverter))]
  24. [ConfigurationProperty ("discoveryVersion", DefaultValue = "WSDiscovery11")]
  25. public DiscoveryVersion DiscoveryVersion {
  26. get { return (DiscoveryVersion) base [discovery_version]; }
  27. set { base [discovery_version] = value; }
  28. }
  29. protected override Type EndpointType {
  30. get { return typeof (AnnouncementEndpoint); }
  31. }
  32. [TypeConverter (typeof (TimeSpanConverter))]
  33. [ConfigurationProperty ("maxAnnouncementDelay", DefaultValue = "00:00:00")]
  34. public TimeSpan MaxAnnouncementDelay {
  35. get { return (TimeSpan) base [max_announcement_delay]; }
  36. set { base [max_announcement_delay] = value; }
  37. }
  38. protected override ServiceEndpoint CreateServiceEndpoint (ContractDescription contractDescription)
  39. {
  40. throw new NotImplementedException ();
  41. }
  42. protected override void InitializeFrom (ServiceEndpoint endpoint)
  43. {
  44. throw new NotImplementedException ();
  45. }
  46. protected override void OnApplyConfiguration (ServiceEndpoint endpoint, ChannelEndpointElement serviceEndpointElement)
  47. {
  48. throw new NotImplementedException ();
  49. }
  50. protected override void OnApplyConfiguration (ServiceEndpoint endpoint, ServiceEndpointElement serviceEndpointElement)
  51. {
  52. throw new NotImplementedException ();
  53. }
  54. protected override void OnInitializeAndValidate (ChannelEndpointElement channelEndpointElement)
  55. {
  56. throw new NotImplementedException ();
  57. }
  58. protected override void OnInitializeAndValidate (ServiceEndpointElement serviceEndpointElement)
  59. {
  60. throw new NotImplementedException ();
  61. }
  62. }
  63. }