Compartilhar via


ModelingTextTransformation Class

Definition

Modeling flavour of the TextTransformation base class

public abstract class ModelingTextTransformation : Microsoft.VisualStudio.TextTemplating.TextTransformation
type ModelingTextTransformation = class
    inherit TextTransformation
Public MustInherit Class ModelingTextTransformation
Inherits TextTransformation
Inheritance
ModelingTextTransformation
Derived

Constructors

ModelingTextTransformation()

Properties

CurrentIndent

Gets the current indent we use when adding lines to the output

(Inherited from TextTransformation)
Errors

The error collection for the generation process

(Inherited from TextTransformation)
GenerationEnvironment

The string builder that generation-time code is using to assemble generated output

(Inherited from TextTransformation)
ServiceProvider

Derived classes can override this property to return a service provider with which to construct the Store

Session

User's session (can only be set via an instance)

SessionId

Find the Id of the current user session or a per-template Id if no session has been initiated.

SkipValidation

Causes the ValidateStore method to become a no-op

Store

Gets the modeling Store.

Methods

AddDomainModel(Type)

Add a domain model type to be loaded by the Store.

ClearIndent()

Remove any indentation

(Inherited from TextTransformation)
ConvertModelRelativePathToTemplateRelativePath(String, String, String)

Helper to convert a path expressed relative to a model file to one expressed relative to a template.

Dispose()

Disposes the state of this object.

(Inherited from TextTransformation)
Dispose(Boolean)
Error(String)

Raise an error

(Inherited from TextTransformation)
Initialize()

Initialize this transformation by loading the Store with domain models and loading the model data

OnSessionChanged(ITextTemplatingSession, ITextTemplatingSession)

Fires whenever a session is provided that isn't the same as the last remembered session.

PopIndent()

Remove the last indent that was added with PushIndent

(Inherited from TextTransformation)
PushIndent(String)

Increase the indent

(Inherited from TextTransformation)
TransformText()

Generate the output text of the transformation

(Inherited from TextTransformation)
ValidateStore(String, CompilerErrorCollection)

Validates the store with the given validation categories in string form

Warning(String)

Raise a warning

(Inherited from TextTransformation)
Write(String, Object[])

Write formatted text directly into the generated output

(Inherited from TextTransformation)
Write(String)

Write text directly into the generated output

(Inherited from TextTransformation)
WriteLine(String, Object[])

Write formatted text directly into the generated output

(Inherited from TextTransformation)
WriteLine(String)

Write text directly into the generated output

(Inherited from TextTransformation)

Applies to