Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
peter-csala committed Jan 23, 2024
1 parent aa0c102 commit e9e48a5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
5 changes: 4 additions & 1 deletion docs/chaos/behavior.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,10 @@ Use behavior strategies to inject delays.
var pipeline = new ResiliencePipelineBuilder()
.AddChaosBehavior(new ChaosBehaviorStrategyOptions
{
BehaviorGenerator = static args => Task.Delay(TimeSpan.FromSeconds(7), args.Context.CancellationToken),
BehaviorGenerator = static async args =>
{
await Task.Delay(TimeSpan.FromSeconds(7), args.Context.CancellationToken);
}
})
.Build();
```
Expand Down
6 changes: 5 additions & 1 deletion src/Snippets/Docs/Chaos.Behavior.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using Polly.Retry;
using Polly.Simmy;
using Polly.Simmy.Behavior;
using Polly.Simmy.Latency;

namespace Snippets.Docs;

Expand Down Expand Up @@ -65,7 +66,10 @@ public static void AntiPattern_InjectDelay()
var pipeline = new ResiliencePipelineBuilder()
.AddChaosBehavior(new ChaosBehaviorStrategyOptions
{
BehaviorGenerator = static args => Task.Delay(TimeSpan.FromSeconds(7), args.Context.CancellationToken),
BehaviorGenerator = static async args =>
{
await Task.Delay(TimeSpan.FromSeconds(7), args.Context.CancellationToken);
}
})
.Build();

Expand Down

0 comments on commit e9e48a5

Please sign in to comment.