Custom Code inspection rename a datetime variable/parameter.

We have a system with a lot of datetimes and different timezones. The system is mostly Utc based but most output (webservices, UI) is local. We want to force (or suggest) that all datetime instaces declared follow a naming schema: Either post fixed with Local or Utc.

I'm trying to setup a Custom Pattern for it. I have a sort of working regular expression.:

So I setup my pattern as c# search pattern:
DateTime $identifier$;

Then add a placeholder of type identifier with name identifier and name regexp:

Then replacement is
DateTime $identifier$Utc;

Somehow it gives me the dropdown in code with the suggestion, but it replaces the whole vairable name with Utc and after replacement doesnt go away:
Datetime Utc;

1) First Is this possible with reshaper code inspection?
2) I really want the it to be DateTime myNameUtc; //(if the name typed was myName)
3) How do I get two options in the drop down? Copy the setup but no with description add Local and replacement Local instead of Utc?

Thanks in advance!

(VS2012, latest resharper 7, C#)

Please sign in to leave a comment.