public int GetCount(string path)
        {
            ILinesCounter linesCounter;

            if (pathType == PathType.File)
            {
                linesCounter = new FileLinesCounter();
            }
            else if (pathType == PathType.Directory)
            {
                linesCounter = new DirectoryLinesCounter(new FileLinesCounter(), fileExtensions);
            }
            else
            {
                throw new ArgumentOutOfRangeException(nameof(pathType));
            }

            return(linesCounter.GetCount(path));
        }
 public DirectoryLinesCounter(FileLinesCounter fileLinesCounter, IEnumerable <string> fileExtensions)
 {
     this.fileLinesCounter = fileLinesCounter;
     this.fileExtensions   = fileExtensions;
 }