Skip to content

Commit 76c3579

Browse files
committed
fixup
1 parent cf6a74c commit 76c3579

File tree

5 files changed

+34
-34
lines changed

5 files changed

+34
-34
lines changed

projects/RabbitMQ.Client/ConsumerDispatching/ConsumerDispatcherChannelBase.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ internal abstract class ConsumerDispatcherChannelBase : ConsumerDispatcherBase,
4545
private readonly Task _worker;
4646
private readonly ushort _concurrency;
4747
private bool _quiesce = false;
48-
private bool _disposedValue;
48+
private bool _disposed;
4949

5050
internal ConsumerDispatcherChannelBase(Impl.Channel channel, ushort concurrency)
5151
{
@@ -85,7 +85,7 @@ internal ConsumerDispatcherChannelBase(Impl.Channel channel, ushort concurrency)
8585

8686
public ValueTask HandleBasicConsumeOkAsync(IAsyncBasicConsumer consumer, string consumerTag, CancellationToken cancellationToken)
8787
{
88-
if (false == _disposedValue && false == _quiesce)
88+
if (false == _disposed && false == _quiesce)
8989
{
9090
AddConsumer(consumer, consumerTag);
9191
WorkStruct work = WorkStruct.CreateConsumeOk(consumer, consumerTag);
@@ -101,7 +101,7 @@ public ValueTask HandleBasicDeliverAsync(string consumerTag, ulong deliveryTag,
101101
string exchange, string routingKey, IReadOnlyBasicProperties basicProperties, RentedMemory body,
102102
CancellationToken cancellationToken)
103103
{
104-
if (false == _disposedValue && false == _quiesce)
104+
if (false == _disposed && false == _quiesce)
105105
{
106106
IAsyncBasicConsumer consumer = GetConsumerOrDefault(consumerTag);
107107
var work = WorkStruct.CreateDeliver(consumer, consumerTag, deliveryTag, redelivered, exchange, routingKey, basicProperties, body);
@@ -115,7 +115,7 @@ public ValueTask HandleBasicDeliverAsync(string consumerTag, ulong deliveryTag,
115115

116116
public ValueTask HandleBasicCancelOkAsync(string consumerTag, CancellationToken cancellationToken)
117117
{
118-
if (false == _disposedValue && false == _quiesce)
118+
if (false == _disposed && false == _quiesce)
119119
{
120120
IAsyncBasicConsumer consumer = GetAndRemoveConsumer(consumerTag);
121121
WorkStruct work = WorkStruct.CreateCancelOk(consumer, consumerTag);
@@ -129,7 +129,7 @@ public ValueTask HandleBasicCancelOkAsync(string consumerTag, CancellationToken
129129

130130
public ValueTask HandleBasicCancelAsync(string consumerTag, CancellationToken cancellationToken)
131131
{
132-
if (false == _disposedValue && false == _quiesce)
132+
if (false == _disposed && false == _quiesce)
133133
{
134134
IAsyncBasicConsumer consumer = GetAndRemoveConsumer(consumerTag);
135135
WorkStruct work = WorkStruct.CreateCancel(consumer, consumerTag);
@@ -148,7 +148,7 @@ public void Quiesce()
148148

149149
public async Task WaitForShutdownAsync()
150150
{
151-
if (_disposedValue)
151+
if (_disposed)
152152
{
153153
return;
154154
}
@@ -294,7 +294,7 @@ public void Dispose()
294294

295295
protected virtual void Dispose(bool disposing)
296296
{
297-
if (_disposedValue)
297+
if (_disposed)
298298
{
299299
return;
300300
}
@@ -312,7 +312,7 @@ protected virtual void Dispose(bool disposing)
312312
}
313313
finally
314314
{
315-
_disposedValue = true;
315+
_disposed = true;
316316
}
317317
}
318318
}

projects/RabbitMQ.Client/Impl/AutorecoveringConnection.Recording.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ internal sealed partial class AutorecoveringConnection
5353
internal async ValueTask RecordExchangeAsync(RecordedExchange exchange,
5454
bool recordedEntitiesSemaphoreHeld)
5555
{
56-
if (_disposedValue)
56+
if (_disposed)
5757
{
5858
return;
5959
}
@@ -85,7 +85,7 @@ private void DoRecordExchange(in RecordedExchange exchange)
8585
internal async ValueTask DeleteRecordedExchangeAsync(string exchangeName,
8686
bool recordedEntitiesSemaphoreHeld, CancellationToken cancellationToken)
8787
{
88-
if (_disposedValue)
88+
if (_disposed)
8989
{
9090
return;
9191
}
@@ -133,7 +133,7 @@ await DeleteAutoDeleteExchangeAsync(binding.Source,
133133
internal async ValueTask DeleteAutoDeleteExchangeAsync(string exchangeName,
134134
bool recordedEntitiesSemaphoreHeld, CancellationToken cancellationToken)
135135
{
136-
if (_disposedValue)
136+
if (_disposed)
137137
{
138138
return;
139139
}
@@ -187,7 +187,7 @@ bool AnyBindingsOnExchange(string exchange)
187187
internal async ValueTask RecordQueueAsync(RecordedQueue queue,
188188
bool recordedEntitiesSemaphoreHeld, CancellationToken cancellationToken)
189189
{
190-
if (_disposedValue)
190+
if (_disposed)
191191
{
192192
return;
193193
}
@@ -219,7 +219,7 @@ private void DoRecordQueue(RecordedQueue queue)
219219
internal async ValueTask DeleteRecordedQueueAsync(string queueName,
220220
bool recordedEntitiesSemaphoreHeld, CancellationToken cancellationToken)
221221
{
222-
if (_disposedValue)
222+
if (_disposed)
223223
{
224224
return;
225225
}
@@ -268,7 +268,7 @@ await DeleteAutoDeleteExchangeAsync(binding.Source,
268268
internal async ValueTask RecordBindingAsync(RecordedBinding binding,
269269
bool recordedEntitiesSemaphoreHeld)
270270
{
271-
if (_disposedValue)
271+
if (_disposed)
272272
{
273273
return;
274274
}
@@ -300,7 +300,7 @@ private void DoRecordBinding(in RecordedBinding binding)
300300
internal async ValueTask DeleteRecordedBindingAsync(RecordedBinding rb,
301301
bool recordedEntitiesSemaphoreHeld, CancellationToken cancellationToken)
302302
{
303-
if (_disposedValue)
303+
if (_disposed)
304304
{
305305
return;
306306
}
@@ -332,7 +332,7 @@ private void DoDeleteRecordedBinding(in RecordedBinding rb)
332332
internal async ValueTask RecordConsumerAsync(RecordedConsumer consumer,
333333
bool recordedEntitiesSemaphoreHeld)
334334
{
335-
if (_disposedValue)
335+
if (_disposed)
336336
{
337337
return;
338338
}
@@ -369,7 +369,7 @@ private void DoRecordConsumer(in RecordedConsumer consumer)
369369
internal async ValueTask DeleteRecordedConsumerAsync(string consumerTag,
370370
bool recordedEntitiesSemaphoreHeld)
371371
{
372-
if (_disposedValue)
372+
if (_disposed)
373373
{
374374
return;
375375
}
@@ -466,7 +466,7 @@ private void DoAddRecordedChannel(AutorecoveringChannel channel)
466466
internal async Task DeleteRecordedChannelAsync(AutorecoveringChannel channel,
467467
bool channelsSemaphoreHeld, bool recordedEntitiesSemaphoreHeld)
468468
{
469-
if (_disposedValue)
469+
if (_disposed)
470470
{
471471
return;
472472
}

projects/RabbitMQ.Client/Impl/AutorecoveringConnection.Recovery.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ await maybeNewInnerConnection.OpenAsync(cancellationToken)
285285
private async ValueTask RecoverExchangesAsync(IConnection connection,
286286
bool recordedEntitiesSemaphoreHeld, CancellationToken cancellationToken)
287287
{
288-
if (_disposedValue)
288+
if (_disposed)
289289
{
290290
return;
291291
}
@@ -337,7 +337,7 @@ await _recordedEntitiesSemaphore.WaitAsync(cancellationToken)
337337
private async Task RecoverQueuesAsync(IConnection connection,
338338
bool recordedEntitiesSemaphoreHeld, CancellationToken cancellationToken)
339339
{
340-
if (_disposedValue)
340+
if (_disposed)
341341
{
342342
return;
343343
}
@@ -451,7 +451,7 @@ void UpdateConsumerQueue(string oldName, string newName)
451451
private async ValueTask RecoverBindingsAsync(IConnection connection,
452452
bool recordedEntitiesSemaphoreHeld, CancellationToken cancellationToken)
453453
{
454-
if (_disposedValue)
454+
if (_disposed)
455455
{
456456
return;
457457
}
@@ -503,7 +503,7 @@ await _recordedEntitiesSemaphore.WaitAsync(cancellationToken)
503503
internal async ValueTask RecoverConsumersAsync(AutorecoveringChannel channelToRecover, IChannel channelToUse,
504504
bool recordedEntitiesSemaphoreHeld = false, CancellationToken cancellationToken = default)
505505
{
506-
if (_disposedValue)
506+
if (_disposed)
507507
{
508508
return;
509509
}

projects/RabbitMQ.Client/Impl/AutorecoveringConnection.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ internal sealed partial class AutorecoveringConnection : IConnection
4949
private readonly IEndpointResolver _endpoints;
5050

5151
private Connection _innerConnection;
52-
private bool _disposedValue;
52+
private bool _disposed;
5353

5454
private Connection InnerConnection
5555
{
@@ -270,7 +270,7 @@ await RecordChannelAsync(autorecoveringChannel, channelsSemaphoreHeld: false, ca
270270

271271
public void Dispose()
272272
{
273-
if (_disposedValue)
273+
if (_disposed)
274274
{
275275
return;
276276
}
@@ -280,7 +280,7 @@ public void Dispose()
280280

281281
public async ValueTask DisposeAsync()
282282
{
283-
if (_disposedValue)
283+
if (_disposed)
284284
{
285285
return;
286286
}
@@ -301,7 +301,7 @@ await _innerConnection.DisposeAsync()
301301
}
302302
finally
303303
{
304-
_disposedValue = true;
304+
_disposed = true;
305305
}
306306
}
307307

@@ -311,7 +311,7 @@ private void EnsureIsOpen()
311311
[MethodImpl(MethodImplOptions.AggressiveInlining)]
312312
private void ThrowIfDisposed()
313313
{
314-
if (_disposedValue)
314+
if (_disposed)
315315
{
316316
ThrowDisposed();
317317
}

projects/RabbitMQ.Client/Impl/Channel.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ internal partial class Channel : IChannel, IRecoverable
6161

6262
internal readonly IConsumerDispatcher ConsumerDispatcher;
6363

64-
private bool _disposedValue;
64+
private bool _disposed;
6565
private bool _isDisposing;
6666

6767
private readonly object _locker = new();
@@ -521,7 +521,7 @@ public override string ToString()
521521

522522
void IDisposable.Dispose()
523523
{
524-
if (_disposedValue)
524+
if (_disposed)
525525
{
526526
return;
527527
}
@@ -531,7 +531,7 @@ void IDisposable.Dispose()
531531

532532
public async ValueTask DisposeAsync()
533533
{
534-
if (_disposedValue)
534+
if (_disposed)
535535
{
536536
return;
537537
}
@@ -544,7 +544,7 @@ await DisposeAsyncCore(true)
544544

545545
protected virtual void Dispose(bool disposing)
546546
{
547-
if (_disposedValue)
547+
if (_disposed)
548548
{
549549
return;
550550
}
@@ -581,15 +581,15 @@ protected virtual void Dispose(bool disposing)
581581
catch
582582
{
583583
}
584-
_disposedValue = true;
584+
_disposed = true;
585585
_isDisposing = false;
586586
}
587587
}
588588
}
589589

590590
protected virtual async ValueTask DisposeAsyncCore(bool disposing)
591591
{
592-
if (_disposedValue)
592+
if (_disposed)
593593
{
594594
return;
595595
}
@@ -633,7 +633,7 @@ await MaybeWaitForServerOriginatedCloseAsync()
633633
catch
634634
{
635635
}
636-
_disposedValue = true;
636+
_disposed = true;
637637
_isDisposing = false;
638638
}
639639
}

0 commit comments

Comments
 (0)