开发者

ReSharper template macro for method return type

开发者 https://www.devze.com 2023-01-15 02:52 出处:网络
I can\'t seem to find a way to insert the method return type in a ReSharper 5 macro. Can this be done?

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<$RESULT开发者_如何转开发TYPE$>() != 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.


Here you go:

(I updated the link)

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

0

精彩评论

暂无评论...
验证码 换一张
取 消