Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/B1Z0N/LazyshGen
Source generator to get seamlessly lazy at compile time.
https://github.com/B1Z0N/LazyshGen
csharp csharp-sourcegenerator source-generators sourcegenerator
Last synced: 3 months ago
JSON representation
Source generator to get seamlessly lazy at compile time.
- Host: GitHub
- URL: https://github.com/B1Z0N/LazyshGen
- Owner: B1Z0N
- License: mit
- Created: 2021-08-10T22:48:17.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2023-02-25T13:35:11.000Z (over 1 year ago)
- Last Synced: 2024-04-23T21:08:02.399Z (7 months ago)
- Topics: csharp, csharp-sourcegenerator, source-generators, sourcegenerator
- Language: C#
- Homepage:
- Size: 37.1 KB
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- RSCG_Examples - Lazysh
- csharp-source-generators - Lazysh - ![stars](https://img.shields.io/github/stars/B1Z0N/LazyshGen?style=flat-square&cacheSeconds=604800) ![last commit](https://img.shields.io/github/last-commit/B1Z0N/LazyshGen?style=flat-square&cacheSeconds=86400) Lazy implementation of any interface. (Source Generators / Other)
README
# Lazysh source generator
See [this](Usage/Program.cs) for detailed tutorial.
# Limitations
Unfortunately, as this project helped me to find out, we can't be more implicit about source generation.
Compiler can't run through all usages of LazyshFactory, get all such interfaces and generate lazies for them on demand.
It won't work as the C++ templates do. You should always register it with some kind of static compile-time field/attribute/declaration and so on.### BUT
If you think it's possible and have some hints on how to do it(how to actually emulate C++ tempaltes in C# source generation + C# generics),
### THEN
please contact [me](https://linktr.ee/b1z0n).