Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migration guide from v7 to v8 #1598

Merged
merged 20 commits into from
Sep 19, 2023
10 changes: 5 additions & 5 deletions README_V8.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ Visit [resilience strategies](docs/resilience-strategies.md) docs to explore how
<!-- snippet: retry -->
```cs
// Add retry using the default options.
// See https://github.com/App-vNext/Polly/blob/main/docs/strategies/retry.md#defaults for default values.
// See https://www.pollydocs.org/strategies/retry#defaults for defaults.
new ResiliencePipelineBuilder().AddRetry(new RetryStrategyOptions());

// For instant retries with no delay
Expand Down Expand Up @@ -208,7 +208,7 @@ If all retries fail, a retry strategy rethrows the final exception back to the c
<!-- snippet: circuit-breaker -->
```cs
// Add circuit breaker with default options.
// See https://github.com/App-vNext/Polly/blob/main/docs/strategies/circuit-breaker.md#defaults for default values.
// See https://www.pollydocs.org/strategies/circuit-breaker#defaults for defaults.
new ResiliencePipelineBuilder().AddCircuitBreaker(new CircuitBreakerStrategyOptions());

// Add circuit breaker with customized options:
Expand Down Expand Up @@ -320,7 +320,7 @@ For more details, refer to the [Fallback documentation](docs/strategies/fallback
<!-- snippet: Hedging -->
```cs
// Add hedging with default options.
// See https://github.com/App-vNext/Polly/blob/main/docs/strategies/hedging.md#defaults for default values.
// See https://www.pollydocs.org/strategies/hedging#defaults for defaults.
new ResiliencePipelineBuilder<HttpResponseMessage>()
.AddHedging(new HedgingStrategyOptions<HttpResponseMessage>());

Expand Down Expand Up @@ -366,7 +366,7 @@ The timeout resilience strategy assumes delegates you execute support [co-operat
<!-- snippet: timeout -->
```cs
// Add timeout using the default options.
// See https://github.com/App-vNext/Polly/blob/main/docs/strategies/timeout.md#defaults for default values.
// See https://www.pollydocs.org/strategies/timeout#defaults for defaults.
new ResiliencePipelineBuilder()
.AddTimeout(new TimeoutStrategyOptions());

Expand Down Expand Up @@ -410,7 +410,7 @@ Timeout strategies throw `TimeoutRejectedException` when a timeout occurs. For m
<!-- snippet: rate-limiter -->
```cs
// Add rate limiter with default options.
// See https://github.com/App-vNext/Polly/blob/main/docs/strategies/rate-limiter.md#defaults for default values.
// See https://www.pollydocs.org/strategies/rate-limiter#defaults for defaults.
new ResiliencePipelineBuilder()
.AddRateLimiter(new RateLimiterStrategyOptions());

Expand Down
4 changes: 3 additions & 1 deletion docs/advanced/resilience-context.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ Below is an example demonstrating how to work with `ResilienceContext`:
ResilienceContext context = ResilienceContextPool.Shared.Get(cancellationToken);

// Attach custom data to the context

context.Properties.Set(MyResilienceKeys.Key1, "my-data");
context.Properties.Set(MyResilienceKeys.Key2, 123);

Expand Down Expand Up @@ -69,6 +68,9 @@ public static class MyResilienceKeys
```
<!-- endSnippet -->

> [!NOTE]
> We recommend defining a static class to hold the resilience property keys used in your project. This approach makes these keys easier to discover and maintain. For simpler scenarios, you can directly use the creation of `ResiliencePropertyKey<string>` since it's a cheap, struct-based API.

## Resilient context pooling

<!-- Overview -->
Expand Down
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ You can also find many resources and community contributions, such as:

- [Samples](https://github.com/App-vNext/Polly/tree/main/samples): Samples in this repository that serve as an introduction to Polly.
- [Practical Samples](https://github.com/App-vNext/Polly-Samples): Practical examples for using various implementations of Polly. Please feel free to contribute to the Polly-Samples repository in order to assist others who are either learning Polly for the first time, or are seeking advanced examples and novel approaches provided by our generous community.
- [Polly-Contrib](community/polly-contrib.md)): Community projects and libraries that extend and enhance Polly's functionality and ecosystem.
- [Libraries and contributions](community/libraries-and-contributions.html): Dependencies and contributors that make Polly possible and awesome.
- [Polly-Contrib](community/polly-contrib.md): Community projects and libraries that extend and enhance Polly's functionality and ecosystem.
- [Libraries and contributions](community/libraries-and-contributions): Dependencies and contributors that make Polly possible and awesome.
- Microsoft's [eShopOnContainers project](https://github.com/dotnet-architecture/eShopOnContainers): Sample project demonstrating a .NET Microservices architecture and using Polly for resilience.

You can browse the documentation using the sidebar or visit the [API](api/index.md) section for the reference documentation.
Loading
Loading