示例#1
0
        //TemplateExtensionNode template;

        internal MicrosoftTemplateEngineSolutionTemplate(TemplateExtensionNode template, ITemplateInfo templateInfo)
            : base(template.Id, template.OverrideName ?? templateInfo.Name, template.Icon)
        {
            this.templateInfo = templateInfo;
            Description       = template.OverrideDescription ?? templateInfo.Description;
            Category          = template.Category;
            ICacheTag languageTag;

            if (templateInfo.Tags.TryGetValue("language", out languageTag))
            {
                Language = languageTag.DefaultValue;
            }
            else
            {
                Language = string.Empty;
            }
            GroupId = template.GroupId ?? templateInfo.GroupIdentity;
            //TODO: Support all this params
            Condition = template.Condition;
            //ProjectFileExtension = template.FileExtension;
            Wizard = template.Wizard;
            SupportedParameters = template.SupportedParameters;
            DefaultParameters   = template.DefaultParameters;
            ImageId             = template.ImageId;
            //ImageFile = template.ImageFile;
            //Visibility = GetVisibility (template.Visibility);

            //HasProjects = (template.SolutionDescriptor.EntryDescriptors.Length > 0);
        }
示例#2
0
        internal MicrosoftTemplateEngineSolutionTemplate(TemplateExtensionNode template, ITemplateInfo templateInfo)
            : base(template.Id, template.OverrideName ?? templateInfo.Name, template.Icon)
        {
            this.templateInfo = templateInfo;
            Description       = ParseDescription(template.OverrideDescription) ?? templateInfo.Description;
            Category          = template.Category;
            Language          = template.OverrideLanguage ?? MicrosoftTemplateEngine.GetLanguage(templateInfo);
            GroupId           = template.GroupId ?? templateInfo.GroupIdentity;
            //TODO: Support all this params
            Condition = template.Condition;
            //ProjectFileExtension = template.FileExtension;
            Wizard = template.Wizard;
            SupportedParameters   = template.SupportedParameters;
            DefaultParameters     = MicrosoftTemplateEngine.MergeDefaultParameters(template.DefaultParameters, templateInfo);
            ImageId               = template.ImageId;
            FileFormattingExclude = template.FileFormatExclude;
            //ImageFile = template.ImageFile;
            //Visibility = GetVisibility (template.Visibility);

            //HasProjects = (template.SolutionDescriptor.EntryDescriptors.Length > 0);
        }