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: TangibleStateDiagram



Allows access to a tangible State Diagram (.tastate) object model from within a T4 template.



<#@ TangibleStateDiagram processor="TangibleStateDiagramDirectiveProcessor" provides="StateGraph"

                         requires="fileName='{relativefile}'" #>



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


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

<#@ TangibleStateDiagram processor="TangibleStateDiagramDirectiveProcessor"


                         requires="fileName='.\StateDiagrams1.tastate'" #>

    // render all state names of the diagram
    foreach(var state in this.StateGraph.FlowElements)
#><#= state.Name #>
<#  }

Authorization on the site

For an authorized user opens up new possibilities