File tree Expand file tree Collapse file tree 3 files changed +15
-5
lines changed
projects/RabbitMQ.Client/Impl Expand file tree Collapse file tree 3 files changed +15
-5
lines changed Original file line number Diff line number Diff line change 31
31
32
32
using System ;
33
33
using System . Collections . Generic ;
34
+ using System . Diagnostics . CodeAnalysis ;
34
35
using System . Runtime . CompilerServices ;
35
36
using System . Threading ;
36
37
using System . Threading . Tasks ;
@@ -489,6 +490,9 @@ private void ThrowIfDisposed()
489
490
ThrowDisposed ( ) ;
490
491
}
491
492
493
+ return ;
494
+
495
+ [ DoesNotReturn ]
492
496
static void ThrowDisposed ( ) => throw new ObjectDisposedException ( typeof ( AutorecoveringChannel ) . FullName ) ;
493
497
}
494
498
}
Original file line number Diff line number Diff line change 31
31
32
32
using System ;
33
33
using System . Collections . Generic ;
34
+ using System . Diagnostics . CodeAnalysis ;
34
35
using System . Runtime . CompilerServices ;
35
36
using System . Threading ;
36
37
using System . Threading . Tasks ;
@@ -309,6 +310,9 @@ private void ThrowIfDisposed()
309
310
ThrowDisposed ( ) ;
310
311
}
311
312
313
+ return ;
314
+
315
+ [ DoesNotReturn ]
312
316
static void ThrowDisposed ( ) => throw new ObjectDisposedException ( typeof ( AutorecoveringConnection ) . FullName ) ;
313
317
}
314
318
}
Original file line number Diff line number Diff line change 32
32
using System ;
33
33
using System . Collections . Generic ;
34
34
using System . Diagnostics ;
35
+ using System . Diagnostics . CodeAnalysis ;
35
36
using System . IO ;
36
37
using System . Runtime . CompilerServices ;
37
38
using System . Threading ;
@@ -524,20 +525,21 @@ private void ThrowIfDisposed()
524
525
{
525
526
if ( _disposed )
526
527
{
527
- ThrowObjectDisposedException ( ) ;
528
+ ThrowDisposed ( ) ;
528
529
}
529
530
530
- static void ThrowObjectDisposedException ( )
531
- {
532
- throw new ObjectDisposedException ( typeof ( Connection ) . FullName ) ;
533
- }
531
+ return ;
532
+
533
+ [ DoesNotReturn ]
534
+ static void ThrowDisposed ( ) => throw new ObjectDisposedException ( typeof ( Connection ) . FullName ) ;
534
535
}
535
536
536
537
public override string ToString ( )
537
538
{
538
539
return $ "Connection({ _id } ,{ Endpoint } )";
539
540
}
540
541
542
+ [ DoesNotReturn ]
541
543
private static void ThrowAlreadyClosedException ( ShutdownEventArgs closeReason )
542
544
{
543
545
throw new AlreadyClosedException ( closeReason ) ;
You can’t perform that action at this time.
0 commit comments