Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

T4ParameterValues Support #11

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Commits on Apr 30, 2023

  1. Added the ability to collate T4ParameterValues configuration, and run…

    … a preprocessor over the templates before calling into Mono.TextTemplating
    
    - Added support to T4.Build to take in one or many --variable arguments, using "Include=Value" format.
    - Added processing of passed in variables into a read-only dictionary.
    - Updated BuildTemplateGenerator to enable support for a preprocessing Func<>, which is called between input file validation, and processing of content.
    | - Due to accessibility restrictions of some of the TemplateGenerator methods, I had to pull that code into this class. Ideally TemplateGenerator should expose these as protected/virtual, so that they can be overridden in implementers.
    - Added a guarded StringBuilder for preprocessing so that we don't load up a StringBuilder, and then have it generate the same string, if there are no variables to replace.
    Adam Smith-Platts committed Apr 30, 2023
    Configuration menu
    Copy the full SHA
    9e6dcea View commit details
    Browse the repository at this point in the history
  2. To better align with Microsoft.TextTemplating MSBuild, increased the …

    …scope of item types to search for transform files
    
    Microsoft.TextTemplating.targets uses this exact list, and I was working on a separate project where the TT file was added as Content, not None. Given that the same Generator guard is used, this seemed safe.
    Adam Smith-Platts committed Apr 30, 2023
    Configuration menu
    Copy the full SHA
    389b400 View commit details
    Browse the repository at this point in the history
  3. Added T4.Build project-specific gitignore

    Adam Smith-Platts committed Apr 30, 2023
    Configuration menu
    Copy the full SHA
    468eb04 View commit details
    Browse the repository at this point in the history