Engine::PreprocessTemplate Method (String^, ITextTemplatingEngineHost^, String^, String^, String^, array<String^>^)
Generates code from a template that, when it is compiled and run, will produce the template output.
Assembly: Microsoft.VisualStudio.TextTemplating.12.0 (in Microsoft.VisualStudio.TextTemplating.12.0.dll)
public: virtual String^ PreprocessTemplate( String^ content, ITextTemplatingEngineHost^ host, String^ className, String^ classNamespace, [OutAttribute] String^% language, [OutAttribute] array<String^>^% references ) sealed
Parameters
- content
-
Type:
System::String^
The content of the template.
- host
-
Type:
Microsoft.VisualStudio.TextTemplating::ITextTemplatingEngineHost^
A template host, which should implement ITextTemplatingEngineHost.
- className
-
Type:
System::String^
The name of the class that you want the template code to have.
- classNamespace
-
Type:
System::String^
The namespace in which you want the template code to be generated.
- language
-
Type:
System::String^
The language of the generated code.
- references
-
Type:
array<System::String^>^
Assemblies specified by the template or the host.
For more information, see Run-Time Text Generation with T4 Text Templates and Processing Text Templates by using a Custom Host.
Tip |
|---|
If you are writing a package or extension that will run within Visual Studio, consider using the text templating service instead of writing your own host. For more information, see Invoking Text Transformation in a VS Extension. |
