-
Notifications
You must be signed in to change notification settings - Fork 45
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
Excluding properties weaving attribute on the level of class #98
Comments
You can try |
Very well, thank you! |
Did it work? If yes, you can close the issue. |
This technique is very useful. I need a bit other scenario, by default all assembly properties must be weaved by the aspect - it's important from security point of view and code observation. |
Do you mean use the |
[CompilerGenerated] looks like a good idea! |
I think, that behavior must be specified per aspect how to react on [CompilerGenerated]. |
Yes, using the |
Some more optimization thoughts (may be it's already possible, but I don't know how to achieve that).
In my scenario the advice is applied on the complete assembly. I have only one IMethod advice, but it's applied to all methods, properties and .actors after weaving (it is correct). Mentioned method (with dropped down performance) has a loop inside that creates 1000 objects of one type. This type is a POCO class with 20 properties and a constructor. Properties are quite simple, something like "public bool MyProperty {get; set;}" and I am ready to declare them as safe.
Mr.Advice applies the advice on each of them. I would like to exclude those properties from weaving, but without un-decorating each of them. I know that there is an exclusion attribute in Mr.Advice, but is there a way to exclude from weaving class only properties leaving methods? So, such attribute must be on the level of a class.
taken from
#97 (comment)
The text was updated successfully, but these errors were encountered: