home.social

#sourcegenerators — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #sourcegenerators, aggregated by home.social.

  1. Interceptors и SourceGenerators: отказываемся от IL-инъекций

    Привет! Я Дмитрий Сипаков, ведущий разработчик в Госсервисах Т-Банка. Расскажу про относительно новую фичу .NET — Interceptors: как они работают вместе со Source Generators и как с их помощью можно избавиться от бойлерплейта без IL-инъекций и сторонней магии.

    habr.com/ru/companies/tbank/ar

    #NET #Interceptors #SourceGenerators

  2. Interceptors и SourceGenerators: отказываемся от IL-инъекций

    Привет! Я Дмитрий Сипаков, ведущий разработчик в Госсервисах Т-Банка. Расскажу про относительно новую фичу .NET — Interceptors: как они работают вместе со Source Generators и как с их помощью можно избавиться от бойлерплейта без IL-инъекций и сторонней магии.

    habr.com/ru/companies/tbank/ar

    #NET #Interceptors #SourceGenerators

  3. Interceptors и SourceGenerators: отказываемся от IL-инъекций

    Привет! Я Дмитрий Сипаков, ведущий разработчик в Госсервисах Т-Банка. Расскажу про относительно новую фичу .NET — Interceptors: как они работают вместе со Source Generators и как с их помощью можно избавиться от бойлерплейта без IL-инъекций и сторонней магии.

    habr.com/ru/companies/tbank/ar

    #NET #Interceptors #SourceGenerators

  4. Interceptors и SourceGenerators: отказываемся от IL-инъекций

    Привет! Я Дмитрий Сипаков, ведущий разработчик в Госсервисах Т-Банка. Расскажу про относительно новую фичу .NET — Interceptors: как они работают вместе со Source Generators и как с их помощью можно избавиться от бойлерплейта без IL-инъекций и сторонней магии.

    habr.com/ru/companies/tbank/ar

    #NET #Interceptors #SourceGenerators

  5. 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. 👀

    #DotNet #Roslyn #SourceGenerators

  6. 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

  7. 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

  8. Hey 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?

  9. 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

  10. 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

  11. 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.

    jb.gg/8zeywx

    #csharp #roslyn #sourcegenerators #debugger #JetBrainsRider

  12. 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

  13. 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 (martinjt.me/2022/05/03/evil-mo) but there are better ways to do most of what they do.

    #dotnet #sourcegenerators