Any way to log parameter values for methods defined in LinqPad? (without hardcoding parameter names)
I'd like to be able to apply logging (of parameter values) to methods defined within LinqPad, is there some magic way to do this?
I've looked into using metalama (postsharp), but this will not work since LinqPad scripts are compiled with Roslyn.
I've already discussed with the metalama dev, Gael, but can't figure out a workaround for a solution outside of Linqpad - was wondering if there is something I can do within LinqPad to achieve parameter logging.
Here's what I'm trying to do - (stackoverflow question)
In terms of other solutions for logging, there are functional approaches, which work well on the call-side:
Hi Joe, thank you very much for this approach. This is a nice little workaround - I have just learned about
I'm going to add a bit to the code you provided to get the arg names and to evaluate the argument values - pieced together with the help of StackOverflow users.