So I'm working with an Api that isn't working and I have subscribed to all of the events to see what is going on. So, on the event handler there are lots of parameters. I want to just print them out to the console.
I want to have a template (either visual studio 2010 or Resharper) to write out all of the parameters with the names and values.
In Resharper there is a built-in template outv
that does them individually, but that is a pain to do each in turn.
I'm looking for something quick and can be throw-away.
Edit: Reasons why this isn't an exact duplicate at least any of the questions I've found or have been linked:
This is specifically about method parameters. Method parameters (as I have found) can not be reflected. I can use AOP, but that doesn't exactly fit my quasi-requirement for quick and easy. I am looking at that already, but I don't need anything long-term, so introducing postsharp into my project for only this concern seems an overkill.
Also, for objects, I am using System.Runtime.Serialization.Json.DataContractJsonSerializer
. It is part of .net and json is easy to read and it is three lines that I can get rid of quickly. But not applicable to method parameters.
Eclipse has something like this.