Пример #1
0
        protected override ProjectNode CreateProject()
        {
            var project = new PuppetProjectNode();

            project.SetSite((IServiceProvider)((System.IServiceProvider) this.package).GetService(typeof(IServiceProvider)));
            return(project);
        }
Пример #2
0
        internal FilesToPack GetActiveProjectStruture(out PuppetProjectNode puppetProjectNode)
        {
            // Get selected project
            var projects = this.DteService.ActiveSolutionProjects as Array;

            if (null == projects || projects.Length <= 0)
            {
                throw new NullReferenceException(Resources.NoActivePuppetModule);
            }

            var project = projects.GetValue(0) as OAProject;

            if (project == null)
            {
                throw new NullReferenceException(Resources.NoActivePuppetModule);
            }

            puppetProjectNode = project.Project as PuppetProjectNode;

            if (null == puppetProjectNode)
            {
                throw new NullReferenceException(Resources.SelectedProjectIsNotAPuppetModule);
            }

            return(this.GetFileStructure(project));
        }
Пример #3
0
        private static ForgeData TurnIntoDict(PuppetProjectNode puppetProjectNode)
        {
            var forgeData = new ForgeData
            {
                { Conatants.PuppetForgeUserName, puppetProjectNode.ProjectMgr.GetProjectProperty(Conatants.PuppetForgeUserName, false) },
                { Conatants.PuppetForgeModuleName, puppetProjectNode.ProjectMgr.GetProjectProperty(Conatants.PuppetForgeModuleName, false) },
                { Conatants.PuppetForgeModuleVersion, puppetProjectNode.ProjectMgr.GetProjectProperty(Conatants.PuppetForgeModuleVersion, false) },
                { Conatants.PuppetForgeModuleDependency, puppetProjectNode.ProjectMgr.GetProjectProperty(Conatants.PuppetForgeModuleDependency, false) },
                { Conatants.PuppetForgeModuleSummary, puppetProjectNode.ProjectMgr.GetProjectProperty(Conatants.PuppetForgeModuleSummary, false) },
                { Conatants.PuppetForgeModuleDescription, puppetProjectNode.ProjectMgr.GetProjectProperty(Conatants.PuppetForgeModuleDescription, false) },
            };

            return(forgeData);
        }