Example #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)));
        }
 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);
     }
 }