/// <summary> /// Gets the files contained in a directory /// </summary> /// <param name="dir"></param> /// <param name="recursive"></param> /// <returns></returns> public static IEnumerable <ITestSourceFile> GetFiles( this ITestSourceDir dir, bool recursive = false) => dir.GetItems(recursive).OfType <ITestSourceFile>();
/// <summary> /// Initializes a new instance of the TestSourceDir class, which acts as a wrapper /// for a TestSources directory. /// </summary> /// <param name="path"></param> /// <param name="parent"></param> public TestSourceDir(string path, ITestSourceDir parent) { _dirInfo = new DirectoryInfo(path); _parent = parent; }
/// <summary> /// Initializes a new instance of the TestSourceFile class, which acts as a wrapper /// for a TestSources file. /// </summary> /// <param name="fileName"></param> /// <param name="parent"></param> public TestSourceFile(string fileName, ITestSourceDir parent) { _fileInfo = new FileInfo(fileName); _parent = parent; //Parent = parent; }