public OnDiskMergeRepository(DacParserBuilder dacParserBuilder, VsProject project) { _dacParserBuilder = dacParserBuilder; _project = project; BuildScriptGateways(); }
public SolutionParser(ProjectEnumerator projectEnumerator, DacParserBuilder dacParserBuilder, IStatus statusDisplay) { var stopwatch = new Stopwatch(); stopwatch.Start(); statusDisplay.SetStatus("Finding Sql Projects..."); var projects = projectEnumerator.EnumerateProjects(); int count = 1; if (DebugLogging.Enable) { OutputWindowMessage.WriteMessage("Solution: Found {0} projects", projects.Count); } foreach (var project in projects) { statusDisplay.SetStatus(string.Format("Enumerating project {0} of {1} - project: {2}", count++, projects.Count, project.Name)); if (!File.Exists(project.DacPath)) { if (DebugLogging.Enable) { OutputWindowMessage.WriteMessage("Solution: Did not find dacpac for project - path: {0}", project.DacPath); } continue; } var dac = dacParserBuilder.Build(project.DacPath); _projectList.Add(project.Name); _projects.Add(project.Name, new VsProject(project.PreDeployScriptPath, project.PostDeployScriptPath, dac.GetTableDefinitions(), project.Name, File.GetLastWriteTime(project.DacPath))); } stopwatch.Stop(); statusDisplay.SetStatus(string.Format("Complete...Process took {0} seconds", stopwatch.ElapsedMilliseconds / 1000)); if (DebugLogging.Enable) { OutputWindowMessage.WriteMessage("Solution: Enumerate Complete...Process took {0} seconds", stopwatch.ElapsedMilliseconds / 1000); } }