Пример #1
0
        protected override SoapAddressBinding CreateSoapAddressBinding(string serviceUrl)
        {
            Soap12AddressBinding soapAddress = new Soap12AddressBinding();

            soapAddress.Location = serviceUrl;
            if (this.UriFixups != null)
            {
                this.UriFixups.Add(delegate(Uri current)
                {
                    soapAddress.Location = DiscoveryServerType.CombineUris(current, soapAddress.Location);
                });
            }
            return(soapAddress);
        }
        protected override void BeginClass()
        {
            if (IsEmptyBinding)
            {
                return;
            }
            HttpBinding httpBinding = new HttpBinding();

            httpBinding.Verb = "POST";
            Binding.Extensions.Add(httpBinding);
            HttpAddressBinding httpAddressBinding = new HttpAddressBinding();

            httpAddressBinding.Location = ServiceUrl;
            if (this.UriFixups != null)
            {
                this.UriFixups.Add(delegate(Uri current)
                {
                    httpAddressBinding.Location = DiscoveryServerType.CombineUris(current, httpAddressBinding.Location);
                });
            }
            Port.Extensions.Add(httpAddressBinding);
        }