Releases: jhosm/CSharp-ACDC
Releases · jhosm/CSharp-ACDC
v1.1.0
What's Changed
New Features
- Per-request extension methods — Added
SkipCache(),SkipAuth(),CacheMaxAge()and other extension methods onHttpRequestMessagefor cleaner per-request option overrides - Comprehensive README — Expanded documentation with quick start guide, configuration reference, and usage examples
Bug Fixes
- Thread-safety fixes — Resolved race conditions in
AuthHandlertoken refresh queue andBackoffManager; sealed remaining handler classes to prevent unsafe subclassing - AuthenticatedClient sample — Fixed crash on network errors by adding proper exception handling
Improvements
- Cache option naming — Renamed FusionCache-specific jargon in
AcdcCacheOptionsto domain-aligned terms (e.g.,FailSafeMaxDuration→StaleMaxAge,FactoryTimeout→BackgroundRefreshTimeout)
Full Changelog: v1.0.0...v1.1.0
v1.0.0 — Initial Release
CSharp-ACDC v1.0.0
Server-only C# port of Dart-ACDC — a production HTTP client library with auth, caching, logging, and structured error handling. Targets ASP.NET Core / .NET 10.
Highlights
DelegatingHandler Pipeline
Complete handler chain: Logging → Error → Cancellation → Auth → Cache → [Custom] → Deduplication
Authentication
- OAuth 2.1 token refresh with proactive and reactive strategies
- Concurrent refresh queue with leader/follower pattern (single refresh for N simultaneous 401s)
- Exponential backoff for transient auth failures (1s–30s clamped)
Caching
- FusionCache integration with L1 (memory) + L2 (Redis) tiers
- ETag/If-None-Match revalidation and stale-while-revalidate
- Cache mutation invalidation (POST/PUT/DELETE clear related GET caches)
- User-isolated cache keys via JWT
subclaim extraction
Exception Hierarchy
- Typed exceptions:
AcdcAuthException,AcdcClientException,AcdcServerException,AcdcNetworkException,AcdcCacheException - URL redaction and response body truncation for safe logging
Builder & DI
- Fluent builder API with progressive disclosure (
AcdcClientBuilder) IHttpClientFactoryintegration with DI composition root- Keyed service support for multiple named clients
IConfigurationbinding forappsettings.json
Additional Features
- Structured logging with sensitive data redaction
- Bulk request cancellation via
CancelAll() - GET and HEAD request deduplication
- Per-request option overrides (
SkipCache,SkipAuth,CacheMaxAge)
CI/CD
- GitHub Actions CI pipeline (build, test, coverage) on push/PR
- Automated NuGet publishing on version tags
- Dependabot for weekly dependency updates
Testing
- 301 unit tests (xUnit + NSubstitute + MockHttp)
- 20 integration tests (WireMock.Net end-to-end)
Documentation
- Comprehensive README with quick start, examples, and config reference
- 4 runnable sample projects (BasicUsage, AuthenticatedClient, CachedClient, FullPipeline)
- XML doc comments on all public API surface
NuGet
- Package metadata, Source Link, and symbol packages configured
- Ready for
dotnet packand NuGet publishing