public ProjectExplorerViewModel(IProjectExplorerItemViewModelFactory projectExplorerItemViewModelFactory, IProjectService projectService) { _projectExplorerItemViewModelFactory = projectExplorerItemViewModelFactory; _projectService = projectService; _projectService.CurrentProjectChanged += OnCurrentProjectChanged; }
public ProjectRootViewModel(IProject project, IProjectExplorerItemViewModelFactory factory, IAddContextMenuItemFactory addContextMenuItemFactory) : base(project.ProjectName) { _project = project; _factory = factory; UpdateItems(_factory.Create(project.Folders, project.Files)); ContextMenuItems.Add(addContextMenuItemFactory.Create(_project)); project.FolderAdded += OnProjectItemsChanged; project.FileAdded += OnProjectItemsChanged; }
public FolderViewModel(IProjectFolder folder, IProjectExplorerItemViewModelFactory factory, IAddContextMenuItemFactory addContextMenuItemFactory) : base(folder.FolderName) { _folder = folder; _factory = factory; UpdateItems(_factory.Create(_folder.Folders, _folder.Files)); ContextMenuItems.Add(addContextMenuItemFactory.Create(folder)); folder.FolderAdded += OnFolderItemsChanged; folder.FileAdded += OnFolderItemsChanged; }
public void SetUp() { _projectExplorerItemViewModelFactory = Substitute.For <IProjectExplorerItemViewModelFactory>(); _projectService = Substitute.For <IProjectService>(); _addContextMenuItemFactory = Substitute.For <IAddContextMenuItemFactory>(); }