We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi everyone,
it would be cool if you could add support for the Options Pattern.
If there is at least one class that uses the attribute, the generated method should be: serviceCollection.AutoRegister(IConfiguration configuration);
serviceCollection.AutoRegister(IConfiguration configuration);
An attribute might look like this:
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)] public class OptionAttribute : Attribute { public string? Section {get;} public OptionAttribute(string? section = null) { Section = section; } }
Possible Usages:
[Option] public record RootOption {} [Option("SectionOption")] public record SectionOption {} [Option("SectionOption:InnerSection:MoreInnerSection")] public record InnerSectionOption {}
Thank you
The text was updated successfully, but these errors were encountered:
There are a number of considerations over both the surface area and extent to which ARI would be able to register options.
Mutability is quite a concern for a lot of people setting these types of objects up.
ARI would need to be able to new up one of these types, which isn't strictly what everyone wants. Since ARI is opinionated this may be ok.
new
There may be requirement to validate the options and as such provide more fine options within the attribute.
Sorry, something went wrong.
No branches or pull requests
Hi everyone,
it would be cool if you could add support for the Options Pattern.
If there is at least one class that uses the attribute, the generated method should be:
serviceCollection.AutoRegister(IConfiguration configuration);
An attribute might look like this:
Possible Usages:
Thank you
The text was updated successfully, but these errors were encountered: