-
-
Save olejorgensen/0138f0b50471d54b5f17f694b730ea99 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CTRl+SHIFT+F | |
tick "Look In" to current document | |
tick regular expression | |
tick match whole word | |
Filetype *.cs | |
find: | |
(NotifyPropertyChanged|RaisePropertyChanged|ArgumentNullException|ArgumentOutOfRangeException)\(([\s\t\r\n]?)\"\b(_\w+|[\w-[0-9_]]\w*)\b\" | |
replace: | |
$1($2nameof($3)) | |
find: | |
ArgumentNullException\(\"\b(_\w+|[\w-[0-9_]]\w*)\b\"\) | |
replace: | |
ArgumentNullException\(nameof($1)) | |
find: | |
(NotifyPropertyChanged|RaisePropertyChanged|ArgumentNullException|ArgumentOutOfRangeException)\(\"\b(_\w+|[\w-[0-9_]]\w*)\b\"\) | |
replace: | |
$1(nameof($2)) | |
Traces | |
remember to set "Look In" to current document - it changes without warning p.o.s | |
tick regular expression | |
untick match whole word | |
Filetype *.cs | |
find: | |
Trace.WriteLine\(\$" \{Name\}\.([a-z_]+)(\"|:) | |
replace: | |
Trace.WriteLine($" {Name}.{nameof($1)}$2 | |
find: | |
Trace.WriteLine\(\$?"([\s\t\r\n]?)([a-z_]+)\.([a-z_]+)(\"|:)? | |
replace: | |
Trace.WriteLine($"$1{Name}.{nameof($3)}$4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment