MethodBoundaryAspect.Fody icon indicating copy to clipboard operation
MethodBoundaryAspect.Fody copied to clipboard

Constructor weaving

Open jmartschinke opened this issue 4 years ago • 3 comments

It would be nice to be able to also weave the constructor. Is this a general restriction of fody?

jmartschinke avatar Sep 02 '21 12:09 jmartschinke

I am not really sure. Normally a ctor should also be just a method but this has to be checked.

Would this be an expected default behavior that also ctors are intercepted? E.g. if you have a logging aspect every instantiation should be logged?

Ralf1108 avatar Sep 03 '21 22:09 Ralf1108

I do think that constructor intercepting should be a default behaviour. When implementing the attribute you can always just not log the constructor (MethodBase.IsConstructor).

jmartschinke avatar Sep 06 '21 09:09 jmartschinke

Hi, any update on this?

hasanmanzak avatar Jan 10 '22 15:01 hasanmanzak