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

Proof of concept with Raw string literals #38

Closed
pauldeen79 opened this issue Jun 23, 2023 · 0 comments · Fixed by #39
Closed

Proof of concept with Raw string literals #38

pauldeen79 opened this issue Jun 23, 2023 · 0 comments · Fixed by #39

Comments

@pauldeen79
Copy link
Owner

Use C# raw string literals instead of T4 for templating.

If this works, we can remove all T4 stuff and the template parsing (token) stuff.
What will remain, is just the Runtime project (without template specific stuff) and the Cmd project (without template specific stuff)

Advantages:

  • Easy debugging from your IDE of choice
  • Intellisense from your IDE of choice
  • No additional steps for references - .net core will take care of this
  • We can throw away a lot of code

The proof of concept needs to include this:

  • One template without reference to the Runtime project
  • One template with reference to the Runtime project
  • Try both with and without Model property on the root template - note that for testing, you will need the Runtime project
  • Include child templates, and add code if needed to support this
  • See if we can refactor those ugly Func delegates - especially if we need them. Just use standard DI with constructor injection.

See for more info:
https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/raw-string
https://devblogs.microsoft.com/dotnet/csharp-11-preview-updates/

@pauldeen79 pauldeen79 linked a pull request Jul 1, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant