Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/RyanAlameddine/SourceGeneratorDemo
My presentation demo for C# 9 source generators
https://github.com/RyanAlameddine/SourceGeneratorDemo
Last synced: 28 days ago
JSON representation
My presentation demo for C# 9 source generators
- Host: GitHub
- URL: https://github.com/RyanAlameddine/SourceGeneratorDemo
- Owner: RyanAlameddine
- Created: 2020-09-15T03:10:05.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2021-07-27T15:10:37.000Z (over 3 years ago)
- Last Synced: 2024-08-04T02:07:42.050Z (4 months ago)
- Language: C#
- Homepage:
- Size: 17.6 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- csharp-source-generators - RyanAlameddine/SourceGeneratorDemo - ![stars](https://img.shields.io/github/stars/RyanAlameddine/SourceGeneratorDemo?style=flat-square&cacheSeconds=604800) ![last commit](https://img.shields.io/github/last-commit/RyanAlameddine/SourceGeneratorDemo?style=flat-square&cacheSeconds=86400) contains 3 demos: hello world, INPC and OpCode class. (Demo, PoC and excercise projects / Other)
README
# SourceGeneratorDemo
C# 9 source generators practice/demo projectSource generators allow users to create a Code-Analysis project which is able to actually add source code to the assembly on compile time.
This is similar to reflection but has some key advantages in the sense of performance and also user-friendlyness because intellisense can pick up on generated source.
This project contains three demos, one which is a simple hello world generator, one which automatically generates properties with a notify property changed event for all fields with a specific attribute,
and one which generates a static OpCode class which loads all the opCodes registered in a supplied json file in the project at compile time and generates instances of an OpCode class to represent them.