private ILuckyTicketCounterAlgorithm[] GetAlgorithmsFromFile() { string path; PathValidator _pathValidator = new PathValidator(); AlgorythmTypeValidator _typeValidator = new AlgorythmTypeValidator(); do { path = _viewer.GetUserAnswerOnQuestion(GET_FILE_PATH + GET_FILE_PATH_PART_TWO); if (string.IsNullOrWhiteSpace(path)) { throw new ArgumentNullException(); } } while (!_pathValidator.IsFilePathValid(path)); return(_typeValidator.GetAlgorythmType(_pathValidator.GetFileString(path))); }