public RProjectLoadHooks(UnconfiguredProject unconfiguredProject , [ImportMany("Microsoft.VisualStudio.ProjectSystem.Microsoft.VisualStudio.Shell.Interop.IVsProject")] IEnumerable <Lazy <IVsProject> > cpsIVsProjects , IProjectLockService projectLockService , IRInteractiveWorkflowProvider workflowProvider , IInteractiveWindowComponentContainerFactory componentContainerFactory , IRToolsSettings toolsSettings , IThreadHandling threadHandling , ISurveyNewsService surveyNews , [Import(AllowDefault = true)] IProjectItemDependencyProvider dependencyProvider , ICoreShell coreShell) { _unconfiguredProject = unconfiguredProject; _cpsIVsProjects = cpsIVsProjects; _projectLockService = projectLockService; _workflowProvider = workflowProvider; _toolsSettings = toolsSettings; _threadHandling = threadHandling; _surveyNews = surveyNews; _dependencyProvider = dependencyProvider; _coreShell = coreShell; _projectDirectory = unconfiguredProject.GetProjectDirectory(); unconfiguredProject.ProjectRenamedOnWriter += ProjectRenamedOnWriter; unconfiguredProject.ProjectUnloading += ProjectUnloading; _fileWatcher = new MsBuildFileSystemWatcher(_projectDirectory, "*", 25, 1000, _coreShell.Services.FileSystem, new RMsBuildFileSystemFilter(), coreShell.Services.Log); _fileWatcher.Error += FileWatcherError; Project = new FileSystemMirroringProject(unconfiguredProject, projectLockService, _fileWatcher, _dependencyProvider, coreShell.Services.Log); }
public FileSystemMirroringProject(UnconfiguredProject unconfiguredProject, IProjectLockService projectLockService, MsBuildFileSystemWatcher fileSystemWatcher, IProjectItemDependencyProvider dependencyProvider, IActionLog log) { _unconfiguredProject = unconfiguredProject; _projectLockService = projectLockService; _fileSystemWatcher = fileSystemWatcher; _dependencyProvider = dependencyProvider; _log = log; _unloadCancellationToken = _unconfiguredProject.Services.ProjectAsynchronousTasks.UnloadCancellationToken; _projectDirectory = _unconfiguredProject.GetProjectDirectory(); _inMemoryImportFullPath = _unconfiguredProject.GetInMemoryTargetsFileFullPath(); _fileItems = new Dictionary<string, ProjectItemElement>(StringComparer.OrdinalIgnoreCase); _directoryItems = new Dictionary<string, ProjectItemElement>(StringComparer.OrdinalIgnoreCase); var changesHandler = new Func<MsBuildFileSystemWatcher.Changeset, Task>(FileSystemChanged); _fileSystemWatcher.SourceBlock.LinkTo(new ActionBlock<MsBuildFileSystemWatcher.Changeset>(changesHandler)); }
public FileSystemMirroringProject(UnconfiguredProject unconfiguredProject, IProjectLockService projectLockService, MsBuildFileSystemWatcher fileSystemWatcher, IProjectItemDependencyProvider dependencyProvider, IActionLog log = null) { _unconfiguredProject = unconfiguredProject; _projectLockService = projectLockService; _fileSystemWatcher = fileSystemWatcher; _dependencyProvider = dependencyProvider; _log = log ?? ProjectSystemActionLog.Default; _unloadCancellationToken = _unconfiguredProject.Services.ProjectAsynchronousTasks.UnloadCancellationToken; _projectDirectory = _unconfiguredProject.GetProjectDirectory(); _inMemoryImportFullPath = _unconfiguredProject.GetInMemoryTargetsFileFullPath(); _fileItems = new Dictionary <string, ProjectItemElement>(StringComparer.OrdinalIgnoreCase); _directoryItems = new Dictionary <string, ProjectItemElement>(StringComparer.OrdinalIgnoreCase); var changesHandler = new Func <MsBuildFileSystemWatcher.Changeset, Task>(FileSystemChanged); _fileSystemWatcher.SourceBlock.LinkTo(new ActionBlock <MsBuildFileSystemWatcher.Changeset>(changesHandler)); }
public RProjectLoadHooks(UnconfiguredProject unconfiguredProject , [ImportMany("Microsoft.VisualStudio.ProjectSystem.Microsoft.VisualStudio.Shell.Interop.IVsProject")] IEnumerable <Lazy <IVsProject> > cpsIVsProjects , IProjectLockService projectLockService , IThreadHandling threadHandling , [Import(AllowDefault = true)] IProjectItemDependencyProvider dependencyProvider , ICoreShell coreShell) { _unconfiguredProject = unconfiguredProject; _cpsIVsProjects = cpsIVsProjects; _projectLockService = projectLockService; _settings = coreShell.GetService <IRSettings>(); _threadHandling = threadHandling; _coreShell = coreShell; _projectDirectory = unconfiguredProject.GetProjectDirectory(); unconfiguredProject.ProjectRenamedOnWriter += ProjectRenamedOnWriter; unconfiguredProject.ProjectUnloading += ProjectUnloading; _fileWatcher = new MsBuildFileSystemWatcher(_projectDirectory, "*", 25, 1000, _coreShell.FileSystem(), new RMsBuildFileSystemFilter(), coreShell.Log()); _fileWatcher.Error += FileWatcherError; Project = new FileSystemMirroringProject(unconfiguredProject, projectLockService, _fileWatcher, dependencyProvider, coreShell.Log()); }
public RProjectLoadHooks(UnconfiguredProject unconfiguredProject , [ImportMany("Microsoft.VisualStudio.ProjectSystem.Microsoft.VisualStudio.Shell.Interop.IVsProject")] IEnumerable<Lazy<IVsProject>> cpsIVsProjects , IProjectLockService projectLockService , IRInteractiveWorkflowProvider workflowProvider , IInteractiveWindowComponentContainerFactory componentContainerFactory , IRToolsSettings toolsSettings , IThreadHandling threadHandling , ISurveyNewsService surveyNews , [Import(AllowDefault = true)] IProjectItemDependencyProvider dependencyProvider , ICoreShell coreShell) { _unconfiguredProject = unconfiguredProject; _cpsIVsProjects = cpsIVsProjects; _projectLockService = projectLockService; _workflowProvider = workflowProvider; _toolsSettings = toolsSettings; _threadHandling = threadHandling; _surveyNews = surveyNews; _dependencyProvider = dependencyProvider; _coreShell = coreShell; _projectDirectory = unconfiguredProject.GetProjectDirectory(); unconfiguredProject.ProjectRenamedOnWriter += ProjectRenamedOnWriter; unconfiguredProject.ProjectUnloading += ProjectUnloading; _fileWatcher = new MsBuildFileSystemWatcher(_projectDirectory, "*", 25, 1000, _coreShell.Services.FileSystem, new RMsBuildFileSystemFilter(), coreShell.Services.Log); _fileWatcher.Error += FileWatcherError; Project = new FileSystemMirroringProject(unconfiguredProject, projectLockService, _fileWatcher, _dependencyProvider, coreShell.Services.Log); }