Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v4] Broader changes for the story around attributes and their inheritance #4292

Open
Tracked by #1285
Youssef1313 opened this issue Dec 9, 2024 · 0 comments
Open
Tracked by #1285
Milestone

Comments

@Youssef1313
Copy link
Member

This issue serves as a proposal for changes related to attributes and how we do the reflection.

  1. ALL calls to GetCustomAttributes should use inherit: true.

  2. Attributes that are not inheritable (e.g, TestClassAttribute), will have Inherited = false in their attribute usage.
    This means two things:

    • Even if we use inherit: true, they are not inherited because of the attribute usage.
    • Users are allowed to introduce a new attribute, class MyTestClassAttribute : TestClassAttribute that has AttributeUsage with Inherited = true, in that case, we allow inheritance, as it's explicitly stated by the user.

More changes may be needed to have better and consistent experience, but this may be a good first step aimed for v4

cc @Evangelink

@Youssef1313 Youssef1313 added this to the 4.0.0 milestone Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant