samples
samples copied to clipboard
Source generator samples
In .NET 6 and upcoming .NET 7, new source generators were added in runtime libraries. Given the other useful runtime related samples in this repo (https://github.com/dotnet/samples/tree/main/core), it would be nice to have a sample per generator which demonstrates how to use it in standalone scenarios.
- JsonSerializableAttribute (net6.0)
- LoggerMessageAttribute (net6.0)
- LibraryImportAtrribute (net7.0)
- RegexGeneratorAttribute (net7.0)
cc @jkoritzinsky
Thank you for this recommendation. I do plan on creating content for the Regex
source generation, captured here: https://github.com/dotnet/docs/issues/30289