Skip to content

[FEATURE] Allow replication of attributes on mixins or attributes on inherited interfaces #607

@ExusAltimus

Description

@ExusAltimus

I have a scenario where the attribute I want on the proxy's property is not being replicated over from a mixin.
The attribute itself is sealed and I can't modify the AttributeUsage to set Inherited to false.

The feature itself was considered once before in

public static IEnumerable<CustomAttributeInfo> GetNonInheritableAttributes(this MemberInfo member)

Quoting the comment

// Later, there might be more special cases requiring attribute replication,
// which might justify creating a `SpecialCaseAttributeThatShouldBeReplicated`
// method and an `AttributesToAlwaysReplicate` class. For the moment, `Param-
// ArrayAttribute` is the only special case, so keep it simple for now:

Also it would be nice if we could also apply Attributes to proxy members and not only the class using ProxyGenerationOptions :>)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions