FromServiceEndpoint() 공개 정적인 메소드

public static FromServiceEndpoint ( ServiceEndpoint endpoint ) : EndpointDiscoveryMetadata
endpoint System.ServiceModel.Description.ServiceEndpoint
리턴 EndpointDiscoveryMetadata
예제 #1
0
            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);
        }