示例#1
0
        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);
        }
示例#2
0
        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);
        }
示例#3
0
        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);
        }