@@ -365,9 +365,7 @@ public unsafe DynamicInvokeInfo(MethodBase method, IntPtr invokeThunk)
365
365
else if ( argCount == 1 )
366
366
{
367
367
ByReference br = ByReference . Create ( ref parameters [ 0 ] ) ;
368
- #pragma warning disable CS8500
369
368
void * pByrefStorage = & br ;
370
- #pragma warning restore CS8500
371
369
372
370
// Since no copy of args is required, pass 'parameters' for both arguments.
373
371
CheckArguments ( parameters , pByrefStorage , parameters ) ;
@@ -410,9 +408,7 @@ private unsafe ref byte InvokeWithManyArguments(
410
408
IntPtr * pStorage = stackalloc IntPtr [ 2 * argCount ] ;
411
409
NativeMemory . Clear ( pStorage , ( nuint ) ( 2 * argCount ) * ( nuint ) sizeof ( IntPtr ) ) ;
412
410
413
- #pragma warning disable 8500
414
411
void * pByRefStorage = ( ByReference * ) ( pStorage + argCount ) ;
415
- #pragma warning restore 8500
416
412
417
413
GCFrameRegistration regArgStorage = new ( ( void * * ) pStorage , ( uint ) argCount , areByRefs : false ) ;
418
414
GCFrameRegistration regByRefStorage = new ( ( void * * ) pByRefStorage , ( uint ) argCount , areByRefs : true ) ;
@@ -461,9 +457,7 @@ private unsafe ref byte InvokeWithManyArguments(
461
457
IntPtr * pStorage = stackalloc IntPtr [ 2 * argCount ] ;
462
458
NativeMemory . Clear ( pStorage , ( nuint ) ( 2 * argCount ) * ( nuint ) sizeof ( IntPtr ) ) ;
463
459
464
- #pragma warning disable 8500
465
460
void * pByRefStorage = ( ByReference * ) ( pStorage + argCount ) ;
466
- #pragma warning restore 8500
467
461
468
462
GCFrameRegistration regArgStorage = new ( ( void * * ) pStorage , ( uint ) argCount , areByRefs : false ) ;
469
463
GCFrameRegistration regByRefStorage = new ( ( void * * ) pByRefStorage , ( uint ) argCount , areByRefs : true ) ;
@@ -501,9 +495,7 @@ private unsafe ref byte InvokeWithFewArguments(
501
495
StackAllocatedArguments argStorage = default ;
502
496
Span < object ? > copyOfParameters = ( ( Span < object ? > ) argStorage . _args ) . Slice ( 0 , _argumentCount ) ;
503
497
StackAllocatedByRefs byrefStorage = default ;
504
- #pragma warning disable CS8500
505
498
void * pByRefStorage = ( ByReference * ) & byrefStorage ;
506
- #pragma warning restore CS8500
507
499
508
500
CheckArguments ( copyOfParameters , pByRefStorage , parameters , binderBundle ) ;
509
501
@@ -535,9 +527,7 @@ private unsafe ref byte InvokeWithFewArguments(
535
527
StackAllocatedArguments argStorage = default ;
536
528
Span < object ? > copyOfParameters = ( ( Span < object ? > ) argStorage . _args ) . Slice ( 0 , _argumentCount ) ;
537
529
StackAllocatedByRefs byrefStorage = default ;
538
- #pragma warning disable CS8500
539
530
void * pByRefStorage = ( ByReference * ) & byrefStorage ;
540
- #pragma warning restore CS8500
541
531
542
532
CheckArguments ( copyOfParameters , pByRefStorage , parameters ) ;
543
533
@@ -562,9 +552,7 @@ private unsafe ref byte InvokeDirectWithFewArguments(
562
552
Debug . Assert ( _argumentCount <= MaxStackAllocArgCount ) ;
563
553
564
554
StackAllocatedByRefs byrefStorage = default ;
565
- #pragma warning disable CS8500
566
555
void * pByRefStorage = ( ByReference * ) & byrefStorage ;
567
- #pragma warning restore CS8500
568
556
569
557
// Since no copy of args is required, pass 'parameters' for both arguments.
570
558
CheckArguments ( parameters , pByRefStorage , parameters ) ;
@@ -686,10 +674,10 @@ private unsafe void CheckArguments(
686
674
687
675
copyOfParameters [ i ] = arg ! ;
688
676
689
- #pragma warning disable 8500 , 9094
677
+ #pragma warning disable 9094
690
678
( ( ByReference * ) byrefParameters ) [ i ] = new ByReference ( ref ( argumentInfo . Transform & Transform . Reference ) != 0 ?
691
679
ref Unsafe . As < object ? , byte > ( ref copyOfParameters [ i ] ) : ref arg . GetRawData ( ) ) ;
692
- #pragma warning restore 8500 , 9094
680
+ #pragma warning restore 9094
693
681
}
694
682
}
695
683
@@ -763,10 +751,10 @@ private unsafe void CheckArguments(
763
751
764
752
copyOfParameters [ i ] = arg ;
765
753
766
- #pragma warning disable 8500 , 9094
754
+ #pragma warning disable 9094
767
755
( ( ByReference * ) byrefParameters ) [ i ] = new ByReference ( ref ( argumentInfo . Transform & Transform . Reference ) != 0 ?
768
756
ref Unsafe . As < object ? , byte > ( ref copyOfParameters [ i ] ) : ref arg . GetRawData ( ) ) ;
769
- #pragma warning restore 8500 , 9094
757
+ #pragma warning restore 9094
770
758
}
771
759
}
772
760
0 commit comments