Skip to content

Releases: jhosm/CSharp-ACDC

v1.1.0

15 Feb 01:00

Choose a tag to compare

What's Changed

New Features

  • Per-request extension methods — Added SkipCache(), SkipAuth(), CacheMaxAge() and other extension methods on HttpRequestMessage for 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 AuthHandler token refresh queue and BackoffManager; 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 AcdcCacheOptions to domain-aligned terms (e.g., FailSafeMaxDurationStaleMaxAge, FactoryTimeoutBackgroundRefreshTimeout)

Full Changelog: v1.0.0...v1.1.0

v1.0.0 — Initial Release

14 Feb 22:34

Choose a tag to compare

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 sub claim 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)
  • IHttpClientFactory integration with DI composition root
  • Keyed service support for multiple named clients
  • IConfiguration binding for appsettings.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 pack and NuGet publishing