예제 #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();
        }
예제 #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();
        }
예제 #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;
            }
예제 #7
0
 public ProjectTypeGuidIndexer([NotNull] ProjectConfiguration configuration)
 {
     _configuration = configuration;
 }
예제 #8
0
            public PropertyValueIndexer(ProjectConfiguration projectConfiguration)
            {
                Contract.Requires(projectConfiguration != null);

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

                _projectConfiguration = projectConfiguration;
            }