示例#1
0
        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);
        }
示例#2
0
        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());
        }
示例#4
0
        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());
        }