You will find in this book code examples about >10 Roslyn Source Code Generator (RSCG) that can be useful for you. That means, you will write more elegant and concise code - even if the generators code is not always nice to look.
I have done due diligence to test the RSCG that I have shown to you here. However, I cannot guarantee that will fit your code. That means that you can test it for your case and, because all are open source on Github.com, you can contribute to improve them
For each chapter, you will find
Please send me an email to ignatandrei@yahoo.com
In the introduction I have put the links to get you started with RSCG.
And, if you bought this book from Amazon, you are entitled to have 1 hour free of consultancy with me. I can help you make one.
Glad that you have asked. Please goto Amazon: https://amzn.to/3f6gll3
( and this will remain free: https://ignatandrei.github.io/RSCG_Examples/)
My name is Andrei Ignat and I have 20+ years programming experience.
I have started from VB3 , passed via plain old ASP
I am C# Microsoft Most Valuable Professional, and also https://forums.asp.net moderator .
Before that I was a teacher.
I am available also on
LinkedIN : http://ro.linkedin.com/in/ignatandrei
Facebook : http://www.facebook.com/ignat.andrei
Twitter: http://twitter.com/ignatandrei
You can ask me any .NET related question . I will be glad to answer – if I know the answer. If not, I will learn.
A Roslyn Source Code Generator (RSCG) is a program that generates code in the compile time, based on the previous source code and/or another data. This new source code is added to the compilation and compile with the previous source code.
For creating the RSCG you will simply create a .NET Standard 2.0 project, add those 2 references
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.1" PrivateAssets="all" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="3.8.0" />
and start implementing
public interface ISourceGenerator
{
void Initialize(GeneratorInitializationContext context);
void Execute(GeneratorExecutionContext context);
}
Start from examples at https://github.com/dotnet/roslyn-sdk/tree/main/samples/CSharp/SourceGenerators Also, you can read the source code for the RSCG presented in this book.
Start read
https://github.com/dotnet/roslyn/blob/main/docs/features/source-generators.md
and
https://github.com/dotnet/roslyn/blob/main/docs/features/source-generators.cookbook.md .
After that, you can play with the examples from https://github.com/dotnet/roslyn-sdk/tree/main/samples/CSharp/SourceGenerators or from https://sourcegen.dev/ (see AutoNotify in the dropdown)
Glad that you asked. You can see in action a RSCG for automatically generating code for automating testing (see DynamicMocking ) , parsing enum (see Enum ) , generating controllers actions from a interface ( SkinnyControllers ), currying functions and many more. In this book you will find more than 10 examples of some RSCG that can help you. Also, you can find the source code of the examples at https://github.com/ignatandrei/RSCG_Examples.
The ThisAssembly.Info allows you access to the Assembly Information as constants, instead of going to reflection each time. I found useful to see the assembly version right away in any project that I have.
The author of RSCG ThisAssembly is Daniel Cazzulino
You cand find RSCG ThisAssembly at Nuget.org : https://www.nuget.org/packages/ThisAssembly and the sources at https://github.com/devlooped/ThisAssembly
For more usage features please read : https://www.clarius.org/ThisAssembly/
https://github.com/ignatandrei/RSCG_Examples/tree/main/ApplicationVersion
This will generate code to fast parsing a int or a string to an enum
The author of RSCG Enum is Andrei Ignat
You cand find RSCG Enum at Nuget.org : https://www.nuget.org/packages/AOPMethodsCommon/ https://www.nuget.org/packages/AOPMethodsGenerator/ and the sources at http://github.com/ignatandrei/aop_With_Roslyn/
For more usage features please read : http://msprogrammer.serviciipeweb.ro/category/roslyn/
https://github.com/ignatandrei/RSCG_Examples/tree/main/Enum
This will generate C# a_class_bes from json files.
The author of RSCG JsonByExampleGenerator is Robin Hermanussen
You cand find RSCG JsonByExampleGenerator at Nuget.org : https://www.nuget.org/packages/JsonByExampleGenerator/ and the sources at https://github.com/hermanussen/JsonByExampleGenerator/
For more usage features please read : https://github.com/hermanussen/JsonByExampleGenerator/
https://github.com/ignatandrei/RSCG_Examples/tree/main/JsonToa_class_b
I'm a Software Architect at Iquality (software company in the Netherlands). I'm passionate about software development in general, but with a particular interest in .NET.
I have written a bunch of C# analyzers in the past that served specific needs and now wanted to get some experience in writing source generators. It seemed like a good idea to me to generate a_class_bes based on example JSON, because it replaces a task that I often find a bit tedious; writing data contract a_class_bes and then tests to ensure they get properly (de)serialized with the JSON that I'm using.
I'm not really using it in real world projects right now, as I'm not working on any projects that require it.
I've used ThisAssembly and a few others, for learning purposes.
If anyone wants to use JsonByExampleGenerator and give me feedback from the real world, let me know! I'll be happy to help out with any issues or questions you may run into. Just add an issue to the project on GitHub to get in touch.
This will generate code for a POCO to generate copy constructor and deconstructor
The author of RSCG CopyConstructor + Deconstructor is Andrei Ignat
You cand find RSCG CopyConstructor + Deconstructor at Nuget.org : https://www.nuget.org/packages/AOPMethodsCommon/ https://www.nuget.org/packages/AOPMethodsGenerator/ and the sources at http://github.com/ignatandrei/aop_With_Roslyn/
For more usage features please read : http://msprogrammer.serviciipeweb.ro/category/roslyn/
https://github.com/ignatandrei/RSCG_Examples/tree/main/CopyConstructor
AutoMapping from a POCO to a DTO. Lots of customizations
The author of RSCG GeneratedMapper is Thomas Bleijendaal
You cand find RSCG GeneratedMapper at Nuget.org : https://www.nuget.org/packages/GeneratedMapper/ and the sources at https://github.com/ThomasBleijendaal/GeneratedMapper
For more usage features please read : https://github.com/ThomasBleijendaal/GeneratedMapper
https://github.com/ignatandrei/RSCG_Examples/tree/main/DTOMapper
I'm Thomas Bleijendaal, I'm a .NET developer working for Triple in Alkmaar, The Netherlands.
I've started GeneratedMapper to get more familiar with source generation. While the tooling is a bit rough now, I do believe that this feature can really bring a lot of value to .NET.
I've been burned before by a lot of hard-to-find bugs caused by badly behaving mappers and runtime surprises from badly handled null-references. I wanted to create a object-to-object mapper that would be very picky and raise compilation errors instead of runtime exceptions. Being able to see what the mapper will do by simply inspecting the code is very handy, and makes you trust your mapper even more.
I use the GeneratedMapper in a project where I map models coming from Contentful to DTOs that are used in views. I've also tried to use it in another project, but because that targeted an older runtime I could not make that work. But, since I could copy all the generated mappers and maintain those manually, switching away from it wasn't that bad. I think that is also very valuable of code generation, you still have a copy of what a generator made for you.
I haven't really used any other RSCGs yet, other than a metadata generator that Microsoft made for the out-of-process .NET-based Azure Functions (https://github.com/Azure/azure-functions-dotnet-worker/). That stuff is all very preview still, so it could be removed from the product, but it's cool to see Microsoft starting to use it too.
Cool book!
This will generate code for WebAPI for each method of a field in the controller
The author of RSCG Skinny Controllers is Andrei Ignat
You cand find RSCG Skinny Controllers at Nuget.org : https://www.nuget.org/packages/SkinnyControllersCommon/ https://www.nuget.org/packages/SkinnyControllersGenerator/ and the sources at http://github.com/ignatandrei/aop_With_Roslyn/
For more usage features please read : http://msprogrammer.serviciipeweb.ro/category/roslyn/
https://github.com/ignatandrei/RSCG_Examples/tree/main/SkinnyControllers
Implements the Builder Design pattern for any a_class_b. Useful , at least, for test projects
The author of RSCG data-builder-generator is Martin Andreas Ulrich
You cand find RSCG data-builder-generator at Nuget.org : https://www.nuget.org/packages/DasMulli.DataBuilderGenerator/ and the sources at https://github.com/dasMulli/data-builder-generator
For more usage features please read : https://github.com/dasMulli/data-builder-generator
https://github.com/ignatandrei/RSCG_Examples/tree/main/DP_Builder
I am a software engineer working on diverse tech stacks but focusing mostly on .NET in C#, Web Technologies and iOS/Swift.
I am a technology enthusiast who always works on improving development and DevOps processes at our company to make life easier for developers and help deliver high. I was awarded Microsoft MVP for community and open-source work around .NET Core.
In "enterprise" contexts (I hate that term) one usually has to deal with business logic working on data objects. Writing tests is really important in these contexts but creating lots of test data for various scenarios can be quite cumbersome. You usually have some set of defaults (e.g. a base order with a dummy customer and items, an insurance application from a dummy customer etc.) and then deviate from it a little for each scenario. This is where C# 9 records would come in handy, but they were at the time not released and adopting them could be challenging (e.g. proper EF support while we're still on EF Core 3.1 anyway) so we opted for a test data builder approach where the builder a_class_bes would be generated. I did something similar a few years back at a previous company based on https://github.com/AArnott/CodeGeneration.Roslyn (which is now archived in favor of rolsyn source generators) and decided that for a current project I'll have a go and try to create something similar based on roslyn. While there are still a few bugs in the generator (get-only properties for example), this works quite well just annotating all EF model POCOs and then creating a few default builders that can be used from tests (Think TestData.DefaultOrder.WithoutCustomerAddress().Build()
Currently this is the only one. I hope that OpenAPI processing / generation will be a source generator soon - this is currently patched in via NSwag/MSBuild for some projects.
As mentioned I hope that some patterns of how to implement fast source generators emerge. This one likely isn't the best but I wanted to hold off a few months before refactoring. I don't plan on making a huge deal out of it, I just thought it's good to put useful tools we're building on GitHub for discussion and maybe it helps someone else as well.
This will generate code to retrieve the values of properties directly, not by reflection
The author of RSCG Metadata from object is Andrei Ignat
You cand find RSCG Metadata from object at Nuget.org : https://www.nuget.org/packages/AOPMethodsCommon/ https://www.nuget.org/packages/AOPMethodsGenerator/ and the sources at http://github.com/ignatandrei/aop_With_Roslyn/
For more usage features please read : http://msprogrammer.serviciipeweb.ro/category/roslyn/
https://github.com/ignatandrei/RSCG_Examples/tree/main/MetadataFromObject
This will generate Mock a_class_bes directly for any interface - with your implementation.
The author of RSCG MockSourceGenerator is Robin Hermanussen
You cand find RSCG MockSourceGenerator at Nuget.org : https://www.nuget.org/packages/MockSourceGenerator/ and the sources at https://github.com/hermanussen/MockSourceGenerator/
For more usage features please read : https://github.com/hermanussen/MockSourceGenerator/
https://github.com/ignatandrei/RSCG_Examples/tree/main/DynamicMocking
I'm a Software Architect at Iquality (software company in the Netherlands). I'm passionate about software development in general, but with a particular interest in .NET.
I have written a bunch of C# analyzers in the past that served specific needs and now wanted to get some experience in writing source generators. The thing about libraries like Moq or NSubstitute that I don't really like is how it takes so much code to set them up and then I don't find them very readable. MockSourceGenerator takes an approach that allows people to mock something in a single statement (with an object initializer) and I think it is more readable this way.
I'm not really using it in real world projects right now, as I'm not working on any projects that require it.
I've used ThisAssembly and a few others, for learning purposes.
If anyone wants to use MockSourceGenerator and give me feedback from the real world, let me know! I'll be happy to help out with any issues or questions you may run into. Just add an issue to the project on GitHub to get in touch.
This will generate code to decorate methods with anything you want ( stopwatch, logging , authorization...)
The author of RSCG Method decorator is Andrei Ignat
You cand find RSCG Method decorator at Nuget.org : https://www.nuget.org/packages/AOPMethodsCommon/ https://www.nuget.org/packages/AOPMethodsGenerator/ and the sources at http://github.com/ignatandrei/aop_With_Roslyn/
For more usage features please read : http://msprogrammer.serviciipeweb.ro/category/roslyn/
https://github.com/ignatandrei/RSCG_Examples/tree/main/MethodDecorator
This will generate curry for your functions
The author of RSCG PartiallyApplied is Jason Bock
You cand find RSCG PartiallyApplied at Nuget.org : https://www.nuget.org/packages/PartiallyApplied/ and the sources at https://github.com/JasonBock/PartiallyApplied
For more usage features please read : https://github.com/JasonBock/PartiallyApplied
https://github.com/ignatandrei/RSCG_Examples/tree/main/PartiallyFunction
This will generate code to add IFormattable to any a_class_b, based on the properties of the a_class_b
The author of RSCG IFormattable is Andrei Ignat
You cand find RSCG IFormattable at Nuget.org : https://www.nuget.org/packages/AOPMethodsCommon/ https://www.nuget.org/packages/AOPMethodsGenerator/ and the sources at http://github.com/ignatandrei/aop_With_Roslyn/
For more usage features please read : http://msprogrammer.serviciipeweb.ro/category/roslyn/
https://github.com/ignatandrei/RSCG_Examples/tree/main/IFormattable
Implement the Design Pattern Decorator. Based on template - you can modify the source code generated
The author of RSCG AutoInterface is beakona
You cand find RSCG AutoInterface at Nuget.org : https://www.nuget.org/packages/BeaKona.AutoInterfaceGenerator and the sources at https://github.com/beakona/AutoInterface
For more usage features please read : https://github.com/beakona/AutoInterface
https://github.com/ignatandrei/RSCG_Examples/tree/main/DP_Decorator
I am a dad and software developer with more than 15 years of working experience in various industries and technologies. I am working mostly on embedded and desktop solutions mainly in C and C#.
After the Source Generator public announcement, I decided to give them a try. I realized that Source Generators would allow us to explore composition-over-inheritance in its new form (from C# perspective). Technically, this approach uses interface invocation (which impacts performance) but one can view it as one form of composition. I consider myself a language designer and I wanted to explore the mechanics of this approach (regardless of poor performance) on existing and reputable language that I use daily.
I use it experimentally as a tool that allows a a_class_b to be composed-of-members and yet acts as inherited-as. Young and experimental languages have similar concepts as an alternative to inheritance. Those who find this interesting can explore the approach chosen by Jonathan Blow in its language Jai
There is only one Source Generator that I use in production; AutoCoder and it is not public because I didn't find time to make it configurable and polished. It automatically implements ICoding interface for the target a_class_b (Bridge pattern). I have been using this approach for years because the existing infrastructure does not work for me. The main concept is inspired by Foundation framework a_class_b NSCoder but is implemented in the C# way. Abstraction-side has two directions IEncoding/IDecoding and there are two implementers: IEncoder and IDecoder. AutoCoder acts on behalf of the abstraction side by offering targeted fields/properties to IEncoder/IDecoder. The author of IEncoder/IDecoder can decide what, how, when, and in which context to encode/decode. In other words, AutoCoder automates boring stuff and does not make typos.
If you have special, funny, or helpful paragraphs that acts like mentor or life coach concept I think there is worth mentioning TED talk: Why you will fail to have a great career by Larry Smith or book: "Hold on to Your Kids: Why Parents Need to Matter More Than Peers", 2019, by Dr. Gabor Maté and Gordon Neufeld.
This will generate code to add function to be used with Entity Framework to search for any property of a a_class_b
The author of RSCG Property Expression Generator is Andrei Ignat
You cand find RSCG Property Expression Generator at Nuget.org : https://www.nuget.org/packages/AOPMethodsCommon/ https://www.nuget.org/packages/AOPMethodsGenerator/ and the sources at http://github.com/ignatandrei/aop_With_Roslyn/
For more usage features please read : http://msprogrammer.serviciipeweb.ro/category/roslyn/
https://github.com/ignatandrei/RSCG_Examples/tree/main/PropertyExpressionGenerator
The Transplator is a small fast rendering engine to allow you to make rendering from any a_class_b instance.
The author of RSCG Transplator is Atif Aziz
You cand find RSCG Transplator at Nuget.org : https://www.nuget.org/packages/Transplator/ and the sources at https://github.com/atifaziz/Transplator/
For more usage features please read : https://github.com/atifaziz/Transplator/
https://github.com/ignatandrei/RSCG_Examples/tree/main/TemplateRender
The AMS will add in the CI the version and creator to your project.See https://netcoreblockly.herokuapp.com/ams for an example
The author of RSCG RSCG_AMS is Andrei Ignat
You cand find RSCG RSCG_AMS at Nuget.org : https://www.nuget.org/packages/AMS_Base https://www.nuget.org/packages/AMSWebAPI https://www.nuget.org/packages/RSCG_AMS and the sources at https://github.com/ignatandrei/RSCG_AMS
For more usage features please read : https://github.com/ignatandrei/RSCG_AMS
https://github.com/ignatandrei/RSCG_Examples/tree/main/CI_Version
HttpClientGenerator is a tool that uses Roslyn code generator feature to write boilerplate HttpClient code for you.
The author of RSCG HttpClientGenerator is Jalal Amini Robati
You cand find RSCG HttpClientGenerator at Nuget.org : https://www.nuget.org/packages/HttpClientGenerator/ and the sources at https://github.com/Jalalx/HttpClientCodeGenerator
For more usage features please read : https://github.com/Jalalx/HttpClientCodeGenerator
https://github.com/ignatandrei/RSCG_Examples/tree/main/HttpClientCodeGenerator
I am working as a senior software engineer at Alibaba Travels.
I built HttpClientGenerator to help users stop writing HttpClient code. Currently, some users use tools like swaggergen which generates too much code that is hard to maintain.
I am going to use it in a high-traffic website on production when it gets mature enough. I mostly use it on my personal projects and look for feedback from developers for now.
Since the RSCG is in the early stages, I don't know that many tools but I think it can be applied to many areas like DI, ORMs. Currently Dapper.AOT is using this feature that would make writing database code so much faster.
This will generate code (WebAPI/Swagger) for any table/view from SqlServer. You can see the table via Angular
The author of RSCG DatabaseToWebAPI is Andrei Ignat
You cand find RSCG DatabaseToWebAPI at Nuget.org : https://www.nuget.org/packages/QueryGenerator/ and the sources at https://github.com/ignatandrei/QueryViewer/
For more usage features please read : http://msprogrammer.serviciipeweb.ro/category/roslyn/
https://github.com/ignatandrei/RSCG_Examples/tree/main/QueryGenerator
Auto register services in startup
The author of RSCG SourceInject is Giovanni Bassi
You cand find RSCG SourceInject at Nuget.org : https://www.nuget.org/packages/SourceInject/ and the sources at https://github.com/giggio/sourceinject
For more usage features please read : https://github.com/giggio/sourceinject
https://github.com/ignatandrei/RSCG_Examples/tree/main/AutoRegister
Generated tiny types from any value type
The author of RSCG BaseTypes is Andreas Dorfer
You cand find RSCG BaseTypes at Nuget.org : https://www.nuget.org/packages/AndreasDorfer.BaseTypes/ and the sources at https://github.com/Andreas-Dorfer/base-types
For more usage features please read : https://github.com/Andreas-Dorfer/base-types
https://github.com/ignatandrei/RSCG_Examples/tree/main/TinyTypes
This will generate a_class_bes code from appsettings . Additionally , it generates API controller for editing and an UI interface
The author of RSCG AppSettingsEditor is Andrei Ignat
You cand find RSCG AppSettingsEditor at Nuget.org : https://www.nuget.org/packages/appSettingsEditor/ and the sources at https://github.com/ignatandrei/appSettingsEditor
For more usage features please read : http://msprogrammer.serviciipeweb.ro/category/roslyn/
https://github.com/ignatandrei/RSCG_Examples/tree/main/appSettingsEditor
This will generate code for investigating at runtime the properties of an object
The author of RSCG ApparatusAOT is Stanislav Silin
You cand find RSCG ApparatusAOT at Nuget.org : https://www.nuget.org/packages/Apparatus.AOT.Reflection/ and the sources at https://github.com/byme8/Apparatus.AOT.Reflection
For more usage features please read : https://github.com/byme8/Apparatus.AOT.Reflection
https://github.com/ignatandrei/RSCG_Examples/tree/main/ApparatusAOT
I am a software developer. Interested in the app architecture and performance optimizations
I am constantly looking for ways how to reduce the amount of boilerplate code. So, I decided to make a place where I can put all my findings. Maybe they will be useful for someone else. 'Apparatus' is the name of a community/organization. The 'AOT' is just a suffix for the indication that the tool is intended for the AOT scenarios.
Right now, ZeroIoc is actively used in one commercial project. Other stuff like AOT.Reflection, DuckInterface in just experiments to investigate the possibility and effectiveness of such tools.
At the moment I don't use any of them.
This will generate an error from the comment after a certain date
The author of RSCG RSCG_TimeBombComment is Andrei Ignat
You cand find RSCG RSCG_TimeBombComment at Nuget.org : https://www.nuget.org/packages/RSCG_TimeBombComment/ and the sources at https://github.com/ignatandrei/RSCG_TimeBombComment
For more usage features please read : http://msprogrammer.serviciipeweb.ro/category/roslyn/
https://github.com/ignatandrei/RSCG_Examples/tree/main/TimeBombComment
This will generate code .ToString. Usefull for debugging
The author of RSCG StructRecordsGenerator is Sergey Teplyakov
You cand find RSCG StructRecordsGenerator at Nuget.org : https://www.nuget.org/packages/StructRecordGenerator/ and the sources at https://github.com/SergeyTeplyakov/StructRecordsGenerator
For more usage features please read : https://github.com/SergeyTeplyakov/StructRecordsGenerator
https://github.com/ignatandrei/RSCG_Examples/tree/main/DebuggerToString
This will tracing methods marked with AOPMarkerMethod in CI builds. Does not affect the code run by the programmer.
The author of RSCG AOPMarkerCI is Andrei Ignat
You cand find RSCG AOPMarkerCI at Nuget.org : https://www.nuget.org/packages/AOPMethodsCommon/ https://www.nuget.org/packages/AOPMethodsGenerator/ and the sources at http://github.com/ignatandrei/aop_With_Roslyn/
For more usage features please read : http://msprogrammer.serviciipeweb.ro/category/roslyn/
https://github.com/ignatandrei/RSCG_Examples/tree/main/AOPMarkerCI
This will generate interface from a a_class_b
The author of RSCG BoilerplateFree is Gustav Wengel
You cand find RSCG BoilerplateFree at Nuget.org : https://www.nuget.org/packages/boilerplatefree and the sources at https://github.com/GeeWee/boilerplatefree
For more usage features please read : https://github.com/GeeWee/boilerplatefree
https://github.com/ignatandrei/RSCG_Examples/tree/main/a_class_b2Interface
I'm a 28 year old software developer from Aarhus, Denmark. I work primarily within CleanTech as I think the climate emergency is one of the most pressing issues we face currently. I've worked with C# and .NET for about two years.
Because I thought some of the limitations that the C# language offers sucked. I saw things like Project Lombok in the Java space that made the language much more ergonomic, and I wanted to see if I could bring some of that stuff into the C# space.
I use it for a few small-scale production projects. I think the jury is still out whether or not using source generators this way is a good idea or not, but so far it's been a real positive experience.
None yet.
Nope!
There are more awesome RSCG that you could use - here is a list of 53 RSCG that you may want to look at:
Nr | Name | Description |
---|---|---|
1 | chsienki/AutoEmbed | Source generator to easily embed and access files + directory trees |
2 | mostmand/Cloneable | Auto generate Clone method using C# Source Generator |
3 | jeromelaban/fonderie | A source generator for the INotifyPropertyChanged interface using the Uno.SourceGenera tion framework |
4 | excubo-ag/Generators.Blazor | This project improves the performance of Blazor components using source generators and provides helpful diagnostics. |
5 | excubo-ag/Generators.Grouping | Some APIs have a lot of methods. When they all reside in the same ob ject, finding the right API call can be a challenge to the users. But replacing the structure of the API from a monolithic API to an API with intuitively named and smaller groups would break existing code. The solution is to offer both, without having to write the grouping yourself. |
6 | ladeak/JsonMergePatch | Provides an implementation for Json Merge Patch, RFC7396. Library using C# source ge nerators to generate the types required for serialization. The Http package provides extension methods for HTTP requests, while the AspNetCore package provides an InputReader implementation. |
7 | Zoxive/MemoizeSourceGenerator | Memoize |
8 | Tyrrrz/MiniRazor | Portable Razor compiler & code generator |
9 | thomas-girotto/MockGen | A C# mocking library based on source generators |
10 | Sholtee/proxygen | .NET proxy generator powered by Roslyn |
11 | JasonBock/Rocks | A mocking library based on the Compiler APIs (Roslyn + Mocks) |
12 | Jishun/RoslynWeave | An AOP code generator |
13 | devlooped/SmallSharp | 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. |
14 | robertturner/StaticProxyGenerator | Interface proxy generator. At compile time creates a_class_b th at implements target interface. Instantiation of the generated a_class_b accepts an InterceptorHandler which is called for all method calls |
15 | ufcpp/ValueChangedGenerator | Roslyn Code Fix / Source Generator for generating PropertyChanged from inner struct members. |
16 | mattiasnordqvist/Web-Anchor | Web Anchor provides type-safe, testable and flexible, runtime-generated access to web resources. |
17 | martinothamar/WrapperValueObject | A .NET source generator for creating simple value objects wra pping primitive types. |
18 | gabriele-tomassetti/code-generation-roslyn | Code generation with Roslyn and parsing w ith Sprache |
19 | YairHalberstadt/stronginject | compile time dependency injection for .NET |
20 | thinktecture/article-roslyn-source-generators | Roslyn Source Generators, Analyzers and Code Fixes |
21 | HamedFathi/MockableStaticGenerator | A C# source generator to make an interface and a a_class_b wr apper to test static/extension methods. |
22 | mrtaikandi/MapTo | A convention based object to object mapper using Roslyn source generator. |
23 | dominikjeske/Dnf.SourceGenerators | SourceGenerators |
24 | Flash0ver/F0.Generators | The open source of truth for general-purpose C# source code generators. |
25 | giggio/sourceinject | A source generator for C# that uses Roslyn (the C# compiler) to allow you to generate y our dependencies injection during compile time. |
26 | anton-yashin/LightMock.Generator | aot mock generator |
27 | sungaila/Cdelta | A C# source generator for finite-state machines ??? easily referenced as a Roslyn analyzer. |
28 | JoshDiDuca/CodeSourceGenerator | Generates code from templates using the new roslyn source generat or. |
29 | MelGrubb/BuilderGenerator | A source-generator-based implementation of the Builder pattern |
30 | MelGrubb/BuilderGenerator | A source-generator-based implementation of the Builder pattern |
31 | MelGrubb/BuilderGenerator | A source-generator-based implementation of the Builder pattern |
32 | MelGrubb/BuilderGenerator | A source-generator-based implementation of the Builder pattern |
33 | wieslawsoltes/Svg.Skia | An SVG rendering library. |
34 | marlond18/EMDD.KtEquatable | C# 9.0 Source Generator for IEnumerable of T |
35 | petarpetrovt/fast-enum-string | A source generator for generating a faster extension method for con verting an enumeration value to string. |
36 | andrewlock/StronglyTypedId | A Rosyln-powered generator for strongly-typed IDs |
37 | vrenken/EtAlii.Generators | A set of Roslyn generators to simplify usage of some of the more mainstream frameworks/libraries. |
38 | ashmind/SourceMock | SourceMock is a C# mocking framework based on source generators |
39 | SergeyTeplyakov/StructRecordsGenerator | A set of generators helping dealing with structs in C# |
40 | mehmetakbulut/SignalR.Strong | Strongly-typed calls from client to server and handlers for calls fro m server to client |
41 | canton7/RestEase | Easy-to-use typesafe REST API client library for .NET Standard 1.1 and .NET Framework 4.5 and higher, which is simple and customisable. Inspired by Refit |
42 | byme8/DuckInterface | Experiments for duck typing support in C#. |
43 | byme8/ZeroIoC | ZeroIoC is reflectionless IoC Container for .NET |
44 | Cysharp/UnitGenerator | C# Source Generator to create value-object, inspired by units of measure. |
45 | GeeWee/boilerplatefree | Remove boilerplate via C# 9 source generators and attributes. Allows you to auto- generate interfaces from a_class_bes, constructors from fields and more |
46 | GeeWee/boilerplatefree | Remove boilerplate via C# 9 source generators and attributes. Allows you to auto- generate interfaces from a_class_bes, constructors from fields and more |
47 | MelGrubb/BuilderGenerator | A source-generator-based implementation of the Builder pattern |
48 | MelGrubb/BuilderGenerator | A source-generator-based implementation of the Builder pattern |
49 | MelGrubb/BuilderGenerator | A source-generator-based implementation of the Builder pattern |
50 | MelGrubb/BuilderGenerator | A source-generator-based implementation of the Builder pattern |
51 | panoukos41/ViewBindingsGenerator | A project that generates a partial a_class_b (view) for Activitie s/Fragments that will contain properties with the same name as their android:id in the xml view file. |
52 | alekshura/SourceMapper | Mappings code generator based on attributes |
53 | Burgyn/MMLib.MediatR.Generators | This generator generates controllers and their methods for you based on your MediatR requests. |
I am happy that you have read / or practice / the RSCG presented in this book. I hope that inspired you to produce yours - and send me to review and maybe add to this book .
If you bought this book from Amazon, https://amzn.to/3f6gll3, you are entitled to have 1 hour free of consultancy with me.
Thanks ! Andrei