You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Exclude properties of delegate types in configuration source generator #94117
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:
These need to be excluded wherever they occur in the object graph including nullable, array, and collection members. They are OK to appear as generic parameters -- but should be excluded when appearing as members in such types.
changed the title [-]Exclude options properties of delegate types in configuration source generator[/-][+]Exclude properties of delegate types in configuration source generator[/+]on Oct 28, 2023
Activity
tarekgh commentedon Oct 27, 2023
CC @eerhardt @ericstj
ericstj commentedon Oct 28, 2023
We should match the exclusions used by JSON: https://github.com/dotnet/runtime/blob/9461f4b5bd036005f37e78516c48b13396f76750/src/libraries/System.Text.Json/gen/JsonSourceGenerator.Parser.cs#L1687C26-L1687C43
SerializationInfoIntPtr/UIntPtrMemberInfoand derived typesDelegateand derived typeThese need to be excluded wherever they occur in the object graph including nullable, array, and collection members. They are OK to appear as generic parameters -- but should be excluded when appearing as members in such types.
[-]Exclude options properties of delegate types in configuration source generator[/-][+]Exclude properties of delegate types in configuration source generator[/+]tarekgh commentedon Nov 10, 2023
This is now is completed.