Skip to content

Can an Aspect be added to a custom derived attribute class such as "public class MyAttribute : AuthorizeAttribute"? #261

Answered by gfraiteur
HowardShank asked this question in Q&A
Discussion options

You must be logged in to vote

Yes, this is possible. The modifications to the attribute will be visible at run time through reflection.

Another question is whether this is desirable. Unless you have many of these attributes (which I find weird), using an aspect on an attribute could be more complex than a pure object-oriented solution.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@HowardShank
Comment options

@gfraiteur
Comment options

Answer selected by HowardShank
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants