Does MulticastAttributeUsage.AutoReplace work?
2 posts • Page 1 of 1
Does MulticastAttributeUsage.AutoReplace work?
Hi Gael!
I cannot recognize MulticastAttributeUsage.AutoReplace does not work or I misunderstand its meaning.
Attribute declaration
[MulticastAttributeUsage( MulticastTargets.Method | MulticastTargets.Constructor, AllowMultiple = true, AutoReplace = true )]
public class ValidateArgumentsAttribute : MulticastAttribute,IRequirePostSharp
{//...}
Attribute using
[ValidateArguments(AttributePriority = 500 )]
class Test
{
[ValidateArguments( AttributePriority = 10)]
static void TestAspects( [NotNull] object test )
{
//...
}
}
Advice is applied to the TestAspects method twice, I tried to swap AttributePriority value but it does not help.
When I use MulticastAttribute.AttributeReplace property it works as expected, so advice is applied once.
Ed.ward
Edward Pavlov
- Ed_ward
- Posts: 11
- Joined: Sat Jan 12, 2008 4:55 pm
- Full Name: Edward Pavlov
Re: Does MulticastAttributeUsage.AutoReplace work?
This *should* work. If it does not, please report a bug
.
AttributePriority only influences priority at the same level (assembly/class/level). Lower levels have always higher priority over higher levels.
Gael
.
AttributePriority only influences priority at the same level (assembly/class/level). Lower levels have always higher priority over higher levels.
Gael
Gael Fraiteur, project leader
got good support? consider donating to the project.
got good support? consider donating to the project.
- gfraiteur
- Site Admin
- Posts: 651
- Joined: Tue Dec 18, 2007 3:09 pm
- Full Name: Gael Fraiteur
- Company: postsharp.org
2 posts • Page 1 of 1