private string GetHostFilesLineFor(TemplateHostFile hostFile)
        {
            if (hostFile == null)
            {
                return(string.Empty);
            }
            var sb = new StringBuilder();

            // template-pack-id,template-name,icon,learn-more-link,ui-filters,minfullframeworkversion,local-file-path
            sb.Append(ReplaceComma(hostFile.TempaltePackId));
            sb.Append(",");
            sb.Append(ReplaceComma(hostFile.TemplateName));
            sb.Append(",");
            sb.Append(ReplaceComma(hostFile.Icon));
            sb.Append(",");
            sb.Append(ReplaceComma(hostFile.LearnMoreLink));
            sb.Append(",");
            sb.Append(ReplaceComma(string.Join(';', hostFile.UiFilters)));
            sb.Append(",");
            sb.Append(ReplaceComma(hostFile.MinFullFrameworkVersion));
            sb.Append(",");
            sb.Append(ReplaceComma(hostFile.LocalFilePath));
            sb.Append(",");
            sb.Append(ReplaceComma(hostFile.TemplateLocalFilePath));


            return(sb.ToString());
        }
Esempio n. 2
0
        private static void DoDemo()
        {
            //var r = TemplateHostFile.CreateFromFile(@"C:\Users\sayedha\AppData\Local\templatereport\extracted\piral.blazor.template.0.1.2.nupkg\content\content\.template.config\vs-2017.3.host.json");
            var r2 = TemplateHostFile.CreateFromFile(@"C:\data\mycode\OSS\aspnetcore\src\ProjectTemplates\Web.ProjectTemplates\content\RazorPagesWeb-CSharp\.template.config\vs-2017.3.host.json");

            Console.WriteLine("Done");
        }