2
0

AnnouncementEndpointElement.cs 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. //
  2. // Author: Atsushi Enomoto <[email protected]>
  3. //
  4. // Copyright (C) 2010 Novell, Inc (http://www.novell.com)
  5. //
  6. // Permission is hereby granted, free of charge, to any person obtaining
  7. // a copy of this software and associated documentation files (the
  8. // "Software"), to deal in the Software without restriction, including
  9. // without limitation the rights to use, copy, modify, merge, publish,
  10. // distribute, sublicense, and/or sell copies of the Software, and to
  11. // permit persons to whom the Software is furnished to do so, subject to
  12. // the following conditions:
  13. //
  14. // The above copyright notice and this permission notice shall be
  15. // included in all copies or substantial portions of the Software.
  16. //
  17. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  18. // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  19. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  20. // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
  21. // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
  22. // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
  23. // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  24. //
  25. #if NET_4_0
  26. using System;
  27. using System.ComponentModel;
  28. using System.Configuration;
  29. using System.ServiceModel.Configuration;
  30. using System.ServiceModel.Description;
  31. namespace System.ServiceModel.Discovery.Configuration
  32. {
  33. public class AnnouncementEndpointElement : StandardEndpointElement
  34. {
  35. static ConfigurationPropertyCollection properties;
  36. static ConfigurationProperty discovery_version, max_announcement_delay;
  37. static AnnouncementEndpointElement ()
  38. {
  39. discovery_version = new ConfigurationProperty ("discoveryVersion", typeof (DiscoveryVersion), "WSDiscovery11", new DiscoveryVersionConverter (), null, ConfigurationPropertyOptions.None);
  40. max_announcement_delay = new ConfigurationProperty ("maxAnnouncementDelay", typeof (TimeSpan), "00:00:00", new TimeSpanConverter (), null, ConfigurationPropertyOptions.None);
  41. properties = new ConfigurationPropertyCollection ();
  42. properties.Add (discovery_version);
  43. properties.Add (max_announcement_delay);
  44. }
  45. public AnnouncementEndpointElement ()
  46. {
  47. }
  48. [TypeConverter (typeof (DiscoveryVersionConverter))]
  49. [ConfigurationProperty ("discoveryVersion", DefaultValue = "WSDiscovery11")]
  50. public DiscoveryVersion DiscoveryVersion {
  51. get { return (DiscoveryVersion) base [discovery_version]; }
  52. set { base [discovery_version] = value; }
  53. }
  54. protected override Type EndpointType {
  55. get { return typeof (AnnouncementEndpoint); }
  56. }
  57. [TypeConverter (typeof (TimeSpanConverter))]
  58. [ConfigurationProperty ("maxAnnouncementDelay", DefaultValue = "00:00:00")]
  59. public TimeSpan MaxAnnouncementDelay {
  60. get { return (TimeSpan) base [max_announcement_delay]; }
  61. set { base [max_announcement_delay] = value; }
  62. }
  63. protected override ServiceEndpoint CreateServiceEndpoint (ContractDescription contractDescription)
  64. {
  65. throw new NotImplementedException ();
  66. }
  67. protected override void InitializeFrom (ServiceEndpoint endpoint)
  68. {
  69. throw new NotImplementedException ();
  70. }
  71. protected override void OnApplyConfiguration (ServiceEndpoint endpoint, ChannelEndpointElement serviceEndpointElement)
  72. {
  73. throw new NotImplementedException ();
  74. }
  75. protected override void OnApplyConfiguration (ServiceEndpoint endpoint, ServiceEndpointElement serviceEndpointElement)
  76. {
  77. throw new NotImplementedException ();
  78. }
  79. protected override void OnInitializeAndValidate (ChannelEndpointElement channelEndpointElement)
  80. {
  81. throw new NotImplementedException ();
  82. }
  83. protected override void OnInitializeAndValidate (ServiceEndpointElement serviceEndpointElement)
  84. {
  85. throw new NotImplementedException ();
  86. }
  87. }
  88. }
  89. #endif