Partager via


ModelingTextTransformation Class

 

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

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

Inheritance Hierarchy

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

Syntax

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

Constructors

Name Description
System_CAPS_pubmethod ModelingTextTransformation()

Properties

Name Description
System_CAPS_pubproperty CurrentIndent

Gets the current indent text, which is prefixed to each line of the generated text output.(Inherited from TextTransformation.)

System_CAPS_pubproperty Errors

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.(Inherited from TextTransformation.)

System_CAPS_protproperty GenerationEnvironment

Gets or sets the string that the text template transformation process is using to assemble the generated text output. (Inherited from TextTransformation.)

System_CAPS_protproperty ServiceProvider

System_CAPS_pubproperty Session

System_CAPS_pubpropertySystem_CAPS_static SessionId

System_CAPS_protproperty SkipValidation

If true, ValidateStore() does not run validation and returns false. Defaults to false.

System_CAPS_protproperty Store

Gets the modeling Store.

Methods

Name Description
System_CAPS_protmethod AddDomainModel(Type)

Add a domain model type to be loaded by the Store. Call this for each domain model before calling Initialize().

System_CAPS_pubmethod ClearIndent()

Resets the CurrentIndent to an empty string.(Inherited from TextTransformation.)

System_CAPS_protmethodSystem_CAPS_static ConvertModelRelativePathToTemplateRelativePath(String, String, String)

Convert a path expressed relative to a model file to one expressed relative to a template.

System_CAPS_pubmethod Dispose()

Releases all resources used by the TextTransformation.(Inherited from TextTransformation.)

System_CAPS_protmethod Dispose(Boolean)

(Overrides TextTransformation.Dispose(Boolean).)

System_CAPS_pubmethod Equals(Object)

(Inherited from Object.)

System_CAPS_pubmethod Error(String)

Creates a new error to store information about errors that occur during the text template transformation process.(Inherited from TextTransformation.)

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

System_CAPS_pubmethod GetHashCode()

(Inherited from Object.)

System_CAPS_pubmethod GetType()

(Inherited from Object.)

System_CAPS_pubmethod Initialize()

Loads the models specified using AddModel() and makes the host ready to process the template.(Overrides TextTransformation.Initialize().)

System_CAPS_protmethod MemberwiseClone()

(Inherited from Object.)

System_CAPS_protmethod OnSessionChanged(ITextTemplatingSession, ITextTemplatingSession)

System_CAPS_pubmethod PopIndent()

Removes the most recently added text from CurrentIndent.(Inherited from TextTransformation.)

System_CAPS_pubmethod PushIndent(String)

Adds text to CurrentIndent, which is prefixed to each line of the generated text output.(Inherited from TextTransformation.)

System_CAPS_pubmethod ToString()

(Inherited from Object.)

System_CAPS_pubmethod TransformText()

When overridden in a derived class, generates the text output of the transformation. (Inherited from TextTransformation.)

System_CAPS_protmethod ValidateStore(String, CompilerErrorCollection)

Validates the store with the given validation categories. Returns true if there are errors.

System_CAPS_pubmethod Warning(String)

Creates a new warning to store information about errors that occur during the text template transformation process.(Inherited from TextTransformation.)

System_CAPS_pubmethod Write(String)

Appends a copy of the specified string to the generated text output.(Inherited from TextTransformation.)

System_CAPS_pubmethod Write(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.(Inherited from TextTransformation.)

System_CAPS_pubmethod WriteLine(String)

Appends a copy of the specified string and the default line terminator to the generated text output.(Inherited from TextTransformation.)

System_CAPS_pubmethod WriteLine(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.(Inherited from TextTransformation.)

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

Microsoft.VisualStudio.TextTemplating.VSHost Namespace

Return to top