Exemple #1
0
        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();
        }
        public bool SetConfiguration([NotNull] ProjectConfiguration configuration)
        {
            Contract.Requires(configuration != null);

            if ((ConfigurationName == configuration.Configuration) && (PlatformName == configuration.Platform))
            {
                return(false);
            }

            if (!ContextIsValid())
            {
                return(false);
            }

            _context.ConfigurationName = configuration.Configuration + "|" + configuration.Platform;

            ConfigurationName = _context.ConfigurationName;
            PlatformName      = _context.PlatformName;

            return(true);
        }
        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();
        }
Exemple #4
0
        internal 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);

            Update();
        }
Exemple #5
0
        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();
        }
            public ProjectTypeGuidIndexer([NotNull] ProjectConfiguration configuration)
            {
                Contract.Requires(configuration != null);

                _configuration = configuration;
            }
Exemple #7
0
 public ProjectTypeGuidIndexer([NotNull] ProjectConfiguration configuration)
 {
     _configuration = configuration;
 }
Exemple #8
0
            public PropertyValueIndexer(ProjectConfiguration projectConfiguration)
            {
                Contract.Requires(projectConfiguration != null);

                _projectConfiguration = projectConfiguration;
            }
Exemple #9
0
            public ShouldBuildIndexer(ProjectConfiguration projectConfiguration)
            {
                Contract.Requires(projectConfiguration != null);

                _projectConfiguration = projectConfiguration;
            }