// Connstructor that sets the private member variables public FolderValidator(FolderStatus folderStatus, string folderTree, string root, ReportList reportList) { _folderStatus = folderStatus; _folderTreePathAndFile = Environment.CurrentDirectory + @"\FolderTrees\" + folderTree; _folderTreePathAndFile = _folderTreePathAndFile.Replace(@"\bin", "").Replace(@"\Debug", "").Replace(@"\Release", ""); _reportList = reportList; _root = root; }
/// <summary> /// The Constructor sets the three private member variables used by ControllerActionValidator and /// fills _razorFolders with each Razor folder contained in the text file nameed folderFilename /// </summary> /// <param name="folderFilename"></param> /// <param name="razorPath"></param> /// <param name="reportList"></param> public ControllerActionValidator(string folderFilename, string razorPath, ReportList reportList) { // replaces the UNIX / with a DOS \ _razorPath = razorPath.Replace('/', '\\'); _reportList = reportList; var file = new System.IO.StreamReader(folderFilename); string controllerPath = null; while ((controllerPath = file.ReadLine()) != null) { _razorFolders.Add(controllerPath); } file.Close(); }