-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
NoOp
ℹ️ This documentation describes the previous Polly v7 API. If you are using the new v8 API, please refer to pollydocs.org.
Provides a policy which executes passed delegates without intervention.
Sometimes you have code which expects a policy, but you want to run the execution without intervention.
A common use is to stub out Polly in unit tests (to test a system-under-test without the effects of policies you might use in production intervening in the test).
NoOpPolicy
can also be used in code architectures where you expect callers to pass in a policy to govern an executed action, but you have some actions where you have no policy to apply.
NoOpPolicy noOp = Policy.NoOp();
Syntax examples above are sync; comparable async overloads exist for asynchronous operation. See readme and wiki for more details.
Executes the passed delegate without intervention.
The operation of NoOpPolicy
is thread-safe: multiple calls may safely be placed concurrently through a policy instance.
NoOpPolicy
instances may be re-used across multiple call sites.
- Home
- Polly RoadMap
- Contributing
- Transient fault handling and proactive resilience engineering
- Supported targets
- Retry
- Circuit Breaker
- Advanced Circuit Breaker
- Timeout
- Bulkhead
- Cache
- Rate-Limit
- Fallback
- PolicyWrap
- NoOp
- PolicyRegistry
- Polly and HttpClientFactory
- Asynchronous action execution
- Handling InnerExceptions and AggregateExceptions
- Statefulness of policies
- Keys and Context Data
- Non generic and generic policies
- Polly and interfaces
- Some policy patterns
- Debugging with Polly in Visual Studio
- Unit-testing with Polly
- Polly concept and architecture
- Polly v6 breaking changes
- Polly v7 breaking changes
- DISCUSSION PROPOSAL- Polly eventing and metrics architecture