Skip to content
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

Q: Is there a way to apply this to all public and only public methods of type? #86

Open
epitka opened this issue Jul 27, 2021 · 3 comments

Comments

@epitka
Copy link

epitka commented Jul 27, 2021

I want to do some post processing on every public method invocation of an aggregate. Is there a way to filter application of this? If I apply to a class level it gets invoked for all methods, even on properties.

@Ralf1108
Copy link
Collaborator

Currently there is no possibility to filter for specific methods. This has to be implemented first.

Filters could then be:

Methodname via RegEx
By accessibility modifier
By type (method or property)

Another possibility would be to use the approach from PostSharp and CompileTimeValidate method. But this requires executing code from the aspect during weaving.

@psaxton
Copy link

psaxton commented Nov 11, 2022

@epitka This may have been solved in v2.0.139 using the MulticastAttributes overload of the attribute. See src/MethodBoundaryAspect.Fody.UnitTests.TestAssembly.NetFramework/PublicMethodAttributeAspectMethods.cs for an example of how this works.

Acknowledging this old issue may no longer be of interest to you, if this is not what you're trying to accomplish, could you please provide a description of what you're wanting to do differently? Is it just property backing methods you want excluded?

@epitka
Copy link
Author

epitka commented Dec 23, 2023

Yes, I would like to exclude any properties methods. I wand to add some out-of-box tracing, and I only want user defined methods to be included in trace.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants