public int CreateProjectFlavorCfg(IVsCfg pBaseProjectCfg, out IVsProjectFlavorCfg ppFlavorCfg)
        {
            IVsProjectFlavorCfg cfg;
            ErrorHandler.ThrowOnFailure(
                _innerVsProjectFlavorCfgProvider.CreateProjectFlavorCfg(
                    pBaseProjectCfg,
                    out cfg
                )
            );

            ppFlavorCfg = _config = new NodejsUwpProjectFlavorCfg(this, pBaseProjectCfg, cfg);
            return VSConstants.S_OK;
        }
        public int CreateProjectFlavorCfg(IVsCfg pBaseProjectCfg, out IVsProjectFlavorCfg ppFlavorCfg)
        {
            IVsProjectFlavorCfg cfg;

            ErrorHandler.ThrowOnFailure(
                _innerVsProjectFlavorCfgProvider.CreateProjectFlavorCfg(
                    pBaseProjectCfg,
                    out cfg
                    )
                );

            ppFlavorCfg = new NodejsUwpProjectFlavorCfg(this, pBaseProjectCfg, cfg);
            return(VSConstants.S_OK);
        }
示例#3
0
        /// <summary>
        /// Use the data passed in to initialize the Properties.
        /// </summary>
        /// <param name="dataObject">
        /// This is normally only one our configuration object, which means that
        /// there will be only one elements in configs.
        /// If it is null, we should release it.
        /// </param>
        public void Initialize(object[] dataObjects)
        {
            // If we are editing multiple configuration at once, we may get multiple objects.
            foreach (object dataObject in dataObjects)
            {
                if (dataObject is IVsCfg)
                {
                    // This should be our configuration object, so retrive the specific
                    // class so we can access its properties.
                    NodejsUwpProjectFlavorCfg config = NodejsUwpProjectFlavorCfg
                                                       .GetPropertyPageFromIVsCfg((IVsCfg)dataObject);

                    if (!configs.Contains(config))
                    {
                        configs.Add(config);
                    }
                }
            }
        }