Fody/MethodTimer

Shared MethodTimeLogger interceptor class

TomWHall opened this issue · 6 comments

My solution has a web application project and numerous referenced projects. I would like to implement the MethodTimeLogger class in my utility project / assembly which is referenced by most of the others, such that I can use the [Time] attribute within any of the projects, and the MethodTimeLogger implementation from the shared assembly will be what is injected for all of them. It seems that currently the MethodTimeLogger signature is only searched for within the same assembly as a Time attribute instance, is that correct? I could copy it to each project and have it delegate the actual logging to my shared project, but that seems unpleasant. Am I using this correctly? Thanks!

that is a reasonable request. I will get to it over the weekend

Sorry to harass you, just wondering what the likely timeframe is on this change as my workplace is keen to make use of this? Thanks!

@TomWHall sorry got distracted on the weekend. Prob wont get to it for a few more days now. Did you want to try for a pull request?

I'll wait if it is likely to be in the next couple of weeks. Thanks!

fixed in 1.14.0

Hi @SimonCropp,

Could I trouble you to add something to the ReadMe.MD to explain how to use this feature. I looked through your commit history for 1.15.0 and didn't see the code change related to enabling you to specify a MethodTimeLogger in a different assembly.

I'm hoping it's as easy as adding a setting in a config file :)