Eligibility MustNotHaveAspectOfType

I want to have intellisense show a red squiggle under and attribute if it is added to a method that already has another attribute added.
I had assumed that MustNotHaveAspectOfType would fit the bill here but it seems I'm mistaken. What should I be using? Whilst we're on that subject can that eligibility be chained in an upwards direction. So for example if I apply a [NoLog] attribute to the class can I add build eligibility to a method aspect that would pick that up.? DeclaringType seems not be an option when applied to builder in the BuildEligibility override.
5 Replies
Gael Fraiteur
Gael Fraiteur2y ago
It depends if the attribute is an aspect. If it is not, then MustNotHaveAspectOfType will not work and you have to test the presence of the custom attribute using the code model.
domsinclair
domsinclairOP2y ago
That makes sense, the aspect I'm looking for is essentially a blank [NoLog] job that inherits from Attribute not aspect.
Gael Fraiteur
Gael Fraiteur2y ago
@addabis Please file an enhancement to test the interface type and throw an exception if it's not an aspect type.
addabis
addabis2y ago
Filed an enhancement for this.
Gael Fraiteur
Gael Fraiteur2y ago
Thanks
Want results from more Discord servers?
Add your server