public FilterFromFileController() { string webRootPath = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location); string folder = Path.Combine(webRootPath, "wwwroot/json"); string fileName = "task3.json"; _ratesFilterOperation = new RatesFilterOperation(folder, fileName); }
public FilterFromStreamController() { string webRootPath = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location); string folder = Path.Combine(webRootPath, "wwwroot/json"); string fileName = "task3.json"; var fileStream = new FileStream(Path.Combine(folder, fileName), FileMode.Open, FileAccess.Read); _ratesFilterOperation = new RatesFilterOperation(fileStream); }
public FilterFromStringController() { string webRootPath = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location); string folder = Path.Combine(webRootPath, "wwwroot/json"); string fileName = "task3.json"; var jsonString = System.IO.File.ReadAllText(Path.Combine(folder, fileName)); _ratesFilterOperation = new RatesFilterOperation(jsonString); }