From 0c8fbec45ac1747243de278b2a92f7fc2c43d251 Mon Sep 17 00:00:00 2001 From: Martin Tomka Date: Wed, 20 Sep 2023 08:10:57 +0200 Subject: [PATCH] Update with latest API --- .../FaultGeneratorArguments.cs | 11 +++++++++++ .../Polly.Simmy.Outcomes/FaultStrategyOptions.cs | 15 +++++++++++++++ .../OnFaultInjectedArguments.cs | 13 +++++++++++++ ...ns.cs => BehaviorPipelineBuilderExtensions.cs} | 2 +- ...ons.cs => LatencyPipelineBuilderExtensions.cs} | 2 +- ...ons.cs => OutcomePipelineBuilderExtensions.cs} | 6 +++--- 6 files changed, 44 insertions(+), 5 deletions(-) create mode 100644 ApiReview/API.Polly.Core/NoDocs/Polly.Simmy.Outcomes/FaultGeneratorArguments.cs create mode 100644 ApiReview/API.Polly.Core/NoDocs/Polly.Simmy.Outcomes/FaultStrategyOptions.cs create mode 100644 ApiReview/API.Polly.Core/NoDocs/Polly.Simmy.Outcomes/OnFaultInjectedArguments.cs rename ApiReview/API.Polly.Core/NoDocs/Polly.Simmy/{BehaviorChaosPipelineBuilderExtensions.cs => BehaviorPipelineBuilderExtensions.cs} (89%) rename ApiReview/API.Polly.Core/NoDocs/Polly.Simmy/{LatencyChaosPipelineBuilderExtensions.cs => LatencyPipelineBuilderExtensions.cs} (88%) rename ApiReview/API.Polly.Core/NoDocs/Polly.Simmy/{OutcomeChaosPipelineBuilderExtensions.cs => OutcomePipelineBuilderExtensions.cs} (86%) diff --git a/ApiReview/API.Polly.Core/NoDocs/Polly.Simmy.Outcomes/FaultGeneratorArguments.cs b/ApiReview/API.Polly.Core/NoDocs/Polly.Simmy.Outcomes/FaultGeneratorArguments.cs new file mode 100644 index 00000000000..47fc87c26ee --- /dev/null +++ b/ApiReview/API.Polly.Core/NoDocs/Polly.Simmy.Outcomes/FaultGeneratorArguments.cs @@ -0,0 +1,11 @@ +// Assembly 'Polly.Core' + +using System.Runtime.CompilerServices; + +namespace Polly.Simmy.Outcomes; + +public readonly struct FaultGeneratorArguments +{ + public ResilienceContext Context { get; } + public FaultGeneratorArguments(ResilienceContext context); +} diff --git a/ApiReview/API.Polly.Core/NoDocs/Polly.Simmy.Outcomes/FaultStrategyOptions.cs b/ApiReview/API.Polly.Core/NoDocs/Polly.Simmy.Outcomes/FaultStrategyOptions.cs new file mode 100644 index 00000000000..023e7056f54 --- /dev/null +++ b/ApiReview/API.Polly.Core/NoDocs/Polly.Simmy.Outcomes/FaultStrategyOptions.cs @@ -0,0 +1,15 @@ +// Assembly 'Polly.Core' + +using System; +using System.Runtime.CompilerServices; +using System.Threading.Tasks; + +namespace Polly.Simmy.Outcomes; + +public class FaultStrategyOptions : MonkeyStrategyOptions +{ + public Func? OnFaultInjected { get; set; } + public Func>? FaultGenerator { get; set; } + public Exception? Fault { get; set; } + public FaultStrategyOptions(); +} diff --git a/ApiReview/API.Polly.Core/NoDocs/Polly.Simmy.Outcomes/OnFaultInjectedArguments.cs b/ApiReview/API.Polly.Core/NoDocs/Polly.Simmy.Outcomes/OnFaultInjectedArguments.cs new file mode 100644 index 00000000000..531c8875fe6 --- /dev/null +++ b/ApiReview/API.Polly.Core/NoDocs/Polly.Simmy.Outcomes/OnFaultInjectedArguments.cs @@ -0,0 +1,13 @@ +// Assembly 'Polly.Core' + +using System; +using System.Runtime.CompilerServices; + +namespace Polly.Simmy.Outcomes; + +public readonly struct OnFaultInjectedArguments +{ + public ResilienceContext Context { get; } + public Exception Fault { get; } + public OnFaultInjectedArguments(ResilienceContext context, Exception fault); +} diff --git a/ApiReview/API.Polly.Core/NoDocs/Polly.Simmy/BehaviorChaosPipelineBuilderExtensions.cs b/ApiReview/API.Polly.Core/NoDocs/Polly.Simmy/BehaviorPipelineBuilderExtensions.cs similarity index 89% rename from ApiReview/API.Polly.Core/NoDocs/Polly.Simmy/BehaviorChaosPipelineBuilderExtensions.cs rename to ApiReview/API.Polly.Core/NoDocs/Polly.Simmy/BehaviorPipelineBuilderExtensions.cs index d1eb09340e4..2941d750d85 100644 --- a/ApiReview/API.Polly.Core/NoDocs/Polly.Simmy/BehaviorChaosPipelineBuilderExtensions.cs +++ b/ApiReview/API.Polly.Core/NoDocs/Polly.Simmy/BehaviorPipelineBuilderExtensions.cs @@ -7,7 +7,7 @@ namespace Polly.Simmy; -public static class BehaviorChaosPipelineBuilderExtensions +public static class BehaviorPipelineBuilderExtensions { public static TBuilder AddChaosBehavior(this TBuilder builder, bool enabled, double injectionRate, Func behavior) where TBuilder : ResiliencePipelineBuilderBase; public static TBuilder AddChaosBehavior(this TBuilder builder, BehaviorStrategyOptions options) where TBuilder : ResiliencePipelineBuilderBase; diff --git a/ApiReview/API.Polly.Core/NoDocs/Polly.Simmy/LatencyChaosPipelineBuilderExtensions.cs b/ApiReview/API.Polly.Core/NoDocs/Polly.Simmy/LatencyPipelineBuilderExtensions.cs similarity index 88% rename from ApiReview/API.Polly.Core/NoDocs/Polly.Simmy/LatencyChaosPipelineBuilderExtensions.cs rename to ApiReview/API.Polly.Core/NoDocs/Polly.Simmy/LatencyPipelineBuilderExtensions.cs index b1a07a127a2..aeeaa423471 100644 --- a/ApiReview/API.Polly.Core/NoDocs/Polly.Simmy/LatencyChaosPipelineBuilderExtensions.cs +++ b/ApiReview/API.Polly.Core/NoDocs/Polly.Simmy/LatencyPipelineBuilderExtensions.cs @@ -6,7 +6,7 @@ namespace Polly.Simmy; -public static class LatencyChaosPipelineBuilderExtensions +public static class LatencyPipelineBuilderExtensions { public static TBuilder AddChaosLatency(this TBuilder builder, bool enabled, double injectionRate, TimeSpan latency) where TBuilder : ResiliencePipelineBuilderBase; public static TBuilder AddChaosLatency(this TBuilder builder, LatencyStrategyOptions options) where TBuilder : ResiliencePipelineBuilderBase; diff --git a/ApiReview/API.Polly.Core/NoDocs/Polly.Simmy/OutcomeChaosPipelineBuilderExtensions.cs b/ApiReview/API.Polly.Core/NoDocs/Polly.Simmy/OutcomePipelineBuilderExtensions.cs similarity index 86% rename from ApiReview/API.Polly.Core/NoDocs/Polly.Simmy/OutcomeChaosPipelineBuilderExtensions.cs rename to ApiReview/API.Polly.Core/NoDocs/Polly.Simmy/OutcomePipelineBuilderExtensions.cs index 6b3dc2aa9db..63e811e3082 100644 --- a/ApiReview/API.Polly.Core/NoDocs/Polly.Simmy/OutcomeChaosPipelineBuilderExtensions.cs +++ b/ApiReview/API.Polly.Core/NoDocs/Polly.Simmy/OutcomePipelineBuilderExtensions.cs @@ -6,14 +6,14 @@ namespace Polly.Simmy; -public static class OutcomeChaosPipelineBuilderExtensions +public static class OutcomePipelineBuilderExtensions { public static ResiliencePipelineBuilder AddChaosFault(this ResiliencePipelineBuilder builder, bool enabled, double injectionRate, Exception fault); public static ResiliencePipelineBuilder AddChaosFault(this ResiliencePipelineBuilder builder, bool enabled, double injectionRate, Func faultGenerator); - public static ResiliencePipelineBuilder AddChaosFault(this ResiliencePipelineBuilder builder, OutcomeStrategyOptions options); + public static ResiliencePipelineBuilder AddChaosFault(this ResiliencePipelineBuilder builder, FaultStrategyOptions options); public static ResiliencePipelineBuilder AddChaosFault(this ResiliencePipelineBuilder builder, bool enabled, double injectionRate, Exception fault); public static ResiliencePipelineBuilder AddChaosFault(this ResiliencePipelineBuilder builder, bool enabled, double injectionRate, Func faultGenerator); - public static ResiliencePipelineBuilder AddChaosFault(this ResiliencePipelineBuilder builder, OutcomeStrategyOptions options); + public static ResiliencePipelineBuilder AddChaosFault(this ResiliencePipelineBuilder builder, FaultStrategyOptions options); public static ResiliencePipelineBuilder AddChaosResult(this ResiliencePipelineBuilder builder, bool enabled, double injectionRate, TResult result); public static ResiliencePipelineBuilder AddChaosResult(this ResiliencePipelineBuilder builder, bool enabled, double injectionRate, Func outcomeGenerator); public static ResiliencePipelineBuilder AddChaosResult(this ResiliencePipelineBuilder builder, OutcomeStrategyOptions options);