Skip to content

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

Open
@Youssef1313

Description

@Youssef1313

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions