Share via


ModelingTextTransformation Class

Use this base class for text transformations from domain-specific language models.

Inheritance Hierarchy

System.Object
  Microsoft.VisualStudio.TextTemplating.TextTransformation
    Microsoft.VisualStudio.TextTemplating.VSHost.ModelingTextTransformation
      Microsoft.VisualStudio.TextTemplating.Modeling.ModelBusEnabledTextTransformation

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

Syntax

'Declaration
Public MustInherit Class ModelingTextTransformation _
    Inherits TextTransformation
public abstract class ModelingTextTransformation : TextTransformation
public ref class ModelingTextTransformation abstract : public TextTransformation
[<AbstractClass>]
type ModelingTextTransformation =  
    class 
        inherit TextTransformation 
    end
public abstract class ModelingTextTransformation extends TextTransformation

The ModelingTextTransformation type exposes the following members.

Constructors

  Name Description
Public method ModelingTextTransformation

Top

Properties

  Name Description
Public property CurrentIndent Gets the current indent text, which is prefixed to each line of the generated text output. (Inherited from TextTransformation.)
Public property Errors Infrastructure. Gets the error collection for the text template transformation process. (Inherited from TextTransformation.)
Protected property GenerationEnvironment Gets or sets the string that the text template transformation process is using to assemble the generated text output. (Inherited from TextTransformation.)
Protected property ServiceProvider
Public property Session
Public propertyStatic member SessionId
Protected property SkipValidation If true, ValidateStore() does not run validation and returns false. Defaults to false.
Protected property Store Gets the modeling Store.

Top

Methods

  Name Description
Protected method AddDomainModel Add a domain model type to be loaded by the Store. Call this for each domain model before calling Initialize().
Public method ClearIndent Resets the CurrentIndent to an empty string. (Inherited from TextTransformation.)
Protected methodStatic member ConvertModelRelativePathToTemplateRelativePath Security Critical. Convert a path expressed relative to a model file to one expressed relative to a template.
Public method Dispose() Releases all resources used by the TextTransformation. (Inherited from TextTransformation.)
Protected method Dispose(Boolean) (Overrides TextTransformation.Dispose(Boolean).)
Public method Equals Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method Error Creates a new error to store information about errors that occur during the text template transformation process. (Inherited from TextTransformation.)
Protected method 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. (Inherited from TextTransformation.)
Public method GetHashCode Serves as the default hash function. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method Initialize Loads the models specified using AddModel() and makes the host ready to process the template. (Overrides TextTransformation.Initialize().)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Protected method OnSessionChanged
Public method PopIndent Removes the most recently added text from CurrentIndent. (Inherited from TextTransformation.)
Public method PushIndent Adds text to CurrentIndent, which is prefixed to each line of the generated text output. (Inherited from TextTransformation.)
Public method ToString Returns a string that represents the current object. (Inherited from Object.)
Public method TransformText When overridden in a derived class, generates the text output of the transformation. (Inherited from TextTransformation.)
Protected method ValidateStore Validates the store with the given validation categories. Returns true if there are errors.
Public method Warning Creates a new warning to store information about errors that occur during the text template transformation process. (Inherited from TextTransformation.)
Public method Write(String) Appends a copy of the specified string to the generated text output. (Inherited from TextTransformation.)
Public method 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. (Inherited from TextTransformation.)
Public method WriteLine(String) Appends a copy of the specified string and the default line terminator to the generated text output. (Inherited from TextTransformation.)
Public method 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. (Inherited from TextTransformation.)

Top

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Microsoft.VisualStudio.TextTemplating.VSHost Namespace