Innovabit.DotNet.Interceptors.Collections
1.0.0.102
See the version list below for details.
dotnet add package Innovabit.DotNet.Interceptors.Collections --version 1.0.0.102
NuGet\Install-Package Innovabit.DotNet.Interceptors.Collections -Version 1.0.0.102
<PackageReference Include="Innovabit.DotNet.Interceptors.Collections" Version="1.0.0.102" />
<PackageVersion Include="Innovabit.DotNet.Interceptors.Collections" Version="1.0.0.102" />
<PackageReference Include="Innovabit.DotNet.Interceptors.Collections" />
paket add Innovabit.DotNet.Interceptors.Collections --version 1.0.0.102
#r "nuget: Innovabit.DotNet.Interceptors.Collections, 1.0.0.102"
#:package Innovabit.DotNet.Interceptors.Collections@1.0.0.102
#addin nuget:?package=Innovabit.DotNet.Interceptors.Collections&version=1.0.0.102
#tool nuget:?package=Innovabit.DotNet.Interceptors.Collections&version=1.0.0.102
Innovabit.DotNet.Interceptors.Collections
A collection of ready-to-use interceptors for the
Innovabit.DotNet.Interceptors
suite. It provides retry-on-exception, timeout and circuit-breaker interceptors.
Install
dotnet add package Innovabit.DotNet.Interceptors.Collections
Retry on exception
Decorate a method with [RetryOnException] and it is retried when it throws.
using Innovabit.DotNet.Interceptors.Collections.Retries;
public class PaymentService : IPaymentService
{
[RetryOnException(MaxFailures = 5, WaitMs = 200, ExceptionTypes = new[] { typeof(HttpRequestException) })]
public Task ChargeAsync(Order order) { ... }
}
Register it from DI:
services.AddInterceptors()
.AddRetry();
services.AddScopedWithInterception<IPaymentService, PaymentService>();
Options ([RetryOnException])
MaxFailures— maximum attempts (default3, must be> 0).WaitMs— delay between attempts in milliseconds (default1000).ExceptionTypes/ExceptionType— only retry for these exception types; when unset, any exception is retried.
Works with synchronous methods, Task and Task<T>. When all attempts fail the last
exception is re-thrown preserving its original stack trace.
Timeout
Decorate a method with [Timeout(milliseconds)] and it fails with a TimeoutException when it
runs longer than the limit.
using Innovabit.DotNet.Interceptors.Collections.Timeouts;
public class ReportService : IReportService
{
[Timeout(5000)]
public Task<Report> BuildAsync() { ... }
}
Register it from DI:
services.AddInterceptors()
.AddTimeout();
services.AddScopedWithInterception<IReportService, ReportService>();
The timeout is enforced on Task/Task<T> and ValueTask/ValueTask<T>-returning methods; a
synchronous method cannot be interrupted once running, so the timeout is a no-op there. [Timeout]
bounds how long the caller waits — the timed-out call keeps running in the background, it is
not cancelled.
Circuit breaker
Decorate a method with [CircuitBreaker] and it stops being called once it has failed repeatedly:
further calls fail immediately with a CircuitBreakerOpenException instead of piling more load onto
a dependency that is already down.
using Innovabit.DotNet.Interceptors.Collections.CircuitBreakers;
public class CatalogClient : ICatalogClient
{
[CircuitBreaker(FailureThreshold = 5, DurationOfBreakMs = 30_000, ExceptionType = typeof(HttpRequestException))]
public Task<Product> GetAsync(string sku) { ... }
}
Register it from DI:
services.AddInterceptors()
.AddCircuitBreaker();
services.AddScopedWithInterception<ICatalogClient, CatalogClient>();
Options ([CircuitBreaker])
FailureThreshold— consecutive failures that open the circuit (default5). A single success resets the count.DurationOfBreakMs— how long the circuit stays open before a trial call is allowed through (default30000).SuccessThreshold— consecutive successful trial calls that close the circuit again (default1).ExceptionType— only these exceptions count as a failure; others are re-thrown without touching the circuit. When unset, every exception counts.
How it behaves
| State | What happens |
|---|---|
Closed |
Calls go through; consecutive failures are counted. |
Open |
Calls are rejected with CircuitBreakerOpenException (which carries RetryAfter) without reaching the method, until the break elapses. |
HalfOpen |
Exactly one trial call at a time is let through. A success closes the circuit, a failure opens it again for another full break. |
Circuits are tracked per method in a singleton CircuitBreakerRegistry — shared by every caller,
because state that reset per request would never break anything. Inject the registry to inspect a
circuit (GetState(MethodInfo)) from a health check, or reset them all with Reset(). Tests can
drive time with AddCircuitBreaker(TimeProvider) instead of waiting out the break.
Put [CircuitBreaker] on the call that leaves your process, not on the orchestrating method above
it. It runs at InterceptorOrders.CircuitBreaker (400), above retry (500), so an open circuit
rejects the call before the retry loop spends its attempts on a dependency that is known to be down.
Part of
The Innovabit.DotNet.Interceptors suite —
github.com/Innovabit/dotnet-interceptors.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Innovabit.DotNet.Interceptors.Abstractions (>= 1.0.0.102)
-
net8.0
- Innovabit.DotNet.Interceptors.Abstractions (>= 1.0.0.102)
-
net9.0
- Innovabit.DotNet.Interceptors.Abstractions (>= 1.0.0.102)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Innovabit.DotNet.Interceptors.Collections:
| Package | Downloads |
|---|---|
|
Innovabit.DotNet.Interceptors.All
Meta-package: every interceptor concern in the suite (logging, validation, caching, notifications, telemetry, audit, authorization, rate limiting, coordination, feature gates, transactions, retry/timeout/circuit breaker/fallback) in one reference. Providers are separate packages — pick the ones you use. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.0.119 | 54 | 11/14/2026 |
| 2.0.118 | 122 | 11/7/2026 |
| 2.0.117 | 139 | 10/31/2026 |
| 2.0.116 | 124 | 10/26/2026 |
| 2.0.115 | 131 | 10/17/2026 |
| 2.0.114 | 137 | 10/10/2026 |
| 2.0.113 | 139 | 10/3/2026 |
| 2.0.112 | 141 | 9/28/2026 |
| 2.0.111 | 118 | 9/28/2026 |
| 2.0.110 | 122 | 9/27/2026 |
| 2.0.109 | 117 | 9/26/2026 |
| 2.0.108 | 120 | 9/26/2026 |
| 2.0.107 | 127 | 9/26/2026 |
| 2.0.106 | 128 | 9/25/2026 |
| 2.0.105 | 126 | 9/25/2026 |
| 1.0.0.104 | 121 | 9/25/2026 |
| 1.0.0.103 | 106 | 9/25/2026 |
| 1.0.0.102 | 103 | 9/25/2026 |
| 1.0.0.101 | 103 | 9/25/2026 |
| 1.0.0.100 | 106 | 9/25/2026 |