protected override void OnApplyConfiguration(ServiceEndpoint endpoint, ChannelEndpointElement serviceEndpointElement) { if (endpoint == null) { throw new ArgumentNullException("endpoint"); } AnnouncementEndpoint ae = (AnnouncementEndpoint)endpoint; if (!ae.DiscoveryVersion.Equals(DiscoveryVersion)) { throw new ArgumentException("Argument AnnouncementEndpoint is initialized with different DiscoveryVersion"); } ae.MaxAnnouncementDelay = MaxAnnouncementDelay; ae.Address = serviceEndpointElement.CreateEndpointAddress(); // it depends on InternalVisibleTo(System.ServiceModel) ae.Binding = ConfigUtil.CreateBinding(serviceEndpointElement.Binding, serviceEndpointElement.BindingConfiguration); // it depends on InternalVisibleTo(System.ServiceModel) }
protected override void OnApplyConfiguration(ServiceEndpoint endpoint, ChannelEndpointElement serviceEndpointElement) { if (endpoint == null) { throw new ArgumentNullException("endpoint"); } var de = (AnnouncementEndpoint)endpoint; if (!de.DiscoveryVersion.Equals(DiscoveryVersion)) { throw new ArgumentException("Argument AnnouncementEndpoint is initialized with different DiscoveryVersion"); } de.MaxAnnouncementDelay = MaxAnnouncementDelay; de.Address = serviceEndpointElement.CreateEndpointAddress(); // it depends on InternalVisibleTo(System.ServiceModel) var be = (UdpTransportBindingElement)de.Binding.CreateBindingElements().First(b => b is UdpTransportBindingElement); TransportSettings.ApplyConfiguration(be.TransportSettings); }