Skip to content

Commit

Permalink
Update with latest API
Browse files Browse the repository at this point in the history
  • Loading branch information
martintmk committed Aug 17, 2023
1 parent 06979ae commit a42c4f3
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,14 @@
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using Polly.Utils;

namespace Polly.Registry;

public sealed class ResiliencePipelineRegistry<TKey> : ResiliencePipelineProvider<TKey> where TKey : notnull
{
public ResiliencePipelineRegistry();
public ResiliencePipelineRegistry(ResiliencePipelineRegistryOptions<TKey> options);
public bool TryAddPipeline(TKey key, ResiliencePipeline pipeline);
public bool TryAddPipeline<TResult>(TKey key, ResiliencePipeline<TResult> pipeline);
public bool RemovePipeline(TKey key);
public bool RemovePipeline<TResult>(TKey key);
public override bool TryGetPipeline<TResult>(TKey key, [NotNullWhen(true)] out ResiliencePipeline<TResult>? pipeline);
public override bool TryGetPipeline(TKey key, [NotNullWhen(true)] out ResiliencePipeline? pipeline);
public ResiliencePipeline GetOrAddPipeline(TKey key, Action<ResiliencePipelineBuilder> configure);
Expand All @@ -23,8 +20,4 @@ public sealed class ResiliencePipelineRegistry<TKey> : ResiliencePipelineProvide
public ResiliencePipeline<TResult> GetOrAddPipeline<TResult>(TKey key, Action<ResiliencePipelineBuilder<TResult>, ConfigureBuilderContext<TKey>> configure);
public bool TryAddBuilder(TKey key, Action<ResiliencePipelineBuilder, ConfigureBuilderContext<TKey>> configure);
public bool TryAddBuilder<TResult>(TKey key, Action<ResiliencePipelineBuilder<TResult>, ConfigureBuilderContext<TKey>> configure);
public bool RemoveBuilder(TKey key);
public bool RemoveBuilder<TResult>(TKey key);
public void ClearPipelines();
public void ClearPipelines<TResult>();
}
3 changes: 1 addition & 2 deletions ApiReview/API.Polly.Core/NoDocs/Polly/ResilienceContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ public sealed class ResilienceContext
{
public string? OperationKey { get; }
public CancellationToken CancellationToken { get; }
public bool IsSynchronous { get; }
public bool ContinueOnCapturedContext { get; set; }
public bool ContinueOnCapturedContext { get; }
public ResilienceProperties Properties { get; }
public IReadOnlyList<ResilienceEvent> ResilienceEvents { get; }
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// Assembly 'Polly.Core'

using System.Runtime.CompilerServices;
using System.Threading;

namespace Polly;

public readonly struct ResilienceContextCreationArguments
{
public string? OperationKey { get; }
public bool? ContinueOnCapturedContext { get; }
public CancellationToken CancellationToken { get; }
public ResilienceContextCreationArguments(string? operationKey, bool? continueOnCapturedContext, CancellationToken cancellationToken);
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ public abstract class ResilienceContextPool
{
public static ResilienceContextPool Shared { get; }
public ResilienceContext Get(CancellationToken cancellationToken = default(CancellationToken));
public abstract ResilienceContext Get(string? operationKey, CancellationToken cancellationToken = default(CancellationToken));
public ResilienceContext Get(string? operationKey, CancellationToken cancellationToken = default(CancellationToken));
public ResilienceContext Get(string? operationKey, bool? continueOnCapturedContext, CancellationToken cancellationToken = default(CancellationToken));
public ResilienceContext Get(bool continueOnCapturedContext, CancellationToken cancellationToken = default(CancellationToken));
public abstract ResilienceContext Get(ResilienceContextCreationArguments arguments);
public abstract void Return(ResilienceContext context);
protected ResilienceContextPool();
}

0 comments on commit a42c4f3

Please sign in to comment.