Skip to content

Support all applicable ConfigurationBinder method overloads in binding generator #83600

@layomia

Description

@layomia

Full list: https://learn.microsoft.com/dotnet/api/microsoft.extensions.configuration.configurationbinder?view=dotnet-plat-ext-8.0

An open question is whether to support overloads that take BinderOptions:

BindNonPublicProperties When false (the default), the binder will only attempt to set public properties. If true, the binder will attempt to set all non read-only properties.BindNonPublicProperties When false (the default), the binder will only attempt to set public properties. If true, the binder will attempt to set all non read-only properties.
ErrorOnUnknownConfiguration Gets or sets a value that indicates whether an exception is thrown when a configuration key doesn't have a matching property in the model object.ErrorOnUnknownConfiguration Gets or sets a value that indicates whether an exception is thrown when a configuration key doesn't have a matching property in the model object.

The issue is that source generators cannot support private properties; and it might not make sense to have partial support for the binder options.

cc @tarekgh @ericstj @eerhardt

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions