I am trying to create my own DSL for a project, and I would like to create one T4 file that contains the main engine for this, and then create small T4 files that include this engine and invoke it.
I was thinking of trying this format for T4 files that will call the engine:
<#@ include file="EngineLib\EngineLib.tt" #>
<# RunEngine(); #>
dsl goes here
The three questions I have are the following:
1. Can I get the name of the primary script?
Basically, inside EngineLib.tt, can I get the full path to the file and the name of the script file that included it, in this case the script shown above? Or, if not, its contents?
2. Is it possible to complete the processing of the script?
, RunEngine(), , script, , T4, DSL.
, RunEngine DSL, T4, DSL .
?
, RunEngine , , :
public class SomeClass
{
}
dsl goes here
, , DSL- .
3. ?
, T4- DSL, , , T4, .
- , , ?