Skip to content

Commit

Permalink
Rename utility method
Browse files Browse the repository at this point in the history
  • Loading branch information
martintmk committed Aug 17, 2023
1 parent f5dc307 commit 603a43d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/Polly.Core/ResiliencePipelineBuilderBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ private protected ResiliencePipelineBuilderBase(ResiliencePipelineBuilderBase ot
internal Action<ResilienceValidationContext> Validator { get; private protected set; } = ValidationHelper.ValidateObject;

[RequiresUnreferencedCode(Constants.OptionsValidation)]
internal void AddStrategyCore(Func<StrategyBuilderContext, PipelineComponent> factory, ResilienceStrategyOptions options)
internal void AddPipelineComponent(Func<StrategyBuilderContext, PipelineComponent> factory, ResilienceStrategyOptions options)
{
Guard.NotNull(factory);
Guard.NotNull(options);
Expand Down
10 changes: 5 additions & 5 deletions src/Polly.Core/ResiliencePipelineBuilderExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public static TBuilder AddPipeline<TBuilder>(this TBuilder builder, ResiliencePi
Guard.NotNull(builder);
Guard.NotNull(pipeline);

builder.AddStrategyCore(_ => PipelineComponent.FromPipeline(pipeline), EmptyOptions.Instance);
builder.AddPipelineComponent(_ => PipelineComponent.FromPipeline(pipeline), EmptyOptions.Instance);
return builder;
}

Expand All @@ -49,7 +49,7 @@ public static ResiliencePipelineBuilder<TResult> AddPipeline<TResult>(this Resil
Guard.NotNull(builder);
Guard.NotNull(pipeline);

builder.AddStrategyCore(_ => PipelineComponent.FromPipeline(pipeline), EmptyOptions.Instance);
builder.AddPipelineComponent(_ => PipelineComponent.FromPipeline(pipeline), EmptyOptions.Instance);
return builder;
}

Expand All @@ -72,7 +72,7 @@ public static TBuilder AddStrategy<TBuilder>(this TBuilder builder, Func<Strateg
Guard.NotNull(factory);
Guard.NotNull(options);

builder.AddStrategyCore(context => PipelineComponent.FromStrategy(factory(context)), options);
builder.AddPipelineComponent(context => PipelineComponent.FromStrategy(factory(context)), options);
return builder;
}

Expand All @@ -95,7 +95,7 @@ public static ResiliencePipelineBuilder AddStrategy(
Guard.NotNull(factory);
Guard.NotNull(options);

builder.AddStrategyCore(context => PipelineComponent.FromStrategy(factory(context)), options);
builder.AddPipelineComponent(context => PipelineComponent.FromStrategy(factory(context)), options);
return builder;
}

Expand All @@ -119,7 +119,7 @@ public static ResiliencePipelineBuilder<TResult> AddStrategy<TResult>(
Guard.NotNull(factory);
Guard.NotNull(options);

builder.AddStrategyCore(context => PipelineComponent.FromStrategy(factory(context)), options);
builder.AddPipelineComponent(context => PipelineComponent.FromStrategy(factory(context)), options);
return builder;
}

Expand Down

0 comments on commit 603a43d

Please sign in to comment.