Skip to content

Commit c073db3

Browse files
committed
Fix Warning 'CS4014' in "UITests.App" project
The `SendLogMessage` method in the App class returns `Task` but we didn't await where it is called, i.e. in the `LogMessage` method. Thus, updating the method with async/await pattern fixes the warning.
1 parent 747497a commit c073db3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

UITests/UITests.App/TestInterop.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public static void Error(string format, params object[] args)
2828
LogMessage("Error", "[Error] " + format, args);
2929
}
3030

31-
private static void LogMessage(string level, string format, object[] args)
31+
private static async void LogMessage(string level, string format, object[] args)
3232
{
3333
// string.Format() complains if we pass it something with braces, even if we have no arguments.
3434
// To account for that, we'll escape braces if we have no arguments.
@@ -43,7 +43,7 @@ private static void LogMessage(string level, string format, object[] args)
4343

4444
// Send back to Test Harness via AppService
4545
// TODO: Make this a cleaner connection/pattern
46-
_ = ((App)Application.Current).SendLogMessage(level, message);
46+
_ = await ((App)Application.Current).SendLogMessage(level, message);
4747
}
4848
}
4949
}

0 commit comments

Comments
 (0)