We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 95c2a8b commit c2d7188Copy full SHA for c2d7188
test/Atc.Hosting.Tests/XUnitTestTypes/MyWorkerService.cs
@@ -31,14 +31,9 @@ public MyWorkerService(
31
protected override Task OnExceptionAsync(
32
Exception exception,
33
CancellationToken stoppingToken)
34
- {
35
- if (exception is MyWorkerException)
36
37
- throw exception;
38
- }
39
-
40
- return Task.CompletedTask;
41
+ => exception is MyWorkerException
+ ? throw exception
+ : Task.CompletedTask;
42
43
public override Task DoWorkAsync(
44
0 commit comments