Example #1
0
 /// <remarks/>
 public void loginAsync(LoginReq request, object userState) {
     if ((this.loginOperationCompleted == null)) {
         this.loginOperationCompleted = new System.Threading.SendOrPostCallback(this.OnloginOperationCompleted);
     }
     this.InvokeAsync("login", new object[] {
                 request}, this.loginOperationCompleted, userState);
 }
Example #2
0
 public LoginResp login(LoginReq request) {
     object[] results = this.Invoke("login", new object[] {
                 request});
     return ((LoginResp)(results[0]));
 }
Example #3
0
 /// <remarks/>
 public void loginAsync(LoginReq request) {
     this.loginAsync(request, null);
 }
Example #4
0
        public void Open()
        {
            // Just for testing - do not take too seriously!!!
            try
            {
                ConnectionStatus = ConnectionState.Connecting;

                var globalProxy = new BFGlobalService();

                var req = new LoginReq();
                req.password = Connection.Password;
                req.username = Connection.Username;
                req.vendorSoftwareId = Connection.SoftwareId;
                req.productId = Connection.ProductId;

                var resp = globalProxy.login(req);

                if (resp.header.errorCode == APIErrorEnum.OK && resp.errorCode == LoginErrorEnum.OK)
                {
                    ConnectionStatus = ConnectionState.Open;
                }
                else
                {
                    throw new Exception("Connection failed. Reason " + resp.errorCode);
                }
            }
            catch (Exception)
            {
                ConnectionStatus = ConnectionState.Closed;
                throw;
            }
        }