Skip to content

Instantly share code, notes, and snippets.

@layomia
Created January 26, 2023 11:10
Show Gist options
  • Save layomia/3110f076635681e6efb919b1e930e3f3 to your computer and use it in GitHub Desktop.
Save layomia/3110f076635681e6efb919b1e930e3f3 to your computer and use it in GitHub Desktop.
namespace Microsoft.Extensions.Configuration.Binder.SourceGeneration
{
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = false)]
// Specifies options to honor when generating binding logic.
// Presence indicates that the source generator should be invoked for the current assembly.
public sealed class BindingSourceGenerationOptionsAttribute : Attribute
{
// Specifies the generation mode.
public BindingSourceGenerationMode GenerationMode { get; set; }
}
[Flags]
public enum BindingSourceGenerationMode
{
// Generate static deserialization code.
Default = 0x0,
// Use reflection fallback.
UseReflectionFallback = 0x1,
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment