All Projects → amis92 → Csharp Source Generators

amis92 / Csharp Source Generators

Licence: cc0-1.0
A list of C# Source Generators (not necessarily awesome) and associated resources: articles, talks, demos.

Programming Languages

csharp
926 projects

Projects that are alternatives of or similar to Csharp Source Generators

Lazyloadingviews
Loading effect for the child views in Adapter View before binding data from service.
Stars: ✭ 200 (-8.26%)
Mutual labels:  list
Awesome Macos Screensavers
🍎 🖥 🎆 A curated list of screensavers for Mac OS X
Stars: ✭ 2,572 (+1079.82%)
Mutual labels:  list
Web Launch Checklist
📋 A simple website launch checklist to keep track of the most important enrichment possibilities for a website.
Stars: ✭ 214 (-1.83%)
Mutual labels:  list
Awesome Youtubers
▶️ An awesome list of awesome YouTubers that teach about technology. Tutorials about web development, computer science, machine learning, game development, cybersecurity, and more.
Stars: ✭ 2,824 (+1195.41%)
Mutual labels:  list
Can I Take Over Xyz
"Can I take over XYZ?" — a list of services and how to claim (sub)domains with dangling DNS records.
Stars: ✭ 2,808 (+1188.07%)
Mutual labels:  list
Awesome Eslint
A list of awesome ESLint plugins, configs, etc.
Stars: ✭ 2,759 (+1165.6%)
Mutual labels:  list
Awesome Json Datasets
A curated list of awesome JSON datasets that don't require authentication.
Stars: ✭ 2,421 (+1010.55%)
Mutual labels:  list
Retyped
Access 3600+ libraries from C# and let Bridge.NET compile your project into JavaScript.
Stars: ✭ 216 (-0.92%)
Mutual labels:  roslyn
Bookmarks
🔖 +4.3K awesome resources for geeks and software crafters 🍺
Stars: ✭ 210 (-3.67%)
Mutual labels:  list
Roslyn Security Guard
Roslyn analyzers that aim to help security audit on .NET applications.
Stars: ✭ 214 (-1.83%)
Mutual labels:  roslyn
Ecommwar
A leaderboard of the top open-source e-commerce platforms. Promoting the bests for building reliable stores.
Stars: ✭ 203 (-6.88%)
Mutual labels:  list
Philosophy
A list of philosophy books and resources.
Stars: ✭ 206 (-5.5%)
Mutual labels:  list
Awesome C
Continuing the development of awesome-c list on GitHub
Stars: ✭ 2,595 (+1090.37%)
Mutual labels:  list
Awesome Draft Js
Awesome list of Draft.js resources
Stars: ✭ 2,379 (+991.28%)
Mutual labels:  list
Slip
Slip.js — UI library for manipulating lists via swipe and drag gestures
Stars: ✭ 2,421 (+1010.55%)
Mutual labels:  list
Pluginframework
Everything is a Plugin in .NET
Stars: ✭ 197 (-9.63%)
Mutual labels:  roslyn
Masonic
🧱 High-performance masonry layouts for React
Stars: ✭ 209 (-4.13%)
Mutual labels:  list
Codejam
Set of handy reusable .NET components that can simplify your daily work and save your time when you copy and paste your favorite helper methods and classes from one project to another
Stars: ✭ 217 (-0.46%)
Mutual labels:  list
Awesome Haxe Gamedev
Resources for game development on haxe
Stars: ✭ 213 (-2.29%)
Mutual labels:  list
Seriloganalyzer
Roslyn-based analysis for code using the Serilog logging library. Checks for common mistakes and usage problems.
Stars: ✭ 214 (-1.83%)
Mutual labels:  roslyn

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

  • AutoDeconstructable - stars last commit Generator for efficient and automatic flat text serializer/deserializer using Deconstructable aspect in NTP library.
  • AutoInterface - stars last commit interface-to-member source generator.
  • Avalonia.NameGenerator - stars last commit Generates typed references to named Avalonia XAML controls.
  • avatar - stars last commit A modern compile-time generated interception/proxy library.
  • Azura - stars last commit Generates binary [de]serializers on Streams at design time.
  • boilerplatezero - stars last commit WPF Dependency Property Generator.
  • Cloneable - stars last commit auto-generate Clone method.
  • Data Builder Generator - stars last commit Generate data builder patterns for your model classes.
  • Fairy - stars last commit generates C# code based on Sitecore Content Serialization (SCS) .yml files.
  • Generator.Equals - stars last commit generates equality and hashing for classes and records, supports a number of strategies for comparing collections and properties.
  • IoTHubClientGenerator - stars last commit Build a C# Azure IoT Device client program in seconds!
  • JsonByExampleGenerator - stars last commit - generate classes based on example json files in your project.
  • JsonSrcGen - stars last commit - compile time JSON serializer generation.
  • lambdajection - stars last commit Framework for building AWS Lambdas using dependency injection and aspect-oriented programming.
  • MapTo - stars last commit - A convention based object to object mapper similar to Automapper.
  • MemberAccessGenerator - stars last commit generates GetMember(int) and/or GetMember(string) methods that return property value for a given property name or index (e.g. in positional records).
  • MiniRazor - stars last commit Portable Razor compiler & code generator.
  • MockableStaticGenerator - stars last commit A C# source generator to make an interface and a class wrapper to test static/extension methods.
  • MockSourceGenerator - stars last commit A C# mocking library that generates mocks at compile-time using a source generator.
  • net_automatic_interface - stars last commit .Net Core Source Generator for Automatic Interfaces.
  • PrimaryConstructor - stars last commit Generate primary constructor from readonly fields.
  • PrimitiveStaticDataGenerator - stars last commit for creating methods that return optimized ReadOnlySpan<T> static data from primitive values.
  • PrintMembersGenerator - stars last commit helps re-defining C# record's PrintMembers method to force include/exclude certain members.
  • ResXFileCodeGenerator - stars last commit Generates strongly-typed resource classes for looking up localized strings.
  • SmallSharp - stars last commit Create, edit and run multiple C# 9.0 top-level programs in the same project by just selecting the startup program from the start button.
  • SpreadCheetah - stars last commit Create Excel files with a C# Source Generator for generating the rows.
  • StackXML - stars last commit Stack based zero-allocation XML serializer and deserializer.
  • StringLiteralGenerator - stars last commit for optimizing UTF-8 binaries.
  • StrongInject - stars last commit - compile time dependency injection for .NET.
  • StructPacker - stars last commit binary serializer that auto-generates C# serialization code to achieve peak runtime performance and efficiency.
  • Svg to C# Source Generators - stars last commit SVGC compiles SVG drawing markup to C# using SkiaSharp as rendering engine. SVGC can be also used as codegen for upcoming C# 9 Source Generator feature.
  • ThisAssembly - stars last commit Exposes project and assembly level information as constants in the ThisAssembly class.
  • Transplator - stars last commit A simple C# source generator for text templates.
  • Tinyhand - stars last commit - Tiny and simple data format/serializer using a source generator.
  • ValueChangedGenerator - stars last commit for generating PropertyChanged from inner struct members.
  • ValueObjectGenerator - stars last commit C# source generator is for ValueObjects (ie.Wrapper classes).
  • WrapperValueObject - stars last commit - for creating simple value objects wrapping primitive types.

Tips & Tricks

Collection of tips and tricks (simple and brief to fit in Tweet):

Tweeted by @raboof on Nov 16 2020 at 20:57:

See files emitted by #SourceGenerators by adding these properties to your (*.csproj) project file:

<EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>
<CompilerGeneratedFilesOutputPath>$(BaseIntermediateOutputPath)Generated</CompilerGeneratedFilesOutputPath>

Tweeted by @Chiser99 on Sep 02 2020 at 06:41:

I made a thing: https://github.com/chsienki/Kittitas

If you're building Roslyn Source Generators or Analyzers check it out, it makes debugging them inside the compiler easier. #roslyn #csharp #dotnetcore #sourcegenerators #analyzers

Articles

Videos

Demo, PoC and excercise projects

Maybe they can inspire you too!

  • AutoCoder - stars last commit for effective and flexible object coding.
  • RyanAlameddine/SourceGeneratorDemo - stars last commit contains 3 demos: hello world, INPC and OpCode class.
  • TMC-CSharp/CodeExerciseLibrary - stars last commit Library to help creating C# exercises. Generates missing methods and classes inside tests on the fly by using Source Generators.
  • DpdtInject - stars last commit DI container based on C# Source Generators. Its goal is to remove everything possible from runtime and make resolving process as faster as we can. This is achieved by transferring huge piece of resolving logic to the compilation stage into the source generator.
  • jakubsturc/talk-csharp-source-generators - stars last commit contains 4 generators: AutoNotify, ConsoleWritelineHijack, HelloWorld and SettingsXml, plus nice presentation slides.
  • Compile Time Method Execution Generator - stars last commit proof of concept that allows executing a method during compilation, so that it can be really fast during runtime.

Projects using custom Source Generators "internally"

  • NetFabric.Hyperlinq - stars last commit generates overloads for its extension methods.
  • RestEase - stars last commit uses Source Generator to generate interface implementations on compile time instead of in runtime via Reflection.Emit.
  • WarHub/wham - stars last commit generates code for immutable tree object graph based on red-green node approach used in Roslyn; generates custom XmlSerializer that supports C#9 records and ImmutableArray.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].