Esempio n. 1
0
        public DynamicProxy CreateProxy(ServiceEndpoint endpoint)
        {
            Type contractType = GetContractType(endpoint.Contract.Name,
                                                endpoint.Contract.Namespace);

            Type proxyType = GetProxyType(contractType);

            DynamicProxy obj = new DynamicProxy(proxyType, endpoint.Binding, endpoint.Address);

            ((ServiceEndpoint)obj.Proxy.GetType().GetProperty("Endpoint").GetValue(obj.Proxy, null)).Address = new EndpointAddress(this.wsdlUri);
            return(obj);
        }
Esempio n. 2
0
        public DynamicProxy CreateProxy(ServiceEndpoint endpoint)
        {
            Type contractType = GetContractType(endpoint.Contract.Name,
                endpoint.Contract.Namespace);

            Type proxyType = GetProxyType(contractType);

            DynamicProxy obj = new DynamicProxy(proxyType, endpoint.Binding, endpoint.Address);
            ((ServiceEndpoint)obj.Proxy.GetType().GetProperty("Endpoint").GetValue(obj.Proxy, null)).Address = new EndpointAddress(this.wsdlUri);
            return obj;
        }