public static FromServiceEndpoint ( |
||
endpoint | ||
return |
void IEndpointBehavior.ApplyDispatchBehavior(ServiceEndpoint endpoint, EndpointDispatcher endpointDispatcher) { EndpointDiscoveryMetadata endpointDiscoveryMetadata = EndpointDiscoveryMetadata.FromServiceEndpoint(endpoint, endpointDispatcher); if (endpointDiscoveryMetadata != null) { this.publishedEndpointCollection.Add(endpointDiscoveryMetadata); } }
void IEndpointBehavior.ApplyDispatchBehavior(ServiceEndpoint endpoint, EndpointDispatcher endpointDispatcher) { // It is applied to the ServiceEndpoints in the ServiceHost which has ServiceDiscoveryBehavior as one of its service behaviors. // That is, this target endpoint is an endpoint in the target service itself, not for "announcement service". if (endpoint == null) { throw new ArgumentNullException("endpoint"); } if (endpointDispatcher == null) { throw new ArgumentNullException("endpointDispatcher"); } var edb = endpoint.Behaviors.Find <EndpointDiscoveryBehavior> (); if (edb != null && !edb.Enabled) { return; } var edm = EndpointDiscoveryMetadata.FromServiceEndpoint(endpoint); extension.PublishedInternalEndpoints.Add(edm); }