The abstract base class for all generated transformation classes. This class also provides utility methods and properties for use in text template code.
Assembly: Microsoft.VisualStudio.TextTemplating.11.0 (in Microsoft.VisualStudio.TextTemplating.11.0.dll)
'Declaration Public MustInherit Class TextTransformation _ Implements IDisposable
public abstract class TextTransformation : IDisposable
public ref class TextTransformation abstract : IDisposable
[<AbstractClass>] type TextTransformation = class interface IDisposable end
public abstract class TextTransformation implements IDisposable
The TextTransformation type exposes the following members.
|TextTransformation||Initializes a new instance of the TextTransformation class.|
|CurrentIndent||Gets the current indent text, which is prefixed to each line of the generated text output.|
|Errors||Infrastructure. Gets the error collection for the text template transformation process.|
|GenerationEnvironment||Gets or sets the string that the text template transformation process is using to assemble the generated text output.|
|Session||Gets or sets the current session. A session represents a series of transformations that are executed within the same user command. The session object can be used to transmit information into the code of a text template.|
|ClearIndent||Resets the CurrentIndent to an empty string.|
|Dispose()||Releases all resources used by the TextTransformation.|
|Dispose(Boolean)||Releases the unmanaged resources used by the TextTransformation and optionally releases the managed resources.|
|Equals||Determines whether the specified object is equal to the current object. (Inherited from Object.)|
|Error||Creates a new error to store information about errors that occur during the text template transformation process.|
|Finalize||Allows an Object to attempt to free resources and perform other cleanup operations before it is reclaimed by the garbage collector. Called by the garbage collector. (Overrides Object.Finalize.)|
|GetHashCode||Serves as a hash function for a particular type. (Inherited from Object.)|
|GetType||Gets the Type of the current instance. (Inherited from Object.)|
|Initialize||Infrastructure. Initializes the TextTransformation class.|
|MemberwiseClone||Creates a shallow copy of the current Object. (Inherited from Object.)|
|PopIndent||Removes the most recently added text from CurrentIndent.|
|PushIndent||Adds text to CurrentIndent, which is prefixed to each line of the generated text output.|
|ToString||Returns a string that represents the current object. (Inherited from Object.)|
|TransformText||When overridden in a derived class, generates the text output of the transformation.|
|Warning||Creates a new warning to store information about errors that occur during the text template transformation process.|
|Write(String)||Appends a copy of the specified string to the generated text output.|
|Write(String, array<Object)||Appends a formatted string, which contains zero or more format specifications, to the generated text output. Each format specification is replaced by the string representation of a corresponding object argument.|
|WriteLine(String)||Appends a copy of the specified string and the default line terminator to the generated text output.|
|WriteLine(String, array<Object)||Appends a formatted string, which contains zero or more format specifications, and the default line terminator, to the generated text output. Each format specification is replaced by the string representation of a corresponding object argument.|
The text template transformation process has two steps. In the first step, the text template transformation engine creates a class that is referred to as the generated transformation class. In the second step, the engine compiles and executes the generated transformation class, to produce the generated text output. The generated transformation class inherits from TextTransformation.
Any class specified in an inherits directive in a text template must itself inherit from TextTransformation. TransformText is the only abstract member of this class.
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.