TextTransformation Class

TextTransformation Class

 

The abstract base class for all generated transformation classes. This class also provides utility methods and properties for use in text template code.

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


public abstract class TextTransformation : IDisposable

NameDescription
System_CAPS_protmethodTextTransformation()

Initializes a new instance of the TextTransformation class.

NameDescription
System_CAPS_pubpropertyCurrentIndent

Gets the current indent text, which is prefixed to each line of the generated text output.

System_CAPS_pubpropertyErrors

This API supports the product infrastructure and is not intended to be used directly from your code. Gets the error collection for the text template transformation process.

System_CAPS_protpropertyGenerationEnvironment

Gets or sets the string that the text template transformation process is using to assemble the generated text output.

System_CAPS_pubpropertySession

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.

NameDescription
System_CAPS_pubmethodClearIndent()

Resets the CurrentIndent to an empty string.

System_CAPS_pubmethodDispose()

Releases all resources used by the TextTransformation.

System_CAPS_protmethodDispose(Boolean)

Releases the unmanaged resources used by the TextTransformation and optionally releases the managed resources.

System_CAPS_pubmethodEquals(Object)

(Inherited from Object.)

System_CAPS_pubmethodError(String)

Creates a new error to store information about errors that occur during the text template transformation process.

System_CAPS_protmethodFinalize()

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().)

System_CAPS_pubmethodGetHashCode()

(Inherited from Object.)

System_CAPS_pubmethodGetType()

(Inherited from Object.)

System_CAPS_pubmethodInitialize()

This API supports the product infrastructure and is not intended to be used directly from your code. Initializes the TextTransformation class.

System_CAPS_protmethodMemberwiseClone()

(Inherited from Object.)

System_CAPS_pubmethodPopIndent()

Removes the most recently added text from CurrentIndent.

System_CAPS_pubmethodPushIndent(String)

Adds text to CurrentIndent, which is prefixed to each line of the generated text output.

System_CAPS_pubmethodToString()

(Inherited from Object.)

System_CAPS_pubmethodTransformText()

When overridden in a derived class, generates the text output of the transformation.

System_CAPS_pubmethodWarning(String)

Creates a new warning to store information about errors that occur during the text template transformation process.

System_CAPS_pubmethodWrite(String)

Appends a copy of the specified string to the generated text output.

System_CAPS_pubmethodWrite(String, 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.

System_CAPS_pubmethodWriteLine(String)

Appends a copy of the specified string and the default line terminator to the generated text output.

System_CAPS_pubmethodWriteLine(String, 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.

Return to top
Show:
© 2016 Microsoft