I want to create a live template with resharper that allows me to record input method input and method parameters, for example:
I have a method in my code:
public void searchByParams(String param1, String param 2) { SearchClass mySearchClass = new SearchClass(); mySearchClass.Search(param1, param2); }
Now, I want to add a log, so far I have two live templates created using resharper:
Enter which template code:
_logger.Info("Ingreso al método $METHOD_NAME$ ");
And exit what template code:
_logger.Info("Salida del método $METHOD_NAME$ ");
for $ METHOD_NAME $, I selected a macro: "containing the name of a type member"
Then, after using these live templates, my method ends as follows:
public void searchByParams(String param1, String param 2) { _logger.Info("Ingreso al método searchByParams "); SearchClass mySearchClass = new SearchClass(); mySearchClass.Search(param1, param2); _logger.Info("Salida del método searchByParams "); }
what well.
Now I want to change my "Enter" template so that it inserts a list of arguments (in this example param1 and param2) and makes it suitable for use with methods with different numbers of input parameters and different types.
How can i do this?
I am using resharper 6.
Thanks in advance.