Пример #1
0
        public string GetContent()
        {
            var model = new ConstantCollectionTemplateModel
            {
                Header          = $"// {Program.BuildAutogenDisclaimer(this.collection.SourcePath)}",
                Namespace       = this.package,
                StringConstants = this.collection.StringConstants?.ToDictionary(pair => pair.Key.Camelize(), pair => pair.Value),
            };

            return(outputTemplate.Render(model, member => member.Name));
        }
Пример #2
0
        public string GetContent()
        {
            var model = new ConstantCollectionTemplateModel
            {
                AutogenDisclaimer = Program.BuildAutogenDisclaimer(_collection.SourcePath),
                Namespace         = _package,
                Constants         = _collection.Constants.ToDictionary(pair => pair.Key.Camelize(), pair => pair.Value)
            };

            return(OutputTemplate.Render(model, member => member.Name));
        }