Allow to apply DynamicallyAccessedMembers recursively for type members #112356
Unanswered
Dreamescaper
asked this question in
Ideas
Replies: 1 comment 3 replies
-
This doesn't currently exists. We considered adding it, but in the end none of the reflection-based serializers that we looked at would be able to use this. The places where a simple recursive enumeration fell apart were things like:
|
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm wondering whether it would be possible for something like this to happen:
Basically, the suggestion is to add
ApplyRecursively
property toDynamicallyAccessedMembers
attribute. It would instruct the linker to preserve not only member of the target type, but also apply it recursively - in this case, toSubType
type - preserving its public properties and constructors.I realize that the proper way to handle such cases - is via source generation. But I think that most libraries (especially smaller ones) will not create their source generators.
Beta Was this translation helpful? Give feedback.
All reactions