Text Template API Reference
ITextTemplating Interface
The principal interface of the text template transformation service in Visual Studio, STextTemplating.
Assembly: Microsoft.VisualStudio.TextTemplating.Interfaces.10.0 (in Microsoft.VisualStudio.TextTemplating.Interfaces.10.0.dll)
Syntax
Visual Basic
<CLSCompliantAttribute(False)> _ Public Interface ITextTemplating
C#
[CLSCompliantAttribute(false)] public interface ITextTemplating
Visual C++
[CLSCompliantAttribute(false)] public interface class ITextTemplating
F#
[<CLSCompliantAttribute(false)>] type ITextTemplating = interface end
JScript
public interface ITextTemplating
The ITextTemplating type exposes the following members.
Methods
| Name | Description | |
|---|---|---|
|
BeginErrorSession | Call this method before you process multiple text templates. Each type of error will be reported only once, until you call EndErrorSession. |
|
EndErrorSession | After processing a batch of templates, return to reporting every error. |
|
PreprocessTemplate | Process a text template to produce source code that can be invoked at run time. |
|
ProcessTemplate | Process the template file as a design-time template, so as to produce completed output. |
Examples
ITextTemplating tt = ServiceProvider.GetService(typeof(STextTemplating)) as ITextTemplating;
For more information, see Invoking Text Transformation in a VS Extension and Design-Time Code Generation by using T4 Text Templates.
See Also