Search for:
if \(handler \!= null\)\s*\r?\n\s*\{\r?\n\s*handler\((?<args>.*?)\);\r?\n\s*\}
and replace using:
handler?.Invoke(${args});
For example, this will be matched and replaced
if (handler != null)
{
handler(this, new DialogResponseEventArgs(id, true));
}
with this
handler?.Invoke(this, new DialogResponseEventArgs(this.dialogCorrelationId, message.Response == ShellDialogButton.Cancel));
No comments:
Post a Comment