public bool RegisterNewUser(bool licenceAgree, string login, string password, string passwordRetype)
 {
     var registerData = new RegisterData { LicenceAgree = licenceAgree, Login = login, Password = password, PasswordRetype = passwordRetype };
     var command = _registerFactory(registerData);
     CommandInvoker.Invoke(command);
     return true;
 }
 public void TryRegister(RegisterData registerData)
 {
     var client = new DatabaseConnectionServiceClient();
     var regiserResponse = client.Register(registerData.LicenceAgree, registerData.Login, registerData.Password, registerData.PasswordRetype);
     if (!regiserResponse.IsSuccessful)
         throw new InvalidRegisterException(regiserResponse.ErrorMessage);
 }