public static List <ForecastingData> GetForecastingDataFromLocal(string fileName) { string sourceFile = $"{Environment.CurrentDirectory}\\Datasets\\{fileName}.csv"; return(File.ReadAllLines(sourceFile) .Skip(1) .Select(line => ForecastingData.FromCsv(line)) .ToList()); }
public static List <ForecastingData> GetForecastingDataFromLocal(string fileName) { //set path based on OS string sourceFile = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? $"{Environment.CurrentDirectory}\\Datasets\\{fileName}.csv" : sourceFile = $"{Environment.CurrentDirectory}//Datasets//{fileName}.csv"; return(File.ReadAllLines(sourceFile) .Skip(1) .Select(line => ForecastingData.FromCsv(line)) .ToList()); }