private void HandleLogin(MethodResponse response) { LoginResponse loginResponse = response.Get <LoginResponse>(); loginResponse.Error = response.Error; Login?.Invoke(this, loginResponse); }
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); }