private static IProxyChannel <TContractType> CreateProxyChannel <TContractType>(CustomizedMessageHeaderData pHeaderData, string hostName) where TContractType : class { ServiceEndpoint endpoint = EndpointProvider.GetEndpoint <TContractType>(hostName); IProxyChannel <TContractType> channel = new ProxyChannel <TContractType>(endpoint, pHeaderData); return(channel); }
private static IProxyChannel <TContractType> CreateProxyDuplexChannel <TContractType>(InstanceContext context, CustomizedMessageHeaderData pHeaderData, string hostName) where TContractType : class { ServiceEndpoint endpoint = EndpointProvider.GetEndpoint <TContractType>(hostName); IProxyChannel <TContractType> factory = new ProxyDuplexChannel <TContractType>(context, endpoint, pHeaderData); return(factory); }
public void ValidateEndpointOnAsyncPostfix(string server, string expectedResult) { EndpointProvider endpointProvider = new EndpointProvider(new BoltOptions { Prefix = "test" }); Assert.Equal(expectedResult, endpointProvider.GetEndpoint(server != null ? new Uri(server) : null, Contract, Contract.GetAction(MethodAsyncInfo)).ToString()); }
public void ValidateEndpointOnAsyncPostfix(string server, string expectedResult) { EndpointProvider endpointProvider = new EndpointProvider(new BoltOptions { Prefix = "test" }); Assert.Equal<string>(expectedResult, endpointProvider.GetEndpoint(new Uri(server), GetType(), MethodAsyncInfo).ToString()); }