상속: IVsCfg, IVsProjectCfg, IVsProjectCfg2, IVsProjectFlavorCfg, IVsDebuggableProjectCfg, ISpecifyPropertyPages, IVsSpecifyProjectDesignerPages, IVsCfgBrowseObject
예제 #1
0
        /// <summary>
        ///     Constructor for IVSOutputGroup2 implementation
        /// </summary>
        /// <param name="outputName">
        ///     Name of the output group. See VS_OUTPUTGROUP_CNAME_Build in vsshell.idl for the list of
        ///     standard values
        /// </param>
        /// <param name="msBuildTargetName">MSBuild target name</param>
        /// <param name="projectManager">Project that produce this output</param>
        /// <param name="configuration">Configuration that produce this output</param>
        public OutputGroup(string outputName, string msBuildTargetName, ProjectNode projectManager,
            ProjectConfig configuration)
        {
            if (outputName == null)
                throw new ArgumentNullException("outputName");
            if (msBuildTargetName == null)
                throw new ArgumentNullException("outputName");
            if (projectManager == null)
                throw new ArgumentNullException("projectManager");
            if (configuration == null)
                throw new ArgumentNullException("configuration");

            name = outputName;
            TargetName = msBuildTargetName;
            Project = projectManager;
            ProjectCfg = configuration;
        }
예제 #2
0
 public BuildableProjectConfig(ProjectConfig config)
 {
     this.config = config;
 }
예제 #3
0
        public virtual void SetObjects(uint count, object[] punk)
        {
            if (punk == null)
            {
                return;
            }

            if (count > 0)
            {
                if (punk[0] is ProjectConfig)
                {
                    var configs = new ArrayList();

                    for (var i = 0; i < count; i++)
                    {
                        var config = (ProjectConfig) punk[i];

                        if (ProjectMgr == null || (ProjectMgr != (punk[0] as ProjectConfig).ProjectMgr))
                        {
                            ProjectMgr = config.ProjectMgr;
                        }

                        configs.Add(config);
                    }

                    projectConfigs = (ProjectConfig[]) configs.ToArray(typeof (ProjectConfig));
                }
                else if (punk[0] is NodeProperties)
                {
                    if (ProjectMgr == null || (ProjectMgr != (punk[0] as NodeProperties).Node.ProjectMgr))
                    {
                        ProjectMgr = (punk[0] as NodeProperties).Node.ProjectMgr;
                    }

                    var configsMap = new Dictionary<string, ProjectConfig>();

                    for (var i = 0; i < count; i++)
                    {
                        var property = (NodeProperties) punk[i];
                        IVsCfgProvider provider;
                        ErrorHandler.ThrowOnFailure(property.Node.ProjectMgr.GetCfgProvider(out provider));
                        var expected = new uint[1];
                        ErrorHandler.ThrowOnFailure(provider.GetCfgs(0, null, expected, null));
                        if (expected[0] > 0)
                        {
                            var configs = new ProjectConfig[expected[0]];
                            var actual = new uint[1];
                            ErrorHandler.ThrowOnFailure(provider.GetCfgs(expected[0], configs, actual, null));

                            foreach (var config in configs)
                            {
                                if (!configsMap.ContainsKey(config.ConfigName))
                                {
                                    configsMap.Add(config.ConfigName, config);
                                }
                            }
                        }
                    }

                    if (configsMap.Count > 0)
                    {
                        if (projectConfigs == null)
                        {
                            projectConfigs = new ProjectConfig[configsMap.Keys.Count];
                        }
                        configsMap.Values.CopyTo(projectConfigs, 0);
                    }
                }
            }
            else
            {
                ProjectMgr = null;
            }

            if (active && ProjectMgr != null)
            {
                UpdateObjects();
            }
        }
예제 #4
0
 public ProjectConfigProperties(ProjectConfig projectConfig)
 {
     this.projectConfig = projectConfig;
 }