|
|
|
Mario Toffia
Customer
|
|
I hope (or rather not <!-- s:) --> <!-- s:) --> this feature do not exist in postsharp 2.0.
I use a TypeLevelAspect in order to provide aspects on some properties and methods. The selection critera of which properties that shall have aspects (and what aspects) is determined in the ProvideAspects method.
The thing is that some properties shall have aspect X on read operation and aspect Y on set operation and some properties do only have aspects on set operation etc.
And I don't have a clue how to tell the weaver to actually just provide a specific aspect to a set operation on a property using LocationInterceptionAspects.
Is it doable, can the weaver determine by the overrides in the aspect to determine if it shall instrument the property get/set method or not?
I'd guess the other way around is just to method aspect on GetGetMethod/SetMethod, but I really like the LocationInterceptionAspect. But on the other hand I'm a newbie <!-- s:) --> <!-- s:) -->
Cheers, Mario
|
|
|
|
|
Gael Fraiteur
SharpCrafters
|
|
|
You can use LocationInterceptionAspect and implement OnSetValue only. The code generated for the getter will be fairly fast.
|
|
|
|