InFlux.T4
1.0.1
dotnet add package InFlux.T4 --version 1.0.1
NuGet\Install-Package InFlux.T4 -Version 1.0.1
<PackageReference Include="InFlux.T4" Version="1.0.1" />
paket add InFlux.T4 --version 1.0.1
#r "nuget: InFlux.T4, 1.0.1"
// Install InFlux.T4 as a Cake Addin #addin nuget:?package=InFlux.T4&version=1.0.1 // Install InFlux.T4 as a Cake Tool #tool nuget:?package=InFlux.T4&version=1.0.1
T4 Template Generated code
(16th December 2022)
The provided template needs its "properties" changes from "content" to "none". This will be enough to allow you to edit the file!
Open the T4 template file "ModelAdditionalCode.tt".
// PLEASE FILL THIS IN:
// --------------------
var RELATIVE_PATH_FROM_THIS_FILE = @"\TestModels\";
// ----------------------------------
It wants to point to a folder in which any model you want to enhance lives.
The default folder name \TestModels\
is unlikely what you need!
Its a good idea to create a folder to isolate your partial classes that will be enhanced, away from other code where the code generator can't work on more things than you intend it to.
- T4 templates can trigger code generation from visual studio when ever you save a change.
- Secondly, you can right-click on a "*.tt" file and choose the "Run Custom Tool" option.
Code generation assumes you've already got InFlux as a project NuGet dependency. If not, you can get it here: <a href="https://www.nuget.org/packages/InFlux/">InFlux on NuGet</a>
future?
I don't know if I'll try to improve upon this with a code generator that integrated with
Visual Studio. I have done that once already, and in my opinion, is not as easy to do,
and perhaps is less maintainable. Then again, maybe that's because I've spend 12 years
occassionally playing with T4 templates.
I do like the convenience that the new code generators bring.
Perhaps some day?
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.1 is compatible. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.1
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.0.1 | 201 | 12/16/2022 |
A T4 template code generator that uses InFlux to manage intended property changes
that can be 'resisted' through code, requiring confirmation from a user. Denial results
in no property change. Property changes can also be tracked through generated events.