Skip to content

Commit

Permalink
Update the code-snippets in the documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
polly-updater-bot[bot] committed Sep 17, 2024
1 parent 5b39448 commit 4922e97
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docs/advanced/dependency-injection.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ Following the definition above, you can resolve the resilience pipelines using k

<!-- snippet: di-keyed-services-use -->
```cs
public class MyApi
public sealed class MyApi
{
private readonly ResiliencePipeline _pipeline;
private readonly ResiliencePipeline<HttpResponseMessage> _genericPipeline;
Expand Down
2 changes: 1 addition & 1 deletion docs/advanced/performance.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ Creating a resilience pipeline can be resource-intensive, so it's advisable not

<!-- snippet: perf-reuse-pipelines -->
```cs
public class MyApi
public sealed class MyApi
{
private readonly ResiliencePipelineRegistry<string> _registry;

Expand Down
4 changes: 2 additions & 2 deletions docs/advanced/telemetry.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@ The `MyTelemetryListener` and `MyMeteringEnricher` is implemented as:

<!-- snippet: telemetry-listeners -->
```cs
internal class MyTelemetryListener : TelemetryListener
internal sealed class MyTelemetryListener : TelemetryListener
{
public override void Write<TResult, TArgs>(in TelemetryEventArguments<TResult, TArgs> args)
{
Console.WriteLine($"Telemetry event occurred: {args.Event.EventName}");
}
}

internal class MyMeteringEnricher : MeteringEnricher
internal sealed class MyMeteringEnricher : MeteringEnricher
{
public override void Enrich<TResult, TArgs>(in EnrichmentContext<TResult, TArgs> context)
{
Expand Down
2 changes: 1 addition & 1 deletion docs/chaos/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ In this approach, a helper extension method can be introduced to add a predefine
<!-- snippet: chaos-extension -->
```cs
// Options that represent the chaos pipeline
public class MyChaosOptions
public sealed class MyChaosOptions
{
public ChaosFaultStrategyOptions Fault { get; set; } = new()
{
Expand Down
2 changes: 1 addition & 1 deletion docs/strategies/hedging.md
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,7 @@ A common use case is with [`DelegatingHandler`](https://learn.microsoft.com/aspn

<!-- snippet: hedging-handler -->
```cs
internal class HedgingHandler : DelegatingHandler
internal sealed class HedgingHandler : DelegatingHandler
{
private readonly ResiliencePipeline<HttpResponseMessage> _pipeline;

Expand Down

0 comments on commit 4922e97

Please sign in to comment.