-
Notifications
You must be signed in to change notification settings - Fork 33
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
Add the ability to prioritize decorators #255
Comments
This is implemented |
@ipjohnson thanks for this feature 🙏
Consider the following rare scenario: public interface ICommand<T>{
void Handle(T data);
}
[Audit]
[Log]
public class FirstCommand: ICommand<string> { ... }
[Database]
[Log]
[Audit]
public class SecondCommand: ICommand<string>{ ... } And there are three other decorators implementing the is it at all possible and reasonable? Thanks. |
Sadly attribute order is not preserved as part of the language specification. "The order in which attributes are specified in such a list, and the order in which sections attached to the same program entity are arranged, is not significant. For instance, the attribute specifications [A][B], [B][A], [A,B], and [B,A] are equivalent." |
Current you can prioritize exports but you can't prioritize decorators. It should be easy enough to add a fluent configuration method to allow this.
This was brought up in issue #253
The text was updated successfully, but these errors were encountered: