static void GenerateResources(List <EccMaskModel> data, string resultsFolder) { var resources = data.Select(x => new List <StringResourceModel> { new StringResourceModel { Name = ToMaskNameResName(x.Mask), Description = "Название макси", Value = x.Mask }, new StringResourceModel { Name = ToSpanishResName(x.Mask), Description = x.Description, Value = x.SpanishDescription }, new StringResourceModel { Name = ToEnglishResName(x.Mask), Description = x.Description, Value = x.EnglishDescription }, new StringResourceModel { Name = ToRussianResName(x.Mask), Description = x.Description, Value = x.Description } }).SelectMany(x => x).ToList(); ExcelResourceGenerator.Generate(resources, $"{resultsFolder}/{MaskResourceName}.xlsx"); }
static void Generate(string codeGenFolder) { var uids = new[] { "Guids", "Masks", "OverdueDayTriggers", "Templates" }; ExcelResourceGenerator.Generate(uids.Select(x => new StringResourceModel { Name = x, Value = File.ReadAllText($"{codeGenFolder}/{x}.json") }).ToList(), $"{codeGenFolder}/CodeGenResurce.xlsx"); }
public static void GenerateOneTemplate(TemplateResourceGeneratorOptions opts) { ExcelResourceGenerator.Generate(opts.Resources, $"{opts.ResultsFolder}/{opts.ResourceFileName}.xlsx"); }