Merge branch 'master' of http://github.com/mono/mono
[mono.git] / mcs / class / System.ServiceModel.Discovery / System.ServiceModel.Discovery.Configuration / UdpDiscoveryEndpointElement.cs
1 using System;
2 using System.ComponentModel;
3 using System.Configuration;
4 using System.ServiceModel.Configuration;
5 using System.ServiceModel.Description;
6
7 namespace System.ServiceModel.Discovery.Configuration
8 {
9         public class UdpDiscoveryEndpointElement : DiscoveryEndpointElement
10         {
11                 static ConfigurationPropertyCollection properties;
12                 static ConfigurationProperty discovery_mode, max_response_delay, multicast_address, transport_settings;
13                 
14                 static UdpDiscoveryEndpointElement ()
15                 {
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);
25                 }
26
27                 public UdpDiscoveryEndpointElement ()
28                 {
29                 }
30
31                 [ConfigurationProperty ("discoveryMode", DefaultValue = ServiceDiscoveryMode.Adhoc)]
32                 public ServiceDiscoveryMode DiscoveryMode {
33                         get { return (ServiceDiscoveryMode) Propperties [discovery_mode]; }
34                         set { Properties [discovery_mode] = value; }
35                 }
36
37                 protected override Type EndpointType {
38                         get { return typeof (UdpDiscoveryEndpoint); }
39                 }
40
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; }
45                 }
46
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; }
51                 }
52
53                 [ConfigurationProperty ("transportSettings")]
54                 public UdpTransportSettingsElement TransportSettings {
55                         get { return (UdpTransportSettingsElement) Propperties [transport_settings]; }
56                 }
57                         
58                 protected override ServiceEndpoint CreateServiceEndpoint (ContractDescription contractDescription)
59                 {
60                         throw new NotImplementedException ();
61                 }
62                 protected override void InitializeFrom (ServiceEndpoint endpoint)
63                 {
64                         throw new NotImplementedException ();
65                 }
66                 protected override void OnApplyConfiguration (ServiceEndpoint endpoint, ChannelEndpointElement serviceEndpointElement)
67                 {
68                         throw new NotImplementedException ();
69                 }
70                 protected override void OnApplyConfiguration (ServiceEndpoint endpoint, ServiceEndpointElement serviceEndpointElement)
71                 {
72                         throw new NotImplementedException ();
73                 }
74                 protected override void OnInitializeAndValidate (ChannelEndpointElement channelEndpointElement)
75                 {
76                         throw new NotImplementedException ();
77                 }
78                 protected override void OnInitializeAndValidate (ServiceEndpointElement channelEndpointElement)
79                 {
80                         throw new NotImplementedException ();
81                 }
82         }
83 }
84