Ejemplo n.º 1
0
        List <ServiceEndpoint> GetApplicationEndpoints(ServiceDescription serviceDescription)
        {
            List <ServiceEndpoint> appEndpoints = new List <ServiceEndpoint>(serviceDescription.Endpoints.Count);

            foreach (ServiceEndpoint endpoint in serviceDescription.Endpoints)
            {
                if (!EndpointDiscoveryMetadata.IsDiscoverySystemEndpoint(endpoint))
                {
                    appEndpoints.Add(endpoint);
                }
            }

            return(appEndpoints);
        }
Ejemplo n.º 2
0
 static void SetDiscoveryImplementation(ServiceHostBase host, DiscoveryService discoveryService)
 {
     foreach (ChannelDispatcherBase channelDispatcherBase in host.ChannelDispatchers)
     {
         ChannelDispatcher channelDispatcher = channelDispatcherBase as ChannelDispatcher;
         if (channelDispatcher != null)
         {
             foreach (EndpointDispatcher endpointDispatcher in channelDispatcher.Endpoints)
             {
                 if ((endpointDispatcher != null) && EndpointDiscoveryMetadata.IsDiscoverySystemEndpoint(endpointDispatcher))
                 {
                     SetDiscoveryImplementation(endpointDispatcher, discoveryService);
                 }
             }
         }
     }
 }