//------------------------------------------------------------------------------ // // 此代码由工具生成。 // // 对此文件的更改可能导致不正确的行为,并在以下条件下丢失: // 代码重新生成。 // //------------------------------------------------------------------------------ namespace DASampleService { /// [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.3-preview3.21351.2")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://webservice.ambition.com/")] public partial class ParseException { private int errorOffsetField; private bool errorOffsetFieldSpecified; private string messageField; /// [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, Order=0)] public int errorOffset { get { return this.errorOffsetField; } set { this.errorOffsetField = value; } } /// [System.Xml.Serialization.XmlIgnoreAttribute()] public bool errorOffsetSpecified { get { return this.errorOffsetFieldSpecified; } set { this.errorOffsetFieldSpecified = value; } } /// [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, Order=1)] public string message { get { return this.messageField; } set { this.messageField = value; } } } [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.3-preview3.21351.2")] [System.ServiceModel.ServiceContractAttribute(Namespace="http://webservice.ambition.com/", ConfigurationName="DASampleService.IEapSampleService")] public interface IEapSampleService { // CODEGEN: 参数 "return" 需要其他架构信息,使用参数模式无法捕获这些信息。特定属性为“Microsoft.Xml.Serialization.XmlElementAttribute”。 [System.ServiceModel.OperationContractAttribute(Action="", ReplyAction="*")] [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)] [return: System.ServiceModel.MessageParameterAttribute(Name="return")] DASampleService.checkSampleResponse checkSample(DASampleService.checkSample request); [System.ServiceModel.OperationContractAttribute(Action="", ReplyAction="*")] System.Threading.Tasks.Task checkSampleAsync(DASampleService.checkSample request); // CODEGEN: 参数 "return" 需要其他架构信息,使用参数模式无法捕获这些信息。特定属性为“Microsoft.Xml.Serialization.XmlElementAttribute”。 [System.ServiceModel.OperationContractAttribute(Action="", ReplyAction="*")] [System.ServiceModel.FaultContractAttribute(typeof(DASampleService.ParseException), Action="", Name="ParseException")] [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)] [return: System.ServiceModel.MessageParameterAttribute(Name="return")] DASampleService.receiveDaResponse receiveDa(DASampleService.receiveDa request); [System.ServiceModel.OperationContractAttribute(Action="", ReplyAction="*")] System.Threading.Tasks.Task receiveDaAsync(DASampleService.receiveDa request); } [System.Diagnostics.DebuggerStepThroughAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.3-preview3.21351.2")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] [System.ServiceModel.MessageContractAttribute(WrapperName="checkSample", WrapperNamespace="http://webservice.ambition.com/", IsWrapped=true)] public partial class checkSample { [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://webservice.ambition.com/", Order=0)] [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] public string eapSample; public checkSample() { } public checkSample(string eapSample) { this.eapSample = eapSample; } } [System.Diagnostics.DebuggerStepThroughAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.3-preview3.21351.2")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] [System.ServiceModel.MessageContractAttribute(WrapperName="checkSampleResponse", WrapperNamespace="http://webservice.ambition.com/", IsWrapped=true)] public partial class checkSampleResponse { [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://webservice.ambition.com/", Order=0)] [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] public string @return; public checkSampleResponse() { } public checkSampleResponse(string @return) { this.@return = @return; } } [System.Diagnostics.DebuggerStepThroughAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.3-preview3.21351.2")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] [System.ServiceModel.MessageContractAttribute(WrapperName="receiveDa", WrapperNamespace="http://webservice.ambition.com/", IsWrapped=true)] public partial class receiveDa { [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://webservice.ambition.com/", Order=0)] [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] public string daSample; public receiveDa() { } public receiveDa(string daSample) { this.daSample = daSample; } } [System.Diagnostics.DebuggerStepThroughAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.3-preview3.21351.2")] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] [System.ServiceModel.MessageContractAttribute(WrapperName="receiveDaResponse", WrapperNamespace="http://webservice.ambition.com/", IsWrapped=true)] public partial class receiveDaResponse { [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://webservice.ambition.com/", Order=0)] [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] public string @return; public receiveDaResponse() { } public receiveDaResponse(string @return) { this.@return = @return; } } [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.3-preview3.21351.2")] public interface IEapSampleServiceChannel : DASampleService.IEapSampleService, System.ServiceModel.IClientChannel { } [System.Diagnostics.DebuggerStepThroughAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.3-preview3.21351.2")] public partial class EapSampleServiceClient : System.ServiceModel.ClientBase, DASampleService.IEapSampleService { /// /// 实现此分部方法,配置服务终结点。 /// /// 要配置的终结点 /// 客户端凭据 static partial void ConfigureEndpoint(System.ServiceModel.Description.ServiceEndpoint serviceEndpoint, System.ServiceModel.Description.ClientCredentials clientCredentials); public EapSampleServiceClient() : base(EapSampleServiceClient.GetDefaultBinding(), EapSampleServiceClient.GetDefaultEndpointAddress()) { this.Endpoint.Name = EndpointConfiguration.IEapSampleServiceImplPort.ToString(); ConfigureEndpoint(this.Endpoint, this.ClientCredentials); } public EapSampleServiceClient(EndpointConfiguration endpointConfiguration) : base(EapSampleServiceClient.GetBindingForEndpoint(endpointConfiguration), EapSampleServiceClient.GetEndpointAddress(endpointConfiguration)) { this.Endpoint.Name = endpointConfiguration.ToString(); ConfigureEndpoint(this.Endpoint, this.ClientCredentials); } public EapSampleServiceClient(EndpointConfiguration endpointConfiguration, string remoteAddress) : base(EapSampleServiceClient.GetBindingForEndpoint(endpointConfiguration), new System.ServiceModel.EndpointAddress(remoteAddress)) { this.Endpoint.Name = endpointConfiguration.ToString(); ConfigureEndpoint(this.Endpoint, this.ClientCredentials); } public EapSampleServiceClient(EndpointConfiguration endpointConfiguration, System.ServiceModel.EndpointAddress remoteAddress) : base(EapSampleServiceClient.GetBindingForEndpoint(endpointConfiguration), remoteAddress) { this.Endpoint.Name = endpointConfiguration.ToString(); ConfigureEndpoint(this.Endpoint, this.ClientCredentials); } public EapSampleServiceClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) : base(binding, remoteAddress) { } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] DASampleService.checkSampleResponse DASampleService.IEapSampleService.checkSample(DASampleService.checkSample request) { return base.Channel.checkSample(request); } public string checkSample(string eapSample) { DASampleService.checkSample inValue = new DASampleService.checkSample(); inValue.eapSample = eapSample; DASampleService.checkSampleResponse retVal = ((DASampleService.IEapSampleService)(this)).checkSample(inValue); return retVal.@return; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] System.Threading.Tasks.Task DASampleService.IEapSampleService.checkSampleAsync(DASampleService.checkSample request) { return base.Channel.checkSampleAsync(request); } public System.Threading.Tasks.Task checkSampleAsync(string eapSample) { DASampleService.checkSample inValue = new DASampleService.checkSample(); inValue.eapSample = eapSample; return ((DASampleService.IEapSampleService)(this)).checkSampleAsync(inValue); } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] DASampleService.receiveDaResponse DASampleService.IEapSampleService.receiveDa(DASampleService.receiveDa request) { return base.Channel.receiveDa(request); } public string receiveDa(string daSample) { DASampleService.receiveDa inValue = new DASampleService.receiveDa(); inValue.daSample = daSample; DASampleService.receiveDaResponse retVal = ((DASampleService.IEapSampleService)(this)).receiveDa(inValue); return retVal.@return; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] System.Threading.Tasks.Task DASampleService.IEapSampleService.receiveDaAsync(DASampleService.receiveDa request) { return base.Channel.receiveDaAsync(request); } public System.Threading.Tasks.Task receiveDaAsync(string daSample) { DASampleService.receiveDa inValue = new DASampleService.receiveDa(); inValue.daSample = daSample; return ((DASampleService.IEapSampleService)(this)).receiveDaAsync(inValue); } public virtual System.Threading.Tasks.Task OpenAsync() { return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } public virtual System.Threading.Tasks.Task CloseAsync() { return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); } private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.IEapSampleServiceImplPort)) { System.ServiceModel.BasicHttpBinding result = new System.ServiceModel.BasicHttpBinding(); result.MaxBufferSize = int.MaxValue; result.ReaderQuotas = System.Xml.XmlDictionaryReaderQuotas.Max; result.MaxReceivedMessageSize = int.MaxValue; result.AllowCookies = true; return result; } throw new System.InvalidOperationException(string.Format("找不到名称为“{0}”的终结点。", endpointConfiguration)); } private static System.ServiceModel.EndpointAddress GetEndpointAddress(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.IEapSampleServiceImplPort)) { return new System.ServiceModel.EndpointAddress("http://192.168.51.56:9011//amb/webservice/iEapSampleService"); } throw new System.InvalidOperationException(string.Format("找不到名称为“{0}”的终结点。", endpointConfiguration)); } private static System.ServiceModel.Channels.Binding GetDefaultBinding() { return EapSampleServiceClient.GetBindingForEndpoint(EndpointConfiguration.IEapSampleServiceImplPort); } private static System.ServiceModel.EndpointAddress GetDefaultEndpointAddress() { return EapSampleServiceClient.GetEndpointAddress(EndpointConfiguration.IEapSampleServiceImplPort); } public enum EndpointConfiguration { IEapSampleServiceImplPort, } } }