STextTemplating Interface
The text template transformation service in Visual Studio.
Namespace: Microsoft.VisualStudio.TextTemplating.VSHost
Assembly: Microsoft.VisualStudio.TextTemplating.Interfaces.10.0 (in Microsoft.VisualStudio.TextTemplating.Interfaces.10.0.dll)
Syntax
'Declaration
<GuidAttribute("508349B6-6B84-4df5-91F0-309BEEBAD82D")> _
<ComVisibleAttribute(True)> _
<CLSCompliantAttribute(True)> _
Public Interface STextTemplating
[GuidAttribute("508349B6-6B84-4df5-91F0-309BEEBAD82D")]
[ComVisibleAttribute(true)]
[CLSCompliantAttribute(true)]
public interface STextTemplating
[GuidAttribute(L"508349B6-6B84-4df5-91F0-309BEEBAD82D")]
[ComVisibleAttribute(true)]
[CLSCompliantAttribute(true)]
public interface class STextTemplating
[<GuidAttribute("508349B6-6B84-4df5-91F0-309BEEBAD82D")>]
[<ComVisibleAttribute(true)>]
[<CLSCompliantAttribute(true)>]
type STextTemplating = interface end
public interface STextTemplating
Remarks
You can use this service in a Visual Studio Extension generate text from T4 text templates.
For more information, see Invoking Text Transformation in a VS Extension.
Examples
ITextTemplating tt = ServiceProvider.GetService(typeof(STextTemplating)) as ITextTemplating;
string templateResult = tt.ProcessTemplate(null, myTemplateText, null, null);