diff --git a/ApiReview/API.Polly.Core/NoDocs/Polly.Registry/ResiliencePipelineRegistry.cs b/ApiReview/API.Polly.Core/NoDocs/Polly.Registry/ResiliencePipelineRegistry.cs index 0a4b95e4a83..f46308cd4ea 100644 --- a/ApiReview/API.Polly.Core/NoDocs/Polly.Registry/ResiliencePipelineRegistry.cs +++ b/ApiReview/API.Polly.Core/NoDocs/Polly.Registry/ResiliencePipelineRegistry.cs @@ -4,6 +4,7 @@ using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; +using Polly.Utils; namespace Polly.Registry; @@ -11,10 +12,6 @@ public sealed class ResiliencePipelineRegistry : ResiliencePipelineProvide { public ResiliencePipelineRegistry(); public ResiliencePipelineRegistry(ResiliencePipelineRegistryOptions options); - public bool TryAddPipeline(TKey key, ResiliencePipeline pipeline); - public bool TryAddPipeline(TKey key, ResiliencePipeline pipeline); - public bool RemovePipeline(TKey key); - public bool RemovePipeline(TKey key); public override bool TryGetPipeline(TKey key, [NotNullWhen(true)] out ResiliencePipeline? pipeline); public override bool TryGetPipeline(TKey key, [NotNullWhen(true)] out ResiliencePipeline? pipeline); public ResiliencePipeline GetOrAddPipeline(TKey key, Action configure); @@ -23,8 +20,4 @@ public sealed class ResiliencePipelineRegistry : ResiliencePipelineProvide public ResiliencePipeline GetOrAddPipeline(TKey key, Action, ConfigureBuilderContext> configure); public bool TryAddBuilder(TKey key, Action> configure); public bool TryAddBuilder(TKey key, Action, ConfigureBuilderContext> configure); - public bool RemoveBuilder(TKey key); - public bool RemoveBuilder(TKey key); - public void ClearPipelines(); - public void ClearPipelines(); } diff --git a/ApiReview/API.Polly.Core/NoDocs/Polly/ResilienceContext.cs b/ApiReview/API.Polly.Core/NoDocs/Polly/ResilienceContext.cs index ba1cb0ca65e..bfad6108111 100644 --- a/ApiReview/API.Polly.Core/NoDocs/Polly/ResilienceContext.cs +++ b/ApiReview/API.Polly.Core/NoDocs/Polly/ResilienceContext.cs @@ -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 ResilienceEvents { get; } } diff --git a/ApiReview/API.Polly.Core/NoDocs/Polly/ResilienceContextCreationArguments.cs b/ApiReview/API.Polly.Core/NoDocs/Polly/ResilienceContextCreationArguments.cs new file mode 100644 index 00000000000..fc60a8129f7 --- /dev/null +++ b/ApiReview/API.Polly.Core/NoDocs/Polly/ResilienceContextCreationArguments.cs @@ -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); +} diff --git a/ApiReview/API.Polly.Core/NoDocs/Polly/ResilienceContextPool.cs b/ApiReview/API.Polly.Core/NoDocs/Polly/ResilienceContextPool.cs index d9f356b8488..96d5ad01b97 100644 --- a/ApiReview/API.Polly.Core/NoDocs/Polly/ResilienceContextPool.cs +++ b/ApiReview/API.Polly.Core/NoDocs/Polly/ResilienceContextPool.cs @@ -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(); }