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
With configuration binding I see array values being duplicated.
With an app.toml file containing
app.toml
[Logging] [Logging.Sql] [Logging.Email] To = ['email1', 'email2']
config types
public record AppConfig(string ServiceName, LoggingConfig Logging) { public AppConfig() : this(ServiceName: "AppName", Logging: new()) { } } public record LoggingConfig { public LoggingEmailConfig? Email { get; set; } } public record LoggingEmailConfig(string[] To) { }
and setup
configurationManager.AddTomlFile("app.toml", optional: false, reloadOnChange: false); var config = configurationManager..Get<AppConfig>();
config.Email.To now contains ["email1", "email2", "email1", "email2"] instead of ["email1", "email2"].
config.Email.To
["email1", "email2", "email1", "email2"]
["email1", "email2"]
(I dropped unrelated properties and values from the types and toml to simplify the example.)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
With configuration binding I see array values being duplicated.
With an
app.toml
file containingconfig types
and setup
config.Email.To
now contains["email1", "email2", "email1", "email2"]
instead of["email1", "email2"]
.(I dropped unrelated properties and values from the types and toml to simplify the example.)
The text was updated successfully, but these errors were encountered: