private void OrganizeData() { return; _variantData = File.ReadAllLines(@"" + _destinationPath) .Skip(1) .Select(t => VariantData.FromCsv(t, ';')) .Where(y => y != null) .ToList(); }
private void OrganizeData() { FileInfo fileInfo = new FileInfo(@"" + _destinationPath); if (fileInfo == null) { throw new IOException("No file found here: @" + _destinationPath); } if (FileHelper.IsFileLocked(fileInfo) == false) { _variantData = File.ReadAllLines(@"" + _destinationPath) .Skip(1) .Select(t => VariantData.FromCsv(t, ';')) .Where(y => y != null) .ToList(); } else { _logger.Warning("File was locked, probably because its beeing written to by IntersurfScheduleFetcher. Its ok, we run later again."); } }