/// <summary> /// Create, if necessary, the solution folder for the Blackboard /// Adds an empty Blackboard data file when the folder is created /// </summary> /// <param name="solution">The current VS Solution abstraction from import</param> /// <returns>Path to Solution</returns> private string ProcessSolutionFolder(ISolution solution) { ISolutionFolder blackboardFolder = null; bool solutionFolderExists = false; foreach (var item in solution.Items) { if (item.Name == solutionFolderName) { solutionFolderExists = true; blackboardFolder = item as ISolutionFolder; break; } } if (!solutionFolderExists) { blackboardFolder = solution.CreateSolutionFolder(solutionFolderName); blackboardFolder.AddContent(emptyDictionary, solution.Name + defaultBlackboardFileNameBase, false, false); } else { // // Ok, the solution folder exists, let's see if our file exists // string bbFileName = Path.Combine(Path.GetDirectoryName(solution.PhysicalPath), solution.Name + defaultBlackboardFileNameBase); if (!File.Exists(bbFileName)) { blackboardFolder.AddContent(emptyDictionary, solution.Name + defaultBlackboardFileNameBase, false, false); } } return(Path.Combine(Path.GetDirectoryName(solution.PhysicalPath), solution.Name + defaultBlackboardFileNameBase)); }
/// <summary> /// Create, if necessary, the solution folder for the Blackboard /// Adds an empty Blackboard data file when the folder is created /// </summary> /// <param name="solution">The current VS Solution abstraction from import</param> /// <returns>Path to Solution</returns> private string ProcessSolutionFolder(ISolution solution) { ISolutionFolder blackboardFolder = null; bool solutionFolderExists = false; foreach (var item in solution.Items) { if (item.Name == solutionFolderName) { solutionFolderExists = true; blackboardFolder = item as ISolutionFolder; break; } } if (!solutionFolderExists) { blackboardFolder = solution.CreateSolutionFolder(solutionFolderName); blackboardFolder.AddContent(emptyDictionary, solution.Name + defaultBlackboardFileNameBase, false, false); } else { // // Ok, the solution folder exists, let's see if our file exists // string bbFileName = Path.Combine(Path.GetDirectoryName(solution.PhysicalPath), solution.Name + defaultBlackboardFileNameBase); if (!File.Exists(bbFileName)) { blackboardFolder.AddContent(emptyDictionary, solution.Name + defaultBlackboardFileNameBase, false, false); } } return Path.Combine(Path.GetDirectoryName(solution.PhysicalPath), solution.Name + defaultBlackboardFileNameBase); }