Exemplo n.º 1
0
        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");
        }
Exemplo n.º 2
0
        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");
        }
Exemplo n.º 3
0
 public static void GenerateOneTemplate(TemplateResourceGeneratorOptions opts)
 {
     ExcelResourceGenerator.Generate(opts.Resources, $"{opts.ResultsFolder}/{opts.ResourceFileName}.xlsx");
 }