Skip to content

Consider allowing DynamicallyAccessedMembers on types #1196

Closed
@MichalStrehovsky

Description

@MichalStrehovsky

We don't currently allow this. The semantic would be "keep the specified member types on this type and all derived types".

Blazor has a pattern where it does Object.GetType on an unsealed type and then goes over the properties on that type. This annotation would make it so that the result of Object.GetType is an annotated System.Type instance (the annotation would be an aggregate of all DynamicallyAccessedMemberKinds specified on the type of this for the GetType call and its base types).

This would make the GetProperties call provably linker-safe extra annotations/suppressions.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions