Comments (3)
James,
If I provided an IPolicy interface, you would still have references to Polly all over your code base.
The point of decoupling is to shield your code from third party code. To do this, you would create the interface that your code relies on (IPolicy) and then implement it using Polly (as you have done), or some other exception handling library.
The point is that your code only knows about your own interface which you inject everywhere. You could use some other library, and your code would not care. If I defined an IPolicy that you used everywhere and you wanted to change libraries, you are stuck.
Does this make sense?
from polly.
It absolutely makes sense yes. In fact this is exactly how we have implemented it.
Cheers, keep up the good work 👍
from polly.
James,
Much appreciated, I'm glad you are enjoying the library.
Regards
Michael
from polly.
Related Issues (20)
- solved : wrong library
- [Bug]: NuGet packages have default description since v8 HOT 1
- [Question]: How to prevent Exception bubbling up to the main app HOT 2
- [Bug]: Rebus messages aren't being published in the OnRetry HOT 10
- [Question]: Adding Typed ResiliencePipeline to ResiliencePipelineRegistry? HOT 2
- [Question]: Difference between Hedging: Fallback mode and Fallback strategy HOT 2
- [Feature request]: Enumerate policies in ResiliencePipelineRegistry HOT 2
- FUNDING.yml HOT 2
- [Question]: Retry strategy sometimes works, sometimes returns on first try while writing unit tests HOT 10
- BreakDurationGenerator not passed to CircuitStateController HOT 2
- Bring back simple Circuitbreaker HOT 5
- [Feature request]: Add ConfigureResiliencePipelineRegistry to IServiceCollection HOT 4
- [Question]: Customize telemetry event severity? HOT 10
- [Bug]: Retry Startegy stops retrying unexpectedly
- [Feature request]: Make 'PipelineDisposed' event available on ResiliencePipelineProvider HOT 1
- [Question]: Polly 8.2.0 Why Timeout not effective? HOT 9
- [Question]: Replacing ResiliencePipelineProvider with keyed services HOT 8
- [Bug]: ResiliencePipelineBuilder AddCircuitBreaker grows stacktrace uncontrollably HOT 11
- [Feature request]: Relax validation of TimeoutStrategyOptions.Timeout HOT 4
- how to use it for retry but not fault situation? HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from polly.