Skip to content

Commit 60bb933

Browse files
committed
AsyncLock handling bugfix
1 parent 34037a9 commit 60bb933

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

AsyncToSyncConverter.cs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,15 @@ static class AsyncToSyncConverter
5151
//new KVP("Task.Delay", "/*--Task.Delay--*/System.Threading.Thread.Sleep"), //this needs special regex in sync to async direction
5252
new KVP(@"Task.FromResult", @"/*--Task.FromResult--*/"),
5353
new KVP(@"Task.WhenAll", @"/*--Task.WhenAll--*/"),
54-
new KVP(@" AsyncLock ", @" /*--AsyncLock--*/object "), //TODO!!! add handling for \t \r \n
55-
new KVP(@" AsyncLock(", @" /*--AsyncLock--*/object("),
54+
55+
//TODO: use Regex instead since the match beginning may also vary from space
56+
new KVP(" AsyncLock ", " /*--AsyncLock--*/object "), //TODO!!! add handling for \t \r \n
57+
new KVP(" AsyncLock(", " /*--AsyncLock--*/object("),
58+
new KVP(" AsyncLock>", " /*--AsyncLock--*/object>"),
59+
new KVP(" AsyncLock,", " /*--AsyncLock--*/object,"),
60+
new KVP(" AsyncLock\t", " /*--AsyncLock--*/object\t"),
61+
new KVP(" AsyncLock\r", " /*--AsyncLock--*/object\r"),
62+
new KVP(" AsyncLock\n", " /*--AsyncLock--*/object\n"),
5663

5764
new KVP(@"#define ASYNC", @"#define NOASYNC"),
5865
};

0 commit comments

Comments
 (0)