C# Source Generators
A list of C# Source Generators (not necessarily awesome), because I haven't found a good list yet.
C# Source Generators is a Roslyn compiler feature introduced in C#9/.NET 5. It lets C# developers inspect user code and generate new C# source files that can be added to a compilation.
Add GitHub topic csharp-sourcegenerator
to your generator repo - let's get it started!
Documentation and samples
Source Generators
<details open>
<summary>Categories</summary>
</details>
<!--
Sorted alphabetically in each category. Template for entries:
- [REPO](https://github.com/REPO) -  
-->
Dependency Injection (IoC Container)
- AutoCtor -
AutoCtor is a Roslyn Source Generator that will automatically create a constructor for your class for use with constructor Dependency Injection.
- AutoRegisterInject -
Automatically generate Microsoft Dependency Injection ServiceCollection registrations for your classes from attributes.
- DependencyInjection.SourceGenerators
This project is a C# source generator designed to simplify and automate the registration of dependencies in Microsoft's Dependency Injection service collection. By using this package, developers can enhance the clarity and efficiency of their code by reducing the need for manual service registration.
- DependencyManagement -
The Dependency Management is a very fast dependency injection and components container, with many interesting features, and without reflection.
- GrpcInjection -
- GrpcInjection is a tool that allow you to inject Services and Interceptor in time of compilation inside of GRPC Projects using C# source generator.
- Injectio -
- Source generator that helps register discovered services in the dependency injection container
- Jab -
- Compile Time Dependency Injection
- lambdajection -
Framework for building AWS Lambdas using dependency injection and aspect-oriented programming.
- MrMeeseeks.DIE -
An unambigous, convenient, flexible and feature rich compile time dependency injection container.
- Pure.DI -
- dependency injection for .NET without any IoC/DI containers, frameworks, dependencies, and thus without any performance impact and side-effects.
- SourceInject -
A source generator that allow you to generate your services for dependencies injection during compile time.
- StrongInject -
- compile time dependency injection for .NET.
- Thunderboltloc -
One of the very first IoC frameworks for .Net that has no reflection.
Console / CLI
- AutoSpectre -
Generates a service for prompting and populating a class using the Spectre.Console library
- docopt.net -
generates C# source code that parses command-line arguments into a strong-typed arguments class (also generated), given just the POSIX-style usage in plain text as part of the CLI. In other words, write the help message for your program and get the entire parser generated for free!
- Figgle -
- Generate ASCII banner text at compile time (or run time) using figlet fonts.
Mappers
- AutoDto -
- A source generator that generates DTO models from BL to avoid same BL and DTO models
- Flattening -
- C# source generator for generating flattened classes from complex domain classes.
- GraphQL.Tools -
- A GraphQL to C# compiler (code-generator) which turns your GraphQL schema into a set of C# classes, interfaces, and enums.
- Mapperly -
- A source generator for generating object mappings. Inspired by MapStruct.
- MappingCloningExtensions -
Generates extensions of objects for mapping and cloning using either attributes or fluent style. Also, supports deep copying and specfiying whether it can do a deep copy and the possibility of doing so safely.
- Mapster -
- A fast, fun and performant object to object Mapper. Has better performance and is more memorry efficient than Automapper. Besides code generation, supports also Fluent API.
- MapTo -
- A convention based object to object mapper similar to Automapper.
- NextGenMapper -
Easy-to-use mapper without configuration.
- SourceMapper -
- generates Mappers code based on attributes used on interfaces or abstract classes. It is inspired by Java MapStruct
- SourceMapper -
A source generator that creates extension methods for cloning and mapping.
Communication
- CoreWCF -
CoreWCF provides support of WCF server side code on .NET Core /