MethodBoundaryAspect.Fody
MethodBoundaryAspect.Fody copied to clipboard
Can MBA.Fody be applied on only public method boundaries?
I want to implement a certain aspect that will only be applied on public APIs and not on private/protected/internal APIs...
Is this easily possible to do with MBA.Fody?
I would prefer a solution where the weaver can be somehow filtered to not even re-write the non public methods...
this has to be configurable at the aspect level. If I have time i will investigate this
In the current state (1.0.12) you can do something like this, which works:
/// <summary>
/// works on methods
/// </summary>
[TestAspect]
public void Method()
{
Debug.WriteLine("Do some stuff");
}
@maulwuff I think I'm not entirely following... Does this allow me to intercept public methods only?
It allows you to decorate those methods where you put the attribute at. You can compile your project and look at the dll with ILspy to see what has happened
Am 14. Mai 2018 18:55:20 MESZ schrieb damageboy [email protected]:
@maulwuff I think I'm not entirely following... Does this allow me to intercept public methods only?
-- You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/vescon/MethodBoundaryAspect.Fody/issues/19#issuecomment-388887638
Would adding this functionality to MBA.Fody be something you'd be happy with accepting as a PR?
Sure, that would be great. It should be implemented somehow like postsharp does it (http://doc.postsharp.net/t_postsharp_extensibility_multicastattributes). And please write tests for it.
I was just about to submit this same issue.
If someone can confirm that this repo is still actively accepting PRs, I'd be happy to put something together.