diff --git a/samples/Extensibility/Program.cs b/samples/Extensibility/Program.cs index 35a31dfb887..c9e27adfba9 100644 --- a/samples/Extensibility/Program.cs +++ b/samples/Extensibility/Program.cs @@ -33,7 +33,10 @@ internal class MySimpleStrategy : ResilienceStrategy { - protected override ValueTask> ExecuteCoreAsync(Func>> callback, ResilienceContext context, TState state) + protected override ValueTask> ExecuteCore( + Func>> callback, + ResilienceContext context, + TState state) { Console.WriteLine("MySimpleStrategy executing!"); @@ -64,8 +67,6 @@ protected override ValueTask> ExecuteCoreAsync // 1.B Define the options. public class MyResilienceStrategyOptions : ResilienceStrategyOptions { - public override string StrategyType => "MyCustomStrategy"; - // Use the arguments in the delegates. // The recommendation is to use asynchronous delegates. public Func? OnCustomEvent { get; set; } @@ -87,7 +88,10 @@ public MyResilienceStrategy(ResilienceStrategyTelemetry telemetry, MyResilienceS this.onCustomEvent = options.OnCustomEvent; } - protected override async ValueTask> ExecuteCoreAsync(Func>> callback, ResilienceContext context, TState state) + protected override async ValueTask> ExecuteCore( + Func>> callback, + ResilienceContext context, + TState state) { // Here, do something before callback execution // ... @@ -129,5 +133,3 @@ public static TBuilder AddMyResilienceStrategy(this TBuilder builder, // Pass the options, note that the options instance is automatically validated by the builder options); } - -