Skip to content

Commit

Permalink
Added an option to expose the UseRelativeLinePragmas switch on the ge…
Browse files Browse the repository at this point in the history
…nerator.

This enables us to (optionally) restore what was the default behaviour prior to v2.3.0.

This commit resolves #152
  • Loading branch information
mwadams committed Apr 19, 2023
1 parent 0053d8d commit f0950ef
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions dotnet-t4/TextTransform.cs
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,11 @@ static int MainInternal (string [] args)
"Preprocess the template into class {<name>} for use as a runtime template. The class name may include a namespace.",
(s) => preprocessClassName = s
},
{
"l|useRelativeLinePragmas",
"Use relative paths in line pragmas.",
s => generator.UseRelativeLinePragmas = true
},
{
"p==|parameter==",
"Set session parameter {0:<name>} to {1:<value>}. " +
Expand Down
1 change: 1 addition & 0 deletions dotnet-t4/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ Option | Description
`-I=<directory>` | Add a `<directory>` to be searched when resolving included files
`-P=<directory>` | Add a `<directory>` to be searched when resolving assemblies.
`-c`<br/>`--class=<name>` | Preprocess the template into class `<name>` for use as a runtime template. The class name may include a namespace.
`-l`<br/>`--useRelativeLinePragmas` | Use relative paths in line pragmas.
`-p`, `--parameter=<name>=<value>` | Set session parameter `<name>` to `<value>`. The value is accessed from the template's `Session` dictionary, or from a property declared with a parameter directive: `<#@ parameter name='<name>' type='<type>' #>.` <br/> If the `<name>` matches a parameter with a non-string type, the `<value>` will be converted to that type.
`--debug` | Generate debug symbols and keep temporary files.
`-v` <br/> `--verbose` | Output additional diagnostic information to stdout.
Expand Down

0 comments on commit f0950ef

Please sign in to comment.