Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
Add missing CA1063 suppressions.
  • Loading branch information
martincostello committed Jan 28, 2025
1 parent 474f8e8 commit 4c795f3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Polly/Bulkhead/AsyncBulkheadPolicy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,10 @@ protected override Task<TResult> ImplementationAsync<TResult>(
cancellationToken);
}

#pragma warning disable CA1063
/// <inheritdoc/>
public void Dispose()
#pragma warning restore CA1063
{
_maxParallelizationSemaphore.Dispose();
_maxQueuedActionsSemaphore.Dispose();
Expand Down Expand Up @@ -123,8 +125,10 @@ protected override Task<TResult> ImplementationAsync(
/// </summary>
public int QueueAvailableCount => Math.Min(_maxQueuedActionsSemaphore.CurrentCount, _maxQueueingActions);

#pragma warning disable CA1063
/// <inheritdoc/>
public void Dispose()
#pragma warning restore CA1063
{
_maxParallelizationSemaphore.Dispose();
_maxQueuedActionsSemaphore.Dispose();
Expand Down
4 changes: 4 additions & 0 deletions src/Polly/Bulkhead/BulkheadPolicy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,13 @@ protected override TResult Implementation<TResult>(Func<Context, CancellationTok
/// </summary>
public int QueueAvailableCount => Math.Min(_maxQueuedActionsSemaphore.CurrentCount, _maxQueueingActions);

#pragma warning disable CA1063
/// <summary>
/// Disposes of the <see cref="BulkheadPolicy"/>, allowing it to dispose its internal resources.
/// <remarks>Only call <see cref="Dispose()"/> on a <see cref="BulkheadPolicy"/> after all actions executed through the policy have completed. If actions are still executing through the policy when <see cref="Dispose()"/> is called, an <see cref="ObjectDisposedException"/> may be thrown on the actions' threads when those actions complete.</remarks>
/// </summary>
public void Dispose()
#pragma warning restore CA1063
{
_maxParallelizationSemaphore.Dispose();
_maxQueuedActionsSemaphore.Dispose();
Expand Down Expand Up @@ -115,11 +117,13 @@ protected override TResult Implementation(Func<Context, CancellationToken, TResu
/// </summary>
public int QueueAvailableCount => Math.Min(_maxQueuedActionsSemaphore.CurrentCount, _maxQueueingActions);

#pragma warning disable CA1063
/// <summary>
/// Disposes of the <see cref="BulkheadPolicy"/>, allowing it to dispose its internal resources.
/// <remarks>Only call <see cref="Dispose()"/> on a <see cref="BulkheadPolicy"/> after all actions executed through the policy have completed. If actions are still executing through the policy when <see cref="Dispose()"/> is called, an <see cref="ObjectDisposedException"/> may be thrown on the actions' threads when those actions complete.</remarks>
/// </summary>
public void Dispose()
#pragma warning restore CA1063
{
_maxParallelizationSemaphore.Dispose();
_maxQueuedActionsSemaphore.Dispose();
Expand Down

0 comments on commit 4c795f3

Please sign in to comment.