diff --git a/README.md b/README.md index 4a4753a..bd9bf5e 100644 --- a/README.md +++ b/README.md @@ -10,4 +10,5 @@ List of the daily tips - [Day-005](./tip-005/README.md) - Wolverine registration rules - [Day-006](./tip-006/README.md) - Are we interface obsessed? - [Day-007](./tip-007/README.md) - MemberNotNullWhen -- [Day-008](./tip-008/README.md) - Log injection \ No newline at end of file +- [Day-008](./tip-008/README.md) - Log injection +- [Day-009](./tip-009/README.md) - Wolverine source generation \ No newline at end of file diff --git a/tip-009/README.md b/tip-009/README.md new file mode 100644 index 0000000..32ecc92 --- /dev/null +++ b/tip-009/README.md @@ -0,0 +1,13 @@ +# 009 - Wolverine source generation # + +Back to Wolverine topic. One of the interesting (or unique) feature is that Wolverine can work in a fashion that our bindings are source generated. If we are in the development mode that's not very beneficial as we would be generating based on a constantly changing code but once we are fairly done we can use the magic of source generation and get rid of reflection for resolving the handlers. Link to the docs: https://wolverine.netlify.app/guide/codegen.html + +The topic of source generating parts of the previously dynamic code is something we will see more and more often. + +```csharp +builder.Host.UseWolverine(options => +{ + // use Auto to generate/load generated types or Static in Production to load + options.CodeGeneration.TypeLoadMode = TypeLoadMode.Auto; +}); +``` \ No newline at end of file