BugX206.cs 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321
  1. //
  2. // This code was partly auto-generated by slsvcutil, version 4.0.60310.0
  3. //
  4. namespace DHIWebService
  5. {
  6. using System.Runtime.Serialization;
  7. [System.Diagnostics.DebuggerStepThroughAttribute()]
  8. [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
  9. [System.Runtime.Serialization.DataContractAttribute(Name="ClientLoginData", Namespace="http://schemas.datacontract.org/2004/07/Domain.Models")]
  10. public partial class ClientLoginData : object
  11. {
  12. private int CompanyNumberField;
  13. private string InstitutionIdField;
  14. private string PasswordField;
  15. private string UserNameField;
  16. [System.Runtime.Serialization.DataMemberAttribute()]
  17. public int CompanyNumber
  18. {
  19. get
  20. {
  21. return this.CompanyNumberField;
  22. }
  23. set
  24. {
  25. this.CompanyNumberField = value;
  26. }
  27. }
  28. [System.Runtime.Serialization.DataMemberAttribute()]
  29. public string InstitutionId
  30. {
  31. get
  32. {
  33. return this.InstitutionIdField;
  34. }
  35. set
  36. {
  37. this.InstitutionIdField = value;
  38. }
  39. }
  40. [System.Runtime.Serialization.DataMemberAttribute(IsRequired=true)]
  41. public string Password
  42. {
  43. get
  44. {
  45. return this.PasswordField;
  46. }
  47. set
  48. {
  49. this.PasswordField = value;
  50. }
  51. }
  52. [System.Runtime.Serialization.DataMemberAttribute(IsRequired=true)]
  53. public string UserName
  54. {
  55. get
  56. {
  57. return this.UserNameField;
  58. }
  59. set
  60. {
  61. this.UserNameField = value;
  62. }
  63. }
  64. }
  65. [System.Diagnostics.DebuggerStepThroughAttribute()]
  66. [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
  67. [System.Runtime.Serialization.DataContractAttribute(Name="Login", Namespace="http://schemas.datacontract.org/2004/07/Domain.Models")]
  68. public partial class Login : object
  69. {
  70. private int CompanyNumberField;
  71. private string InstitutionIdField;
  72. private string PasswordField;
  73. private string UserNameField;
  74. [System.Runtime.Serialization.DataMemberAttribute()]
  75. public int CompanyNumber
  76. {
  77. get
  78. {
  79. return this.CompanyNumberField;
  80. }
  81. set
  82. {
  83. this.CompanyNumberField = value;
  84. }
  85. }
  86. [System.Runtime.Serialization.DataMemberAttribute()]
  87. public string InstitutionId
  88. {
  89. get
  90. {
  91. return this.InstitutionIdField;
  92. }
  93. set
  94. {
  95. this.InstitutionIdField = value;
  96. }
  97. }
  98. [System.Runtime.Serialization.DataMemberAttribute(IsRequired=true)]
  99. public string Password
  100. {
  101. get
  102. {
  103. return this.PasswordField;
  104. }
  105. set
  106. {
  107. this.PasswordField = value;
  108. }
  109. }
  110. [System.Runtime.Serialization.DataMemberAttribute(IsRequired=true)]
  111. public string UserName
  112. {
  113. get
  114. {
  115. return this.UserNameField;
  116. }
  117. set
  118. {
  119. this.UserNameField = value;
  120. }
  121. }
  122. }
  123. [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
  124. [System.ServiceModel.ServiceContractAttribute(Namespace="IBEWebSvc", ConfigurationName="DHIWebService.IDHIService")]
  125. public interface IDHIService
  126. {
  127. [System.ServiceModel.OperationContractAttribute(AsyncPattern=true, Action="IBEWebSvc/IDHIService/Login", ReplyAction="IBEWebSvc/IDHIService/LoginResponse")]
  128. // FIXME: uncommenting this results in cryptic error message. We should tell what could be wrong here.
  129. // [System.ServiceModel.Web.WebInvoke(BodyStyle=System.ServiceModel.Web.WebMessageBodyStyle.Wrapped)]
  130. System.IAsyncResult BeginLogin(DHIWebService.LoginRequest request, System.AsyncCallback callback, object asyncState);
  131. DHIWebService.LoginResponse EndLogin(System.IAsyncResult result);
  132. [System.ServiceModel.OperationContractAttribute(Action="IBEWebSvc/IDHIService/Login", ReplyAction="IBEWebSvc/IDHIService/LoginResponse")]
  133. [System.ServiceModel.Web.WebInvoke(BodyStyle=System.ServiceModel.Web.WebMessageBodyStyle.Wrapped)]
  134. DHIWebService.LoginResponse Login(DHIWebService.LoginRequest request);
  135. }
  136. [System.Diagnostics.DebuggerStepThroughAttribute()]
  137. [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
  138. [System.ServiceModel.MessageContractAttribute(WrapperName="Login", WrapperNamespace="IBEWebSvc", IsWrapped=true)]
  139. public partial class LoginRequest
  140. {
  141. [System.ServiceModel.MessageBodyMemberAttribute(Namespace="IBEWebSvc", Order=0)]
  142. public DHIWebService.ClientLoginData clientLoginData;
  143. [System.ServiceModel.MessageBodyMemberAttribute(Namespace="IBEWebSvc", Order=1)]
  144. public DHIWebService.Login credentials;
  145. public LoginRequest()
  146. {
  147. }
  148. public LoginRequest(DHIWebService.ClientLoginData clientLoginData, DHIWebService.Login credentials)
  149. {
  150. this.clientLoginData = clientLoginData;
  151. this.credentials = credentials;
  152. }
  153. }
  154. [System.Diagnostics.DebuggerStepThroughAttribute()]
  155. [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
  156. [System.ServiceModel.MessageContractAttribute(WrapperName="LoginResponse", WrapperNamespace="IBEWebSvc", IsWrapped=true)]
  157. public partial class LoginResponse
  158. {
  159. }
  160. [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
  161. public interface IDHIServiceChannel : DHIWebService.IDHIService, System.ServiceModel.IClientChannel
  162. {
  163. }
  164. [System.Diagnostics.DebuggerStepThroughAttribute()]
  165. [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
  166. public partial class LoginCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
  167. {
  168. private object[] results;
  169. public LoginCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
  170. base(exception, cancelled, userState)
  171. {
  172. this.results = results;
  173. }
  174. public DHIWebService.LoginResponse Result
  175. {
  176. get
  177. {
  178. base.RaiseExceptionIfNecessary();
  179. return ((DHIWebService.LoginResponse)(this.results[0]));
  180. }
  181. }
  182. }
  183. [System.Diagnostics.DebuggerStepThroughAttribute()]
  184. [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
  185. public partial class DHIServiceClient : System.ServiceModel.ClientBase<DHIWebService.IDHIService>, DHIWebService.IDHIService
  186. {
  187. private BeginOperationDelegate onBeginLoginDelegate;
  188. private EndOperationDelegate onEndLoginDelegate;
  189. private System.Threading.SendOrPostCallback onLoginCompletedDelegate;
  190. public DHIServiceClient()
  191. {
  192. }
  193. public DHIServiceClient(string endpointConfigurationName) :
  194. base(endpointConfigurationName)
  195. {
  196. }
  197. public DHIServiceClient(string endpointConfigurationName, string remoteAddress) :
  198. base(endpointConfigurationName, remoteAddress)
  199. {
  200. }
  201. public DHIServiceClient(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) :
  202. base(endpointConfigurationName, remoteAddress)
  203. {
  204. }
  205. public DHIServiceClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) :
  206. base(binding, remoteAddress)
  207. {
  208. }
  209. public event System.EventHandler<LoginCompletedEventArgs> LoginCompleted;
  210. [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
  211. System.IAsyncResult DHIWebService.IDHIService.BeginLogin(DHIWebService.LoginRequest request, System.AsyncCallback callback, object asyncState)
  212. {
  213. return base.Channel.BeginLogin(request, callback, asyncState);
  214. }
  215. [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
  216. DHIWebService.LoginResponse DHIWebService.IDHIService.EndLogin(System.IAsyncResult result)
  217. {
  218. return base.Channel.EndLogin(result);
  219. }
  220. private System.IAsyncResult OnBeginLogin(object[] inValues, System.AsyncCallback callback, object asyncState)
  221. {
  222. DHIWebService.LoginRequest request = ((DHIWebService.LoginRequest)(inValues[0]));
  223. return ((DHIWebService.IDHIService)(this)).BeginLogin(request, callback, asyncState);
  224. }
  225. private object[] OnEndLogin(System.IAsyncResult result)
  226. {
  227. DHIWebService.LoginResponse retVal = ((DHIWebService.IDHIService)(this)).EndLogin(result);
  228. return new object[] {
  229. retVal};
  230. }
  231. private void OnLoginCompleted(object state)
  232. {
  233. if ((this.LoginCompleted != null))
  234. {
  235. InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state));
  236. this.LoginCompleted(this, new LoginCompletedEventArgs(e.Results, e.Error, e.Cancelled, e.UserState));
  237. }
  238. }
  239. public void LoginAsync(DHIWebService.LoginRequest request)
  240. {
  241. this.LoginAsync(request, null);
  242. }
  243. public void LoginAsync(DHIWebService.LoginRequest request, object userState)
  244. {
  245. if ((this.onBeginLoginDelegate == null))
  246. {
  247. this.onBeginLoginDelegate = new BeginOperationDelegate(this.OnBeginLogin);
  248. }
  249. if ((this.onEndLoginDelegate == null))
  250. {
  251. this.onEndLoginDelegate = new EndOperationDelegate(this.OnEndLogin);
  252. }
  253. if ((this.onLoginCompletedDelegate == null))
  254. {
  255. this.onLoginCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnLoginCompleted);
  256. }
  257. base.InvokeAsync(this.onBeginLoginDelegate, new object[] {
  258. request}, this.onEndLoginDelegate, this.onLoginCompletedDelegate, userState);
  259. }
  260. [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
  261. DHIWebService.LoginResponse DHIWebService.IDHIService.Login (DHIWebService.LoginRequest request)
  262. {
  263. return base.Channel.Login(request);
  264. }
  265. }
  266. }