summaryrefslogtreecommitdiffstats
path: root/IO/FileReader.cs
blob: 52a9e87e8b05c10b255c8174d6102a69f224fdf2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
using System.IO;
using Interfaces;

namespace Graph.IO
{
    // class for reading from file using IFileReader (i.e. Dependancy injection for unit testing)
    public class FileReader : IFileReader
    {
        public string[] Lines { get; }

        public FileReader(string filename)
        {
            Lines = File.ReadAllLines(filename);
        }
    }
}