-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Simplify code #2740
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
Simplify code #2740
Conversation
Apply `AD0001` and `AD0002` code fixes.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2740 +/- ##
==========================================
+ Coverage 96.12% 96.15% +0.02%
==========================================
Files 309 309
Lines 7118 7118
Branches 1008 1008
==========================================
+ Hits 6842 6844 +2
+ Misses 222 221 -1
+ Partials 54 53 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
|
Actually, might just be a flaky test. |
Update documentation snippets.
Add missing test coverage for `Cache<string>`.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR applies AD0001 and AD0002 code fixes to simplify the codebase by removing unnecessary generic type parameters from method calls where the compiler can infer the types automatically.
- Removed redundant generic type parameters from various method calls across test and source files
- Simplified XML documentation references by removing fully qualified namespaces where unnecessary
- Updated one test method to use
CancellationToken.Noneinstead of the fully qualified version
Reviewed Changes
Copilot reviewed 29 out of 29 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| test/Polly.Specs/Caching/CacheTResultSpecs.cs | Adds a new test method for cache behavior with ICacheKeyStrategy |
| test/Polly.RateLimiting.Tests/RateLimiterResiliencePipelineBuilderExtensionsTests.cs | Simplified CancellationToken.None reference |
| test/Polly.Core.Tests/Simmy/Outcomes/ChaosOutcomeStrategyTests.cs | Removed generic type parameter from ExecuteAsync call |
| test/Polly.Core.Tests/Hedging/Controller/TaskExecutionTests.cs | Removed generic type parameters from InitializeAsync calls |
| src/Snippets/Docs/Migration.Registry.cs | Simplified TryGetPipeline method call |
| src/Snippets/Docs/Migration.Execute.cs | Removed generic type parameters from ExecuteOutcomeAsync calls |
| src/Snippets/Docs/Fallback.cs | Removed generic type parameters from ExecuteOutcomeAsync calls |
| src/Snippets/Docs/CircuitBreaker.cs | Removed generic type parameters from ExecuteOutcomeAsync calls |
| src/Polly/Wrap/PolicyWrapEngine.cs | Removed generic type parameters from Execute method calls |
| src/Polly/Wrap/PolicyWrap.cs | Removed generic type parameters from PolicyWrapEngine.Implementation calls |
| src/Polly/Wrap/AsyncPolicyWrapEngine.cs | Removed generic type parameters from ExecuteAsync method calls |
| src/Polly/Wrap/AsyncPolicyWrap.cs | Removed generic type parameters from AsyncPolicyWrapEngine.ImplementationAsync calls |
| src/Polly/Timeout/TimeoutStrategy.cs | Simplified XML documentation references |
| src/Polly/PolicyBuilder.cs | Simplified XML documentation references |
| src/Polly/Fallback/AsyncFallbackPolicy.cs | Removed generic type parameter from AsyncFallbackEngine.ImplementationAsync call |
| src/Polly/CircuitBreaker/CircuitBreakerPolicy.cs | Removed generic type parameter from CircuitBreakerEngine.Implementation call |
| src/Polly/CircuitBreaker/AsyncCircuitBreakerPolicy.cs | Removed generic type parameter from AsyncCircuitBreakerEngine.ImplementationAsync call |
| src/Polly/Caching/CacheTResultSyntax.cs | Removed generic type parameters from Cache method calls |
| src/Polly/Caching/CachePolicy.cs | Removed generic type parameter from CacheEngine.Implementation call |
| src/Polly/Caching/AsyncCachePolicy.cs | Removed generic type parameters from AsyncCacheEngine.ImplementationAsync calls |
| src/Polly/AsyncPolicy.NonGenericImplementation.cs | Removed generic type parameter from ImplementationAsync call |
| src/Polly.Core/ResiliencePipelineT.Async.cs | Simplified XML documentation reference |
| src/Polly.Core/ResiliencePipelineBuilderBase.cs | Simplified XML documentation references |
| src/Polly.Core/ResiliencePipeline.AsyncT.cs | Simplified XML documentation reference |
| src/LegacySupport/RequiresUnreferencedCodeAttribute.cs | Simplified XML documentation reference |
| src/LegacySupport/DynamicallyAccessedMembersAttribute.cs | Simplified XML documentation reference |
| docs/strategies/fallback.md | Removed generic type parameters from ExecuteOutcomeAsync calls in documentation |
| docs/strategies/circuit-breaker.md | Removed generic type parameters from ExecuteOutcomeAsync calls in documentation |
| docs/migration-v8.md | Removed generic type parameters from ExecuteOutcomeAsync and TryGetPipeline calls in documentation |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Apply
AD0001andAD0002code fixes.