Skip to content

Commit

Permalink
API review feedback (#1239)
Browse files Browse the repository at this point in the history
  • Loading branch information
martintmk authored Jun 1, 2023
1 parent b6f8d2b commit cfb9fc0
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/Polly.Core/CircuitBreaker/CircuitBreakerManualControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ internal void Initialize(Func<ResilienceContext, Task> onIsolate, Func<Resilienc
/// <exception cref="ArgumentNullException">Thrown when <paramref name="context"/> is <see langword="null"/>.</exception>
/// <exception cref="InvalidOperationException">Thrown when manual control is not initialized.</exception>
/// <exception cref="ObjectDisposedException">Thrown when calling this method after this object is disposed.</exception>
public Task IsolateAsync(ResilienceContext context)
internal Task IsolateAsync(ResilienceContext context)
{
Guard.NotNull(context);

Expand Down Expand Up @@ -83,7 +83,7 @@ public async Task IsolateAsync(CancellationToken cancellationToken = default)
/// <exception cref="ArgumentNullException">Thrown when <paramref name="context"/> is <see langword="null"/>.</exception>
/// <exception cref="InvalidOperationException">Thrown if manual control is not initialized.</exception>
/// <exception cref="ObjectDisposedException">Thrown when calling this method after this object is disposed.</exception>
public Task CloseAsync(ResilienceContext context)
internal Task CloseAsync(ResilienceContext context)
{
Guard.NotNull(context);

Expand Down
2 changes: 1 addition & 1 deletion src/Polly.Core/Strategy/Outcome.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ internal Outcome(ExceptionDispatchInfo exceptionDispatchInfo)
/// Initializes a new instance of the <see cref="Outcome{TResult}"/> struct.
/// </summary>
/// <param name="result">The result of the operation.</param>
public Outcome(TResult result)
public Outcome(TResult? result)
: this() => Result = result;

/// <summary>
Expand Down
4 changes: 4 additions & 0 deletions src/Polly.Core/Strategy/PredicateBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ public sealed class PredicateBuilder<TResult>
{
private readonly List<Predicate<Outcome<TResult>>> _predicates = new();

internal PredicateBuilder()
{
}

/// <summary>
/// Adds a predicate for handling exceptions of the specified type.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
using Polly.Registry;
using Polly.Utils;

namespace Microsoft.Extensions.DependencyInjection;
namespace Polly;

/// <summary>
/// Provides extension methods for registering resilience strategies using the <see cref="IServiceCollection"/>.
Expand Down

0 comments on commit cfb9fc0

Please sign in to comment.