public DateTime GetActualityDate(string subDirectory) { var fileName = fileNameFinder.FindName(subDirectory); var dateString = Regex.Match(fileName, regex).Groups[1].Value; return(DateTime.ParseExact(dateString, dateFormat, CultureInfo.InvariantCulture)); }
public VisaInfo[] Read(VisaInfoFilter filter) { var fileName = actualFileNameFinder.FindName(filter.City); var visaStrings = File.ReadLines(fileName); return(visaStrings .Select(x => new VisaInfo(x)) .ToArray()); }