Место общения программистов C#
1726582873
Anonymous
В моем приложении есть сотни подобных строк:
[code]public ICommand MyCommandName => ReactiveCommand.Create(TriggerCommand);
[/code]
Я безуспешно пытался добавить собственный шаблон в resharper, чтобы изменить его на:
[code]private ICommand _MyCommandName;
public ICommand MyCommandName => _MyCommandName ??= ReactiveCommand.Create(TriggerCommand);
[/code]
Вот мой шаблон:
[img]https://i.sstatic.net/fzEuD3h6.png[/img]
< /p>
шаблон неоднозначен и не может быть сохранен.
Вот заполнители:
[img]https://i.sstatic.net/F0h7MPYV.png[/img]
[img]https://i.sstatic.net/0k2rBo9C.png [/img]
[img]https://i.sstatic.net/trbuapMy.png[/img]
[img]https://i.sstatic.net/oTQTcDbA.png[/img]
Подробнее здесь: [url]https://stackoverflow.com/questions/78994506/add-custom-refactoring-pattern-using-resharper[/url]