Skip to content

Exclude properties of delegate types in configuration source generator #94117

@tarekgh

Description

@tarekgh

Presently, the configuration source generator generates binding code for properties employing delegate, Func, or Action types. However, there is no means to bind configuration to such types. Consequently, the generator generates an abundance of code for all types associated with these delegates, many of which will not be utilized and may lead to code that does not compile. Here's an example:

https://github.com/dotnet/extensions/blob/14943b99572078f1bcf2c51e9507cf2631133fae/src/Libraries/Microsoft.Extensions.Resilience/Resilience/Internal/FailureEventMetricsOptions.cs#L11

This issue is tracking to fix the source generator to skip generating any code for such properties or types.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions