Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ReSharper template macro for method return type

I can't seem to find a way to insert the method return type in a ReSharper 5 macro. Can this be done?

For example, I have the following template:

Contract.Ensure(Contract.Result<$RESULTTYPE$>() != null);

I would like $RESULTTYPE$ to be automatically filled with the data type of the current method, but I can't find a macro that would do that.

like image 419
Adam Ruth Avatar asked Sep 06 '10 00:09

Adam Ruth


1 Answers

Here you go:

(I updated the link)

http://blog.jetbrains.com/dotnet/2010/10/14/templates-galore-extending-functionality-with-macros/

like image 180
Hadi Hariri Avatar answered Oct 17 '22 02:10

Hadi Hariri