public void Extract(string zipLocation) { PasswordService _passwordService = new PasswordService(); ZipFile zip = ZipFile.Read($"{zipLocation}\\{ZIP_FILE_NAME}"); bool check = false; while (!check) { Console.WriteLine("Please enter the password:"******"{zipLocation}\\{Configurations.TEMP_EXTRACT_FOLDER}", ExtractExistingFileAction.OverwriteSilently, password ); if (!check) { check = true; } } Console.Clear(); } catch (BadPasswordException e) { Console.WriteLine(); _logger.Error(e.Message); } } }
public void Start() { while (true) { ShowMenu(); try { if (!MenuFunctions()) { break; } else { Console.Clear(); } } catch (MyException e) { Console.Clear(); _logger.Error($"{e.Message}"); } } }