Ejemplo n.º 1
0
        public ServiceEndpoint GetServiceBinding <T>(string serviceName, string url)
        {
            var cd       = GetContractDescription <T>();
            var endpoint = GetEndpointConfig(serviceName);

            return(new ServiceEndpoint(cd, ServiceHostHelper.CreateBinding(endpoint.First()), GetEndpointAddress <T>(endpoint.First().Address)));
        }
Ejemplo n.º 2
0
 private static Binding CreateBinding(Endpoint serviceInterfaceEndpoint)
 {
     try
     {
         return(ServiceHostHelper.CreateBinding(serviceInterfaceEndpoint));
     }
     catch (Exception ex)
     {
         throw new StardustCoreException(string.Format("Failed to create binding for protocol {0}", serviceInterfaceEndpoint.EndpointName), ex);
     }
 }