Custom pattern not working

I'm trying to create a pattern to replace an auto-property to a property with backing field and change notification:

Search pattern:

public $type$ $name$ { get; set; }
(==> this works and R# can find it)

Replace pattern:

private $type$ m_$name$;
public $type$ $name$
    return m_$name$;
    if (m_$name$ != value)
      m_$name$ = value;
      OnPropertyChanged(() => $name$);

When I try to make the replacement, nothing happens...
There used to be an exception in R# in a previous build, but it's not there anymore.

I don't think I made a mistake in the replace pattern, but if I did, please let me know...

Kind regards,

Julien Poulin

1 comment
Comment actions Permalink

The problem is in m_$name$
ReSharper doesn't support such constructions now. Placeholders must be separate tokens in pattern. Here are related requests: and
Please vote for them.


Please sign in to leave a comment.