How to Iterate a Resharper Template ?.
Posted
by sree
on Stack Overflow
See other posts from Stack Overflow
or by sree
Published on 2010-05-20T09:49:18Z
Indexed on
2010/05/20
9:50 UTC
Read the original article
Hit count: 212
resharper
I have a small Resharper Template I have written for Null check of a function Parameter (C#).
Check.IsNotNull($param$, "$param$"); - Suggest Parameter - #1
I can now null check the function paramters one by one. But I want to be able to null check all the paramters at once through a template. Is it Possible in Resharper?. Is there someting like a "$Foreach" using which I can loop through parameter variables and write the code to check them one by one ?. (without writing out the foreach into the code)
I see that the "Alt + Ins" does something similar. (Taking all Properties on the class and making them as parameters of a constructor). So hoping that there's a way out.
© Stack Overflow or respective owner