tangible T4 Directives

 

The tangible T4 Editor extends the set of existing T4 Directives that can be used inside T4 Text Template files. This list gives an overview on additional directives that can be used when working with the tangible T4 Editor.

 

The documentation of the basic T4 Text Template Directives is availabl in this MSDN Article.

 

Directive: TangibleActivityDiagram

 

Purpose

Allows access to a tangible Activity Diagram (.taact) object model from within a T4 template.

 

Syntax

<#@ TangibleActivityDiagram processor="TangibleActivityDiagramDirectiveProcessor" provides="FlowGraph" requires="fileName='{relativepath}" #>

 

Sample

After adding this directive you gain access to the object model of the Activity Diagram via the FlowGraph property.

 


<#@ template inherits="Microsoft.VisualStudio.TextTemplating.VSHost.ModelingTextTransformation" debug="true" hostSpecific="true" #>

<#@ TangibleActivityDiagram processor="TangibleActivityDiagramDirectiveProcessor"
                            provides="FlowGraph"
                            requires="fileName='.\Activity1.taact'" #>

<# 

    // print out all actors contained in the flow graph
    foreach(var actor in this.FlowGraph.Actors)
    {
#><#= actor.Name #>
<#
    }
#>


Authorization on the site

For an authorized user opens up new possibilities

Login

Password