{
public abstract class DiscoveryEndpointProvider
{
+ internal static DiscoveryEndpointProvider CreateDefault ()
+ {
+ return new UdpDiscoveryEndpointProvider ();
+ }
+
public abstract DiscoveryEndpoint GetDiscoveryEndpoint ();
}
+
+ internal class UdpDiscoveryEndpointProvider : DiscoveryEndpointProvider
+ {
+ public override DiscoveryEndpoint GetDiscoveryEndpoint ()
+ {
+ var binding = new CustomBinding (new TextMessageEncodingBindingElement (), new UdpTransportBindingElement ());
+ // FIXME: Name might not be set here (but needs to be modified somewhere anyways).
+ return new UdpDiscoveryEndpoint () { Binding = binding };
+ }
+ }
}