Click to Rate and Give Feedback
MSDN
MSDN Library
Visual Studio 2008
Visual Studio
Visual Studio SDK
Engine Class

  Switch on low bandwidth view
This page is specific to
Microsoft Visual Studio 2008/.NET Framework 3.5

Other versions are also available for the following:
Domain-Specific Language Tools Reference
Engine Class

Updated: November 2007

The text template transformation engine.

Namespace:  Microsoft.VisualStudio.TextTemplating
Assembly:  Microsoft.VisualStudio.TextTemplating (in Microsoft.VisualStudio.TextTemplating.dll)

Visual Basic (Declaration)
Public Class Engine _
    Implements ITextTemplatingEngine
Visual Basic (Usage)
Dim instance As Engine
C#
public class Engine : ITextTemplatingEngine
Visual C++
public ref class Engine : ITextTemplatingEngine
JScript
public class Engine implements ITextTemplatingEngine

The text template transformation process takes a text template file as the input, and produces a new text file as the output. The text template transformation engine component controls the process, and interacts with a text template transformation host and one or more text template directive processors to complete the process. For more information, see Generating Artifacts By Using Text Templates.

The following example demonstrates how to create an instance of the Engine, and calling ProcessTemplate to transform a text template.

This code example is part of a larger example provided for the ITextTemplatingEngineHost interface.

C#
Engine engine = new Engine();

//read the text template
string input = File.ReadAllText(templateFileName);

//transform the text template
string output = engine.ProcessTemplate(input, host);
Visual Basic
Dim engine As Engine = New Engine()

'read the text template
Dim input As String = File.ReadAllText(templateFileName)

'transform the text template
Dim output As String = engine.ProcessTemplate(input, host)
System..::.Object
  Microsoft.VisualStudio.TextTemplating..::.Engine
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker