2 using System.ComponentModel;
3 using System.Configuration;
4 using System.ServiceModel.Configuration;
5 using System.ServiceModel.Description;
7 namespace System.ServiceModel.Discovery.Configuration
9 public class UdpDiscoveryEndpointElement : DiscoveryEndpointElement
11 static ConfigurationPropertyCollection properties;
12 static ConfigurationProperty discovery_mode, max_response_delay, multicast_address, transport_settings;
14 static UdpDiscoveryEndpointElement ()
16 discovery_mode = new ConfigurationProperty ("discoveryMode", typeof (ServiceDiscoveryMode), ServiceDiscoveryMode.Adhoc, null, null, ConfigurationPropertyOptions.None);
17 max_response_delay = new ConfigurationProperty ("maxResponseDelay", typeof (TimeSpan), "00:00:00.500", new TimeSpanConverter (), null, ConfigurationPropertyOptions.None);
18 multicast_address = new ConfigurationProperty ("multicastAddress", typeof (Uri), "soap.udp://239.255.255.250:3702", new UriTypeConverter (), null, ConfigurationPropertyOptions.None);
19 transport_settings = new ConfigurationProperty ("transportSettings", typeof (UdpTransportSettingsElement), null, null, null, ConfigurationPropertyOptions.None);
20 properties = new ConfigurationPropertyCollection ();
21 properties.Add (discovery_mode);
22 properties.Add (max_response_delay);
23 properties.Add (multicast_address);
24 properties.Add (transport_settings);
27 public UdpDiscoveryEndpointElement ()
31 [ConfigurationProperty ("discoveryMode", DefaultValue = ServiceDiscoveryMode.Adhoc)]
32 public ServiceDiscoveryMode DiscoveryMode {
33 get { return (ServiceDiscoveryMode) Propperties [discovery_mode]; }
34 set { Properties [discovery_mode] = value; }
37 protected override Type EndpointType {
38 get { return typeof (UdpDiscoveryEndpoint); }
41 [ConfigurationProperty ("maxResponseDelay", DefaultValue = "00:00:00.500")]
42 public TimeSpan MaxResponseDelay {
43 get { return (TimeSpan) Propperties [max_response_delay]; }
44 set { Properties [max_response_delay] = value; }
47 [ConfigurationProperty ("multicastAddress", DefaultValue = "soap.udp://239.255.255.250:3702")]
48 public Uri MulticastAddress {
49 get { return (Uri) Propperties [multicast_address]; }
50 set { Properties [multicast_address] = value; }
53 [ConfigurationProperty ("transportSettings")]
54 public UdpTransportSettingsElement TransportSettings {
55 get { return (UdpTransportSettingsElement) Propperties [transport_settings]; }
58 protected override ServiceEndpoint CreateServiceEndpoint (ContractDescription contractDescription)
60 throw new NotImplementedException ();
62 protected override void InitializeFrom (ServiceEndpoint endpoint)
64 throw new NotImplementedException ();
66 protected override void OnApplyConfiguration (ServiceEndpoint endpoint, ChannelEndpointElement serviceEndpointElement)
68 throw new NotImplementedException ();
70 protected override void OnApplyConfiguration (ServiceEndpoint endpoint, ServiceEndpointElement serviceEndpointElement)
72 throw new NotImplementedException ();
74 protected override void OnInitializeAndValidate (ChannelEndpointElement channelEndpointElement)
76 throw new NotImplementedException ();
78 protected override void OnInitializeAndValidate (ServiceEndpointElement channelEndpointElement)
80 throw new NotImplementedException ();