// Public methods ---------------------------------------------------------------------------------------------------------------------------------- public void ProcessAndDisplayTheReadLogs() { Console.WriteLine("To display all logs, press '1' \nATo display only your logs, press '2'"); char decision = Console.ReadKey().KeyChar; switch (decision) { case '1': displayLogs(UserChoice.AllLogs); break; case '2': displayLogs(UserChoice.CurrentUserLogs); break; default: HelperService.GetInstance().ClearConsoleAndWriteMessage("Incorrect choice"); Thread.Sleep(1000); break; } Console.ReadKey(); LoggerService.GetInstance().ChooseNewAction(); }
public void SetServices(ILoggerService service, IHelperService hservice) { _service = service ?? LoggerService.GetInstance(); _helperService = hservice ?? HelperService.GetInstance(); }