protected override CodeTypeDeclaration BeginClass() { httpBinding = (HttpBinding)Binding.Extensions.Find(typeof(HttpBinding)); CodeTypeDeclaration codeClass = new CodeTypeDeclaration(ClassName); #if NET_2_0 codeClass.IsPartial = true; #endif string location = null; if (Port != null) { HttpAddressBinding sab = (HttpAddressBinding)Port.Extensions.Find(typeof(HttpAddressBinding)); if (sab != null) { location = sab.Location; } } CodeConstructor cc = new CodeConstructor(); cc.Attributes = MemberAttributes.Public; GenerateServiceUrl(location, cc.Statements); codeClass.Members.Add(cc); memberIds = new CodeIdentifiers(); return(codeClass); }
protected override void BeginClass () { base.BeginClass (); HttpBinding hb = new HttpBinding (); hb.Verb = "POST"; Binding.Extensions.Add (hb); }
protected override void BeginClass() { base.BeginClass(); HttpBinding hb = new HttpBinding(); hb.Verb = "GET"; Binding.Extensions.Add(hb); }
protected override bool IsBindingSupported() { HttpBinding bin = (HttpBinding)Binding.Extensions.Find(typeof(HttpBinding)); if (bin == null) { return(false); } return(bin.Verb == "GET"); }
protected override void BeginClass() { HttpBinding httpBinding = new HttpBinding(); httpBinding.Verb = "POST"; Binding.Extensions.Add(httpBinding); HttpAddressBinding httpAddressBinding = new HttpAddressBinding(); httpAddressBinding.Location = ServiceUrl; Port.Extensions.Add(httpAddressBinding); }
protected override bool IsBindingSupported() { HttpBinding httpBinding = (HttpBinding)Binding.Extensions.Find(typeof(HttpBinding)); if (httpBinding == null) { return(false); } if (httpBinding.Verb != "POST") { return(false); } return(true); }
protected override void BeginClass() { if (!base.IsEmptyBinding) { HttpBinding extension = new HttpBinding { Verb = "POST" }; base.Binding.Extensions.Add(extension); HttpAddressBinding binding2 = new HttpAddressBinding { Location = base.ServiceUrl }; base.Port.Extensions.Add(binding2); } }
protected override void BeginClass() { if (!base.IsEmptyBinding) { HttpBinding extension = new HttpBinding { Verb = "GET" }; base.Binding.Extensions.Add(extension); HttpAddressBinding binding2 = new HttpAddressBinding { Location = base.ServiceUrl }; base.Port.Extensions.Add(binding2); } }
protected override void BeginClass() { if (IsEmptyBinding) return; HttpBinding httpBinding = new HttpBinding(); httpBinding.Verb = "GET"; 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); }
protected override CodeTypeDeclaration BeginClass () { httpBinding = (HttpBinding) Binding.Extensions.Find (typeof(HttpBinding)); CodeTypeDeclaration codeClass = new CodeTypeDeclaration (ClassName); string location = null; if (Port != null) { HttpAddressBinding sab = (HttpAddressBinding) Port.Extensions.Find (typeof(HttpAddressBinding)); if (sab != null) location = sab.Location; } CodeConstructor cc = new CodeConstructor (); cc.Attributes = MemberAttributes.Public; GenerateServiceUrl (location, cc.Statements); codeClass.Members.Add (cc); memberIds = new CodeIdentifiers (); return codeClass; }
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); }
private void Write77_HttpBinding(string n, string ns, HttpBinding o, bool isNullable, bool needType) { if (o == null) { if (isNullable) { base.WriteNullTagLiteral(n, ns); } } else { if (!needType && !(o.GetType() == typeof(HttpBinding))) { throw base.CreateUnknownTypeException(o); } base.WriteStartElement(n, ns, o, false, null); if (needType) { base.WriteXsiType("HttpBinding", "http://schemas.xmlsoap.org/wsdl/http/"); } if (o.Required) { base.WriteAttribute("required", "http://schemas.xmlsoap.org/wsdl/", XmlConvert.ToString(o.Required)); } base.WriteAttribute("verb", "", o.Verb); base.WriteEndElement(o); } }