-
Couldn't load subscription status.
- Fork 5.2k
Closed
Closed
Copy link
Labels
api-approvedAPI was approved in API review, it can be implementedAPI was approved in API review, it can be implementedarea-System.Reflection
Milestone
Description
Background and motivation
Hot Reload needs to mark metadata entities with an attribute or flag that instructs Reflection to not return them when enumerating types or type members.
See #75154
API Proposal
namespace System.Runtime.CompilerServices;
[AttributeUsage(AttributeTargets.All, AllowMultiple = false, Inherited = false)]
public sealed class MetadataUpdateDeletedAttribute : Attribute;API Usage
Reflection would filter out all types and members marked with this attribute if any Hot Reload change has been applied to the containing module/type.
Alternative Designs
If we need to optimize more we could mark the deleted member with RTSpecialName flag and only look up the custom attribute for members with this flag.
Risks
No response
Metadata
Metadata
Assignees
Labels
api-approvedAPI was approved in API review, it can be implementedAPI was approved in API review, it can be implementedarea-System.Reflection