public static bool InputHonorsDiplomaStatus() { Console.WriteLine("Do you have honors diploma? (y/n)"); var resp = UserHelper.GetString("Input can not be empty"); return(resp[0] == 'y'); }
public static string InputLink() { Console.WriteLine("Link: "); while (true) { var link = UserHelper.GetString("Link can not be empty"); if (ExceptionHandle.Handle(UserHelper.ValidateLink, link)) { return(link); } } }
public static DateTime InputDateTime(string message) { Console.WriteLine(message); while (true) { var str = UserHelper.GetString("Datetime can not be empty!"); var result = DateTime.TryParse(str, out DateTime dateTime); if (result) { return(dateTime); } LoggerPublisher.OnLogError("Invalid date time format!"); } }
public static string InputData(string dataName) { Console.WriteLine($"{dataName}: "); return(UserHelper.GetString($"{dataName}: can not be empty")); }