#sourcegenerators — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #sourcegenerators, aggregated by home.social.
-
Interceptors и SourceGenerators: отказываемся от IL-инъекций
Привет! Я Дмитрий Сипаков, ведущий разработчик в Госсервисах Т-Банка. Расскажу про относительно новую фичу .NET — Interceptors: как они работают вместе со Source Generators и как с их помощью можно избавиться от бойлерплейта без IL-инъекций и сторонней магии.
-
Interceptors и SourceGenerators: отказываемся от IL-инъекций
Привет! Я Дмитрий Сипаков, ведущий разработчик в Госсервисах Т-Банка. Расскажу про относительно новую фичу .NET — Interceptors: как они работают вместе со Source Generators и как с их помощью можно избавиться от бойлерплейта без IL-инъекций и сторонней магии.
-
Interceptors и SourceGenerators: отказываемся от IL-инъекций
Привет! Я Дмитрий Сипаков, ведущий разработчик в Госсервисах Т-Банка. Расскажу про относительно новую фичу .NET — Interceptors: как они работают вместе со Source Generators и как с их помощью можно избавиться от бойлерплейта без IL-инъекций и сторонней магии.
-
Interceptors и SourceGenerators: отказываемся от IL-инъекций
Привет! Я Дмитрий Сипаков, ведущий разработчик в Госсервисах Т-Банка. Расскажу про относительно новую фичу .NET — Interceptors: как они работают вместе со Source Generators и как с их помощью можно избавиться от бойлерплейта без IL-инъекций и сторонней магии.
-
Pretty straight forward, once a couple simple helpers intervene.
-
Pretty straight forward, once a couple simple helpers intervene.
-
Pretty straight forward, once a couple simple helpers intervene.
-
Pretty straight forward, once a couple simple helpers intervene.
-
Pretty straight forward, once a couple simple helpers intervene.
-
Source generation certainly makes Find All References noisy. #DotNet #Roslyn #SourceGenerators
-
Source generation certainly makes Find All References noisy. #DotNet #Roslyn #SourceGenerators
-
Source generation certainly makes Find All References noisy. #DotNet #Roslyn #SourceGenerators
-
Source generation certainly makes Find All References noisy. #DotNet #Roslyn #SourceGenerators
-
Source generation certainly makes Find All References noisy. #DotNet #Roslyn #SourceGenerators
-
I can't decide which should be true, but surely one of them should be:
* Code marked with [GeneratedCode] should be ignored by code coverage, or
* Generated code should be marked with [ExcludeFromCodeCoverage]I'm looking at you, code generators for [LoggerMessage] and [GeneratedRegex] and/or Microsoft.Testing.Extensions.CodeCoverage. 👀
-
https://github.com/csharpfritz/InstantAPIs - Generate "instant" #MinimalAPIs for #ASPnet using Reflection or #SourceGenerators. Nice experiment @csharpfritz.
-
https://github.com/JasonBock/Rocks - Rocks: #Roslyn #SourceGenerators based #Mocks. No reflection penalty. Really cool @jasonbock.
-
Hey #dotnet friends using System.Text.Json ✋
Has anyone managed to create code that uses source generators but for snake_case naming policy?
I notice I can not pass anywhere the serializer options when I specify using the source generator, and then I can not pass the snake_case naming policy?
Any help please, repost for reach?
#csharp #aspnet #aspdotnet #serialization #json #snake_case #jsonserializer #sourcegenerators #systemtextjson
-
Hey #dotnet friends using System.Text.Json ✋
Has anyone managed to create code that uses source generators but for snake_case naming policy?
I notice I can not pass anywhere the serializer options when I specify using the source generator, and then I can not pass the snake_case naming policy?
Any help please, repost for reach?
#csharp #aspnet #aspdotnet #serialization #json #snake_case #jsonserializer #sourcegenerators #systemtextjson
-
Hey #dotnet friends using System.Text.Json ✋
Has anyone managed to create code that uses source generators but for snake_case naming policy?
I notice I can not pass anywhere the serializer options when I specify using the source generator, and then I can not pass the snake_case naming policy?
Any help please, repost for reach?
#csharp #aspnet #aspdotnet #serialization #json #snake_case #jsonserializer #sourcegenerators #systemtextjson
-
Hey #dotnet friends using System.Text.Json ✋
Has anyone managed to create code that uses source generators but for snake_case naming policy?
I notice I can not pass anywhere the serializer options when I specify using the source generator, and then I can not pass the snake_case naming policy?
Any help please, repost for reach?
#csharp #aspnet #aspdotnet #serialization #json #snake_case #jsonserializer #sourcegenerators #systemtextjson
-
Hey #dotnet friends using System.Text.Json ✋
Has anyone managed to create code that uses source generators but for snake_case naming policy?
I notice I can not pass anywhere the serializer options when I specify using the source generator, and then I can not pass the snake_case naming policy?
Any help please, repost for reach?
#csharp #aspnet #aspdotnet #serialization #json #snake_case #jsonserializer #sourcegenerators #systemtextjson
-
#CSharp #SourceGenerators can add generated code to your existing code. With #dotnet 8 and interceptors it now can also *replace* your existing code.
https://devblogs.microsoft.com/dotnet/new-csharp-12-preview-features/#interceptors
-
♲ @[email protected]:#SkiaSharp #Svg #CSharp #SourceGenerators #AvaloniaUI #Xaml #Animation yes you can do that!
-
♲ @[email protected]:Drawing #Svg tiger using #CSharp compile-time generated by #SourceGenerators using #SkiaSharp with #AvaloniaUI
-
https://dev.to/alyelhaddad/thunderboltioc-net-dependency-injection-without-reflection-30ai - ThunderboltIoC is a #dotNET #IoC / #DependencyInjection framework that uses #SourceGenerators and not #Reflection. Thanks for the start-up post https://github.com/AlyElHaddad.
-
How do you debug #dotnet source generators? 🤔🪲
In this post by @khalidabuhakmeh, learn how to debug generated sources, as well as the source generator itself – with the debugger, and with snapshot testing.
-
The code that needs to be written to generate complex C# code with source generators becomes hard to read and maintain very quickly.
Wouldn't it make sense to have some sort of templating engine, like Razor or Mustache, but for C# source code?
Maybe it even already exists?
#dotnet #CSharp #SourceGenerators -
Episode 429 of FreeCodeSession is live!
-
Episode 428 of FreeCodeSession is live!
-
If you find yourself using a source generator in your own solution, so that you can add an attribute to a class with a tonne of parameters and have it generate the source, consider whether there is a better way.
Generics, inheritance, or just... WRITE THE DAMN CODE.
Generator code is hard to read in raw form, hard to debug, etc.
Source Generators are useful, especially for shit posting (https://martinjt.me/2022/05/03/evil-monkeypatching-in-c-with-rosyln-source-generators/) but there are better ways to do most of what they do.
-
Episode 427 of FreeCodeSession is live!
-
Episode 426 of FreeCodeSession is live!
-
Episode 425 of FreeCodeSession is live!
-
Episode 424 of FreeCodeSession is live!
-
Episode 423 of FreeCodeSession is live!
-
Episode 422 of FreeCodeSession is live!
-
Episode 421 of FreeCodeSession is live!
-
Episode 420 of FreeCodeSession is live!
-
Episode 419 of FreeCodeSession is live!
-
Episode 418 of FreeCodeSession is live!
-
Episode 417 of FreeCodeSession is live!