예제 #1
0
        /// <inheritdoc />
        protected override string GenerateFile(CodeArtifactCollection artifactCollection)
        {
            var model = new FileTemplateModel
            {
                Namespace = Settings.Namespace ?? string.Empty,
                TypesCode = artifactCollection.Concatenate()
            };

            var template = Settings.TemplateFactory.CreateTemplate("CSharp", "File", model);

            return(ConversionUtilities.TrimWhiteSpaces(template.Render()));
        }
예제 #2
0
        /// <summary>Generates the file.</summary>
        /// <returns>The file contents.</returns>
        protected override string GenerateFile(CodeArtifactCollection artifactCollection)
        {
            var model = new FileTemplateModel(Settings)
            {
                Types         = artifactCollection.Concatenate(),
                ExtensionCode = (TypeScriptExtensionCode)artifactCollection.ExtensionCode
            };

            var template = Settings.TemplateFactory.CreateTemplate("TypeScript", "File", model);

            return(ConversionUtilities.TrimWhiteSpaces(template.Render()));
        }