samples icon indicating copy to clipboard operation
samples copied to clipboard

Source generator samples

Open am11 opened this issue 2 years ago • 1 comments

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

am11 avatar Apr 29 '22 09:04 am11

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

IEvangelist avatar Jul 20 '22 17:07 IEvangelist