コード例 #1
0
        private void HandleLogin(MethodResponse response)
        {
            LoginResponse loginResponse = response.Get <LoginResponse>();

            loginResponse.Error = response.Error;
            Login?.Invoke(this, loginResponse);
        }
コード例 #2
0
        private void HandleLogin(MethodResponse response)
        {
            LoginResponse loginResponse = response.Get <LoginResponse>() ?? new LoginResponse
            {
                Error = response.Error
            };

            if (loginResponse.HasError())
            {
                UserToken       = null;
                UserTokenExires = null;
            }
            else
            {
                UserToken       = loginResponse.Token;
                UserTokenExires = loginResponse.TokenExpires;
            }

            Login?.Invoke(this, loginResponse);
        }