Пример #1
0
        //public string Read(string filePath, string key)
        //{
        //    if (!File.Exists(filePath))
        //        throw new Exception("File does not exist");

        //    string[] lines = File.ReadAllLines(filePath);
        //    return lines[0];
        //}

        public string Read(string filePath, string key)
        {
            if (_fileAdapter.Exists(filePath))
            {
                throw new FileNotFoundException("File does not exist");
            }

            string[] lines = _fileAdapter.ReadAllLines(filePath);
            return(lines[0]);
        }