@@ -14,7 +14,7 @@ private sealed class TestControl : Control
14
14
public void DestroyTestHandle ( ) => DestroyHandle ( ) ;
15
15
}
16
16
17
- [ Fact ]
17
+ [ WinFormsFact ]
18
18
public async Task InvokeAsync_Action_ExecutesOnUIThread ( )
19
19
{
20
20
using var control = new TestControl ( ) ;
@@ -55,7 +55,7 @@ void UiAccessAction()
55
55
}
56
56
}
57
57
58
- [ Fact ]
58
+ [ WinFormsFact ]
59
59
public async Task InvokeAsync_FuncT_ExecutesOnUIThread_AndReturnsValue ( )
60
60
{
61
61
using var control = new TestControl ( ) ;
@@ -92,7 +92,7 @@ int UiAccessFunc()
92
92
}
93
93
}
94
94
95
- [ Fact ]
95
+ [ WinFormsFact ]
96
96
public async Task InvokeAsync_AsyncCallback_ExecutesOnUIThread ( )
97
97
{
98
98
using var control = new TestControl ( ) ;
@@ -178,7 +178,7 @@ async ValueTask UiAccessAsyncCallback(CancellationToken ct)
178
178
}
179
179
}
180
180
181
- [ Fact ]
181
+ [ WinFormsFact ]
182
182
public async Task InvokeAsync_AsyncCallbackT_ExecutesOnUIThread_AndReturnsValue ( )
183
183
{
184
184
using var control = new TestControl ( ) ;
@@ -226,7 +226,7 @@ async ValueTask<int> UiAccessAsyncCallback(CancellationToken ct)
226
226
}
227
227
}
228
228
229
- [ Fact ]
229
+ [ WinFormsFact ]
230
230
public async Task InvokeAsync_Action_Cancellation_PreCancelledToken_ReturnsEarly ( )
231
231
{
232
232
using var control = new TestControl ( ) ;
@@ -240,7 +240,7 @@ await control.InvokeAsync(
240
240
. ConfigureAwait ( false ) ;
241
241
}
242
242
243
- [ Fact ]
243
+ [ WinFormsFact ]
244
244
public async Task InvokeAsync_FuncT_Cancellation_PreCancelledToken_ReturnsDefault ( )
245
245
{
246
246
using var control = new TestControl ( ) ;
@@ -262,7 +262,7 @@ static ValueTask<int> CallBack(CancellationToken ct)
262
262
}
263
263
}
264
264
265
- [ Fact ]
265
+ [ WinFormsFact ]
266
266
public async Task InvokeAsync_AsyncCallback_Cancellation_PreCancelledToken_ReturnsEarly ( )
267
267
{
268
268
using var control = new TestControl ( ) ;
@@ -276,7 +276,7 @@ await control.InvokeAsync(
276
276
cts . Token ) . ConfigureAwait ( true ) ;
277
277
}
278
278
279
- [ Fact ]
279
+ [ WinFormsFact ]
280
280
public async Task InvokeAsync_AsyncCallbackT_Cancellation_PreCancelledToken_ReturnsDefault ( )
281
281
{
282
282
using var control = new TestControl ( ) ;
@@ -293,10 +293,6 @@ public async Task InvokeAsync_AsyncCallbackT_Cancellation_PreCancelledToken_Retu
293
293
}
294
294
295
295
[ WinFormsFact ]
296
- [ Diagnostics . CodeAnalysis . SuppressMessage (
297
- "Performance" ,
298
- "CA1849:Call async methods when in an async method" ,
299
- Justification = "We're blocking for the test on purpose." ) ]
300
296
public async Task InvokeAsync_Action_Cancellation_BeforeExecution ( )
301
297
{
302
298
using var control = new TestControl ( ) ;
@@ -354,7 +350,7 @@ await Assert.ThrowsAnyAsync<OperationCanceledException>(
354
350
. ConfigureAwait ( false ) ;
355
351
}
356
352
357
- [ Fact ]
353
+ [ WinFormsFact ]
358
354
public async Task InvokeAsync_AsyncCallback_Cancellation_WhileRunning ( )
359
355
{
360
356
using var control = new TestControl ( ) ;
@@ -374,7 +370,7 @@ await Assert.ThrowsAnyAsync<OperationCanceledException>(
374
370
async ( ) => await task . ConfigureAwait ( false ) ) . ConfigureAwait ( false ) ;
375
371
}
376
372
377
- [ Fact ]
373
+ [ WinFormsFact ]
378
374
public async Task InvokeAsync_Throws_InvalidOperationException_IfHandleNotCreated ( )
379
375
{
380
376
using var control = new TestControl ( ) ;
@@ -395,7 +391,7 @@ await Assert.ThrowsAsync<InvalidOperationException>(() =>
395
391
control . InvokeAsync ( ( ) => { } ) ) . ConfigureAwait ( false ) ;
396
392
}
397
393
398
- [ Fact ]
394
+ [ WinFormsFact ]
399
395
public async Task InvokeAsync_Propagates_Exception_FromCallback ( )
400
396
{
401
397
using var control = new TestControl ( ) ;
@@ -418,7 +414,7 @@ await Assert.ThrowsAsync<InvalidOperationException>(() =>
418
414
. ConfigureAwait ( false ) ;
419
415
}
420
416
421
- [ Fact ]
417
+ [ WinFormsFact ]
422
418
public async Task InvokeAsync_Reentry_Supported ( )
423
419
{
424
420
using var control = new TestControl ( ) ;
@@ -435,7 +431,7 @@ await control.InvokeAsync(() => innerCalled = true, ct)
435
431
Assert . True ( innerCalled ) ;
436
432
}
437
433
438
- [ Fact ]
434
+ [ WinFormsFact ]
439
435
public async Task InvokeAsync_MultipleConcurrentCalls_AreThreadSafe ( )
440
436
{
441
437
using var control = new TestControl ( ) ;
0 commit comments