Skip to content

Instantly share code, notes, and snippets.

@kzu
Created September 18, 2020 13:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kzu/7b4b29035a1cfd453782393ec18a88fa to your computer and use it in GitHub Desktop.
Save kzu/7b4b29035a1cfd453782393ec18a88fa to your computer and use it in GitHub Desktop.
source-generators
/// <summary>
/// Provides access to the current assembly information as pure constants,
// without requiring reflection.
/// </summary>
partial class ThisAssembly
{
/// <summary>
/// Gets the assembly metadata.
/// </summary>
public static partial class Metadata
{
{{~ for md in Metadata ~}}
public const string {{ md.Key }} = @"{{ md.Value }}";
{{~ end ~}}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment