// // This code was partly auto-generated by slsvcutil, version 4.0.60310.0 // namespace DHIWebService { using System.Runtime.Serialization; [System.Diagnostics.DebuggerStepThroughAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")] [System.Runtime.Serialization.DataContractAttribute(Name="ClientLoginData", Namespace="http://schemas.datacontract.org/2004/07/Domain.Models")] public partial class ClientLoginData : object { private int CompanyNumberField; private string InstitutionIdField; private string PasswordField; private string UserNameField; [System.Runtime.Serialization.DataMemberAttribute()] public int CompanyNumber { get { return this.CompanyNumberField; } set { this.CompanyNumberField = value; } } [System.Runtime.Serialization.DataMemberAttribute()] public string InstitutionId { get { return this.InstitutionIdField; } set { this.InstitutionIdField = value; } } [System.Runtime.Serialization.DataMemberAttribute(IsRequired=true)] public string Password { get { return this.PasswordField; } set { this.PasswordField = value; } } [System.Runtime.Serialization.DataMemberAttribute(IsRequired=true)] public string UserName { get { return this.UserNameField; } set { this.UserNameField = value; } } } [System.Diagnostics.DebuggerStepThroughAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")] [System.Runtime.Serialization.DataContractAttribute(Name="Login", Namespace="http://schemas.datacontract.org/2004/07/Domain.Models")] public partial class Login : object { private int CompanyNumberField; private string InstitutionIdField; private string PasswordField; private string UserNameField; [System.Runtime.Serialization.DataMemberAttribute()] public int CompanyNumber { get { return this.CompanyNumberField; } set { this.CompanyNumberField = value; } } [System.Runtime.Serialization.DataMemberAttribute()] public string InstitutionId { get { return this.InstitutionIdField; } set { this.InstitutionIdField = value; } } [System.Runtime.Serialization.DataMemberAttribute(IsRequired=true)] public string Password { get { return this.PasswordField; } set { this.PasswordField = value; } } [System.Runtime.Serialization.DataMemberAttribute(IsRequired=true)] public string UserName { get { return this.UserNameField; } set { this.UserNameField = value; } } } [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] [System.ServiceModel.ServiceContractAttribute(Namespace="IBEWebSvc", ConfigurationName="DHIWebService.IDHIService")] public interface IDHIService { [System.ServiceModel.OperationContractAttribute(AsyncPattern=true, Action="IBEWebSvc/IDHIService/Login", ReplyAction="IBEWebSvc/IDHIService/LoginResponse")] // FIXME: uncommenting this results in cryptic error message. We should tell what could be wrong here. // [System.ServiceModel.Web.WebInvoke(BodyStyle=System.ServiceModel.Web.WebMessageBodyStyle.Wrapped)] System.IAsyncResult BeginLogin(DHIWebService.LoginRequest request, System.AsyncCallback callback, object asyncState); DHIWebService.LoginResponse EndLogin(System.IAsyncResult result); [System.ServiceModel.OperationContractAttribute(Action="IBEWebSvc/IDHIService/Login", ReplyAction="IBEWebSvc/IDHIService/LoginResponse")] [System.ServiceModel.Web.WebInvoke(BodyStyle=System.ServiceModel.Web.WebMessageBodyStyle.Wrapped)] DHIWebService.LoginResponse Login(DHIWebService.LoginRequest request); } [System.Diagnostics.DebuggerStepThroughAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] [System.ServiceModel.MessageContractAttribute(WrapperName="Login", WrapperNamespace="IBEWebSvc", IsWrapped=true)] public partial class LoginRequest { [System.ServiceModel.MessageBodyMemberAttribute(Namespace="IBEWebSvc", Order=0)] public DHIWebService.ClientLoginData clientLoginData; [System.ServiceModel.MessageBodyMemberAttribute(Namespace="IBEWebSvc", Order=1)] public DHIWebService.Login credentials; public LoginRequest() { } public LoginRequest(DHIWebService.ClientLoginData clientLoginData, DHIWebService.Login credentials) { this.clientLoginData = clientLoginData; this.credentials = credentials; } } [System.Diagnostics.DebuggerStepThroughAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] [System.ServiceModel.MessageContractAttribute(WrapperName="LoginResponse", WrapperNamespace="IBEWebSvc", IsWrapped=true)] public partial class LoginResponse { } [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] public interface IDHIServiceChannel : DHIWebService.IDHIService, System.ServiceModel.IClientChannel { } [System.Diagnostics.DebuggerStepThroughAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] public partial class LoginCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { private object[] results; public LoginCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : base(exception, cancelled, userState) { this.results = results; } public DHIWebService.LoginResponse Result { get { base.RaiseExceptionIfNecessary(); return ((DHIWebService.LoginResponse)(this.results[0])); } } } [System.Diagnostics.DebuggerStepThroughAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] public partial class DHIServiceClient : System.ServiceModel.ClientBase, DHIWebService.IDHIService { private BeginOperationDelegate onBeginLoginDelegate; private EndOperationDelegate onEndLoginDelegate; private System.Threading.SendOrPostCallback onLoginCompletedDelegate; public DHIServiceClient() { } public DHIServiceClient(string endpointConfigurationName) : base(endpointConfigurationName) { } public DHIServiceClient(string endpointConfigurationName, string remoteAddress) : base(endpointConfigurationName, remoteAddress) { } public DHIServiceClient(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) : base(endpointConfigurationName, remoteAddress) { } public DHIServiceClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) : base(binding, remoteAddress) { } public event System.EventHandler LoginCompleted; [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] System.IAsyncResult DHIWebService.IDHIService.BeginLogin(DHIWebService.LoginRequest request, System.AsyncCallback callback, object asyncState) { return base.Channel.BeginLogin(request, callback, asyncState); } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] DHIWebService.LoginResponse DHIWebService.IDHIService.EndLogin(System.IAsyncResult result) { return base.Channel.EndLogin(result); } private System.IAsyncResult OnBeginLogin(object[] inValues, System.AsyncCallback callback, object asyncState) { DHIWebService.LoginRequest request = ((DHIWebService.LoginRequest)(inValues[0])); return ((DHIWebService.IDHIService)(this)).BeginLogin(request, callback, asyncState); } private object[] OnEndLogin(System.IAsyncResult result) { DHIWebService.LoginResponse retVal = ((DHIWebService.IDHIService)(this)).EndLogin(result); return new object[] { retVal}; } private void OnLoginCompleted(object state) { if ((this.LoginCompleted != null)) { InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state)); this.LoginCompleted(this, new LoginCompletedEventArgs(e.Results, e.Error, e.Cancelled, e.UserState)); } } public void LoginAsync(DHIWebService.LoginRequest request) { this.LoginAsync(request, null); } public void LoginAsync(DHIWebService.LoginRequest request, object userState) { if ((this.onBeginLoginDelegate == null)) { this.onBeginLoginDelegate = new BeginOperationDelegate(this.OnBeginLogin); } if ((this.onEndLoginDelegate == null)) { this.onEndLoginDelegate = new EndOperationDelegate(this.OnEndLogin); } if ((this.onLoginCompletedDelegate == null)) { this.onLoginCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnLoginCompleted); } base.InvokeAsync(this.onBeginLoginDelegate, new object[] { request}, this.onEndLoginDelegate, this.onLoginCompletedDelegate, userState); } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] DHIWebService.LoginResponse DHIWebService.IDHIService.Login (DHIWebService.LoginRequest request) { return base.Channel.Login(request); } } }