Reference.cs 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332
  1. //------------------------------------------------------------------------------
  2. // <auto-generated>
  3. // 此代码由工具生成。
  4. //
  5. // 对此文件的更改可能导致不正确的行为,并在以下条件下丢失:
  6. // 代码重新生成。
  7. // </auto-generated>
  8. //------------------------------------------------------------------------------
  9. namespace DASampleService
  10. {
  11. /// <remarks/>
  12. [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.3-preview3.21351.2")]
  13. [System.Diagnostics.DebuggerStepThroughAttribute()]
  14. [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://webservice.ambition.com/")]
  15. public partial class ParseException
  16. {
  17. private int errorOffsetField;
  18. private bool errorOffsetFieldSpecified;
  19. private string messageField;
  20. /// <remarks/>
  21. [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, Order=0)]
  22. public int errorOffset
  23. {
  24. get
  25. {
  26. return this.errorOffsetField;
  27. }
  28. set
  29. {
  30. this.errorOffsetField = value;
  31. }
  32. }
  33. /// <remarks/>
  34. [System.Xml.Serialization.XmlIgnoreAttribute()]
  35. public bool errorOffsetSpecified
  36. {
  37. get
  38. {
  39. return this.errorOffsetFieldSpecified;
  40. }
  41. set
  42. {
  43. this.errorOffsetFieldSpecified = value;
  44. }
  45. }
  46. /// <remarks/>
  47. [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, Order=1)]
  48. public string message
  49. {
  50. get
  51. {
  52. return this.messageField;
  53. }
  54. set
  55. {
  56. this.messageField = value;
  57. }
  58. }
  59. }
  60. [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.3-preview3.21351.2")]
  61. [System.ServiceModel.ServiceContractAttribute(Namespace="http://webservice.ambition.com/", ConfigurationName="DASampleService.IEapSampleService")]
  62. public interface IEapSampleService
  63. {
  64. // CODEGEN: 参数 "return" 需要其他架构信息,使用参数模式无法捕获这些信息。特定属性为“Microsoft.Xml.Serialization.XmlElementAttribute”。
  65. [System.ServiceModel.OperationContractAttribute(Action="", ReplyAction="*")]
  66. [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)]
  67. [return: System.ServiceModel.MessageParameterAttribute(Name="return")]
  68. DASampleService.checkSampleResponse checkSample(DASampleService.checkSample request);
  69. [System.ServiceModel.OperationContractAttribute(Action="", ReplyAction="*")]
  70. System.Threading.Tasks.Task<DASampleService.checkSampleResponse> checkSampleAsync(DASampleService.checkSample request);
  71. // CODEGEN: 参数 "return" 需要其他架构信息,使用参数模式无法捕获这些信息。特定属性为“Microsoft.Xml.Serialization.XmlElementAttribute”。
  72. [System.ServiceModel.OperationContractAttribute(Action="", ReplyAction="*")]
  73. [System.ServiceModel.FaultContractAttribute(typeof(DASampleService.ParseException), Action="", Name="ParseException")]
  74. [System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)]
  75. [return: System.ServiceModel.MessageParameterAttribute(Name="return")]
  76. DASampleService.receiveDaResponse receiveDa(DASampleService.receiveDa request);
  77. [System.ServiceModel.OperationContractAttribute(Action="", ReplyAction="*")]
  78. System.Threading.Tasks.Task<DASampleService.receiveDaResponse> receiveDaAsync(DASampleService.receiveDa request);
  79. }
  80. [System.Diagnostics.DebuggerStepThroughAttribute()]
  81. [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.3-preview3.21351.2")]
  82. [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
  83. [System.ServiceModel.MessageContractAttribute(WrapperName="checkSample", WrapperNamespace="http://webservice.ambition.com/", IsWrapped=true)]
  84. public partial class checkSample
  85. {
  86. [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://webservice.ambition.com/", Order=0)]
  87. [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
  88. public string eapSample;
  89. public checkSample()
  90. {
  91. }
  92. public checkSample(string eapSample)
  93. {
  94. this.eapSample = eapSample;
  95. }
  96. }
  97. [System.Diagnostics.DebuggerStepThroughAttribute()]
  98. [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.3-preview3.21351.2")]
  99. [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
  100. [System.ServiceModel.MessageContractAttribute(WrapperName="checkSampleResponse", WrapperNamespace="http://webservice.ambition.com/", IsWrapped=true)]
  101. public partial class checkSampleResponse
  102. {
  103. [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://webservice.ambition.com/", Order=0)]
  104. [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
  105. public string @return;
  106. public checkSampleResponse()
  107. {
  108. }
  109. public checkSampleResponse(string @return)
  110. {
  111. this.@return = @return;
  112. }
  113. }
  114. [System.Diagnostics.DebuggerStepThroughAttribute()]
  115. [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.3-preview3.21351.2")]
  116. [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
  117. [System.ServiceModel.MessageContractAttribute(WrapperName="receiveDa", WrapperNamespace="http://webservice.ambition.com/", IsWrapped=true)]
  118. public partial class receiveDa
  119. {
  120. [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://webservice.ambition.com/", Order=0)]
  121. [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
  122. public string daSample;
  123. public receiveDa()
  124. {
  125. }
  126. public receiveDa(string daSample)
  127. {
  128. this.daSample = daSample;
  129. }
  130. }
  131. [System.Diagnostics.DebuggerStepThroughAttribute()]
  132. [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.3-preview3.21351.2")]
  133. [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
  134. [System.ServiceModel.MessageContractAttribute(WrapperName="receiveDaResponse", WrapperNamespace="http://webservice.ambition.com/", IsWrapped=true)]
  135. public partial class receiveDaResponse
  136. {
  137. [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://webservice.ambition.com/", Order=0)]
  138. [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
  139. public string @return;
  140. public receiveDaResponse()
  141. {
  142. }
  143. public receiveDaResponse(string @return)
  144. {
  145. this.@return = @return;
  146. }
  147. }
  148. [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.3-preview3.21351.2")]
  149. public interface IEapSampleServiceChannel : DASampleService.IEapSampleService, System.ServiceModel.IClientChannel
  150. {
  151. }
  152. [System.Diagnostics.DebuggerStepThroughAttribute()]
  153. [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.3-preview3.21351.2")]
  154. public partial class EapSampleServiceClient : System.ServiceModel.ClientBase<DASampleService.IEapSampleService>, DASampleService.IEapSampleService
  155. {
  156. /// <summary>
  157. /// 实现此分部方法,配置服务终结点。
  158. /// </summary>
  159. /// <param name="serviceEndpoint">要配置的终结点</param>
  160. /// <param name="clientCredentials">客户端凭据</param>
  161. static partial void ConfigureEndpoint(System.ServiceModel.Description.ServiceEndpoint serviceEndpoint, System.ServiceModel.Description.ClientCredentials clientCredentials);
  162. public EapSampleServiceClient() :
  163. base(EapSampleServiceClient.GetDefaultBinding(), EapSampleServiceClient.GetDefaultEndpointAddress())
  164. {
  165. this.Endpoint.Name = EndpointConfiguration.IEapSampleServiceImplPort.ToString();
  166. ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
  167. }
  168. public EapSampleServiceClient(EndpointConfiguration endpointConfiguration) :
  169. base(EapSampleServiceClient.GetBindingForEndpoint(endpointConfiguration), EapSampleServiceClient.GetEndpointAddress(endpointConfiguration))
  170. {
  171. this.Endpoint.Name = endpointConfiguration.ToString();
  172. ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
  173. }
  174. public EapSampleServiceClient(EndpointConfiguration endpointConfiguration, string remoteAddress) :
  175. base(EapSampleServiceClient.GetBindingForEndpoint(endpointConfiguration), new System.ServiceModel.EndpointAddress(remoteAddress))
  176. {
  177. this.Endpoint.Name = endpointConfiguration.ToString();
  178. ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
  179. }
  180. public EapSampleServiceClient(EndpointConfiguration endpointConfiguration, System.ServiceModel.EndpointAddress remoteAddress) :
  181. base(EapSampleServiceClient.GetBindingForEndpoint(endpointConfiguration), remoteAddress)
  182. {
  183. this.Endpoint.Name = endpointConfiguration.ToString();
  184. ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
  185. }
  186. public EapSampleServiceClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) :
  187. base(binding, remoteAddress)
  188. {
  189. }
  190. [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
  191. DASampleService.checkSampleResponse DASampleService.IEapSampleService.checkSample(DASampleService.checkSample request)
  192. {
  193. return base.Channel.checkSample(request);
  194. }
  195. public string checkSample(string eapSample)
  196. {
  197. DASampleService.checkSample inValue = new DASampleService.checkSample();
  198. inValue.eapSample = eapSample;
  199. DASampleService.checkSampleResponse retVal = ((DASampleService.IEapSampleService)(this)).checkSample(inValue);
  200. return retVal.@return;
  201. }
  202. [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
  203. System.Threading.Tasks.Task<DASampleService.checkSampleResponse> DASampleService.IEapSampleService.checkSampleAsync(DASampleService.checkSample request)
  204. {
  205. return base.Channel.checkSampleAsync(request);
  206. }
  207. public System.Threading.Tasks.Task<DASampleService.checkSampleResponse> checkSampleAsync(string eapSample)
  208. {
  209. DASampleService.checkSample inValue = new DASampleService.checkSample();
  210. inValue.eapSample = eapSample;
  211. return ((DASampleService.IEapSampleService)(this)).checkSampleAsync(inValue);
  212. }
  213. [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
  214. DASampleService.receiveDaResponse DASampleService.IEapSampleService.receiveDa(DASampleService.receiveDa request)
  215. {
  216. return base.Channel.receiveDa(request);
  217. }
  218. public string receiveDa(string daSample)
  219. {
  220. DASampleService.receiveDa inValue = new DASampleService.receiveDa();
  221. inValue.daSample = daSample;
  222. DASampleService.receiveDaResponse retVal = ((DASampleService.IEapSampleService)(this)).receiveDa(inValue);
  223. return retVal.@return;
  224. }
  225. [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
  226. System.Threading.Tasks.Task<DASampleService.receiveDaResponse> DASampleService.IEapSampleService.receiveDaAsync(DASampleService.receiveDa request)
  227. {
  228. return base.Channel.receiveDaAsync(request);
  229. }
  230. public System.Threading.Tasks.Task<DASampleService.receiveDaResponse> receiveDaAsync(string daSample)
  231. {
  232. DASampleService.receiveDa inValue = new DASampleService.receiveDa();
  233. inValue.daSample = daSample;
  234. return ((DASampleService.IEapSampleService)(this)).receiveDaAsync(inValue);
  235. }
  236. public virtual System.Threading.Tasks.Task OpenAsync()
  237. {
  238. return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action<System.IAsyncResult>(((System.ServiceModel.ICommunicationObject)(this)).EndOpen));
  239. }
  240. public virtual System.Threading.Tasks.Task CloseAsync()
  241. {
  242. return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action<System.IAsyncResult>(((System.ServiceModel.ICommunicationObject)(this)).EndClose));
  243. }
  244. private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration)
  245. {
  246. if ((endpointConfiguration == EndpointConfiguration.IEapSampleServiceImplPort))
  247. {
  248. System.ServiceModel.BasicHttpBinding result = new System.ServiceModel.BasicHttpBinding();
  249. result.MaxBufferSize = int.MaxValue;
  250. result.ReaderQuotas = System.Xml.XmlDictionaryReaderQuotas.Max;
  251. result.MaxReceivedMessageSize = int.MaxValue;
  252. result.AllowCookies = true;
  253. return result;
  254. }
  255. throw new System.InvalidOperationException(string.Format("找不到名称为“{0}”的终结点。", endpointConfiguration));
  256. }
  257. private static System.ServiceModel.EndpointAddress GetEndpointAddress(EndpointConfiguration endpointConfiguration)
  258. {
  259. if ((endpointConfiguration == EndpointConfiguration.IEapSampleServiceImplPort))
  260. {
  261. return new System.ServiceModel.EndpointAddress("http://192.168.51.56:9011//amb/webservice/iEapSampleService");
  262. }
  263. throw new System.InvalidOperationException(string.Format("找不到名称为“{0}”的终结点。", endpointConfiguration));
  264. }
  265. private static System.ServiceModel.Channels.Binding GetDefaultBinding()
  266. {
  267. return EapSampleServiceClient.GetBindingForEndpoint(EndpointConfiguration.IEapSampleServiceImplPort);
  268. }
  269. private static System.ServiceModel.EndpointAddress GetDefaultEndpointAddress()
  270. {
  271. return EapSampleServiceClient.GetEndpointAddress(EndpointConfiguration.IEapSampleServiceImplPort);
  272. }
  273. public enum EndpointConfiguration
  274. {
  275. IEapSampleServiceImplPort,
  276. }
  277. }
  278. }