private Project([NotNull] Solution solution, [NotNull] string fullName, [NotNull] IVsHierarchy projectHierarchy) { Solution = solution; FullName = fullName; ProjectHierarchy = projectHierarchy; ProjectFile = new ProjectFile(solution, this); DefaultProjectConfiguration = new ProjectConfiguration(this, null, null); SpecificProjectConfigurations = new ReadOnlyObservableCollection <ProjectConfiguration>(_internalSpecificProjectConfigurations); ProjectConfigurations = ObservableCompositeCollection.FromSingleItemAndList(DefaultProjectConfiguration, _internalSpecificProjectConfigurations); IsProjectTypeGuidSelected = new ProjectTypeGuidIndexer(DefaultProjectConfiguration); Update(); }
private Project([NotNull] Solution solution, [NotNull] string fullName, [NotNull] IVsHierarchy projectHierarchy) { Contract.Requires(solution != null); Contract.Requires(projectHierarchy != null); _solution = solution; _fullName = fullName; _projectHierarchy = projectHierarchy; _projectFile = new ProjectFile(solution, this); _defaultProjectConfiguration = new ProjectConfiguration(this, null, null); _specificProjectConfigurations = new ReadOnlyObservableCollection <ProjectConfiguration>(_internalSpecificProjectConfigurations); _projectConfigurations = ObservableCompositeCollection.FromSingleItemAndList(_defaultProjectConfiguration, _internalSpecificProjectConfigurations); _isProjectTypeGuidSelected = new ProjectTypeGuidIndexer(_defaultProjectConfiguration); CommandManager.RequerySuggested += (_, __) => OnPropertyChanged(nameof(IsSaved)); Update(); }
private Project(Solution solution, EnvDTE.Project project) { Contract.Requires(solution != null); Contract.Requires(project != null); Contract.Requires(!string.IsNullOrEmpty(project.FullName)); Contract.Requires(!string.IsNullOrEmpty(project.UniqueName)); _solution = solution; _project = project; _uniqueName = _project.UniqueName; _name = _project.Name; _fullName = _project.FullName; _projectFile = new ProjectFile(solution, this); _defaultProjectConfiguration = new ProjectConfiguration(this, null, null); _specificProjectConfigurations = new ReadOnlyObservableCollection <ProjectConfiguration>(_internalSpecificProjectConfigurations); _solutionContexts = _solution.SolutionContexts.ObservableWhere(context => context.ProjectName == _uniqueName); _projectConfigurations = ObservableCompositeCollection.FromSingleItemAndList(_defaultProjectConfiguration, _internalSpecificProjectConfigurations); _isProjectTypeGuidSelected = new ProjectTypeGuidIndexer(_defaultProjectConfiguration); Update(); }