Skip to content

Releases: HappyEntity/Refit.Composite

Release v2.1.1

19 Jun 05:34

Choose a tag to compare

Refit v11 Error Pipeline Optimization & Infrastructure Polish 🧹🛠️

This patch release introduces critical cleanups to the HTTP pipeline following the migration to Refit v11, ensuring that the native exception handling mechanics of the underlying framework work perfectly.

🌟 What's Fixed & Improved

  • Refit v11 Native Exception Alignment: Completely removed the obsolete ErrorHandlingHandler. Refit v11 now natively intercepts transport/network faults (DNS issues, socket exceptions, timeouts) and surfaces them as ApiRequestException inside the .Error property of ApiResponse<T>. Removing our legacy middleware prevents masking these new exception types, allowing client applications to properly catch and differentiate network failures.
  • Documentation & Sample Update: Refactored README.md features list and code examples to reflect the removal of the old error-handling shim, keeping the documentation accurate and in sync with the codebase.
  • Package Profile Polish: Centrally injected <IsPackable>false</IsPackable> into tests/Directory.Build.props. This globally safeguards all testing, benchmark, and sample projects (including the Blazor WASM app) from accidentally generating redundant .nupkg artifacts during root solution packaging.

Full Changelog: v2.1.0...v2.1.1

Release v2.1.0

18 Jun 09:34

Choose a tag to compare

Enterprise-Grade Cross-Platform Refit Composition 🚀🌐

This major minor release brings deep structural optimization and elite cross-platform infrastructure alignment to the library. Refit.Composite is now fully ready for all environments — ranging from legacy .NET Framework applications up to cutting-edge browser-based Blazor WebAssembly and high-performance server-side Native AOT.

🌟 Key Enhancements

  • Refit 11 Synchronization: Upgraded the fundamental dependency baseline to the modern Refit 11.x generation ([11.0.0, 12.0.0) version range). This entirely resolves the CS0012 type/assembly clashing errors on current .NET 8/9/10 бэкендах.
  • Ultimate Multi-Targeting Support: The core library now simultaneously compiles into 5 production frameworks (net10.0, net9.0, net8.0, netstandard2.0, and net462), making it plug-and-play for both modern services and legacy enterprise systems.
  • Embedded Static Analyzers: Added conditional <IsAotCompatible> metadata. Your Ahead-Of-Time (Native AOT) compiler will now automatically validate code generation flags out-of-the-box.
  • Blazor WASM Sample App: Introduced an official end-to-end frontend integration showcase under the tests/ directory, confirming strict runtime compatibility with browser single-threaded Mono WebAssembly.
  • Clean Dev Ops Infrastructure: Isolated test-only dependencies using secondary nested Central Package Management (tests/Directory.Packages.props) to keep the core NuGet package profile completely pristine.

Full Changelog: v2.0.3...v2.1.0

Release v2.0.3

17 Jun 08:22

Choose a tag to compare

Blazor WASM Compatibility & Zero-Allocation Performance 🏎️🌐

This patch introduces a major internal optimization to the generated code, making the library fully compatible with Blazor WebAssembly (WASM) client applications while preserving extreme high-performance metrics on the server side.

🌟 What's Fixed & Improved

  • Blazor WebAssembly Support: Replaced System.Threading.Interlocked with a sophisticated Volatile Double-Check Lock pattern. This completely eliminates runtime dependency on experimental WASM multi-threading browser flags, allowing the generated code to run seamlessly in the browser's single-threaded environment (fixing the <Module> type initialization crash in Debug mode).
  • Absolute Zero Allocations: Completely eliminated runtime lambda closure allocations (display class instantiation) inside property getters. The hot path is now entirely allocation-free (0 Bytes).
  • Blazing Fast Resolution: Property access time has dropped back to an unbelievable ~0.9 nanoseconds — running up to 120x faster than standard .GetRequiredService<T>() calls.
  • Platform Declarations: Explicitly added <SupportedPlatform Include="browser" /> to the core project metadata to safeguard future codebase expansions.

Full Changelog: v2.0.2...v2.0.3

Release v2.0.2

17 Jun 07:44

Choose a tag to compare

Bug Fix Release 🛠️

This patch fixes a compiler collision error (CS0120) that happens if a composite interface contains a property explicitly named System.

🔧 Fixed

  • System Namespace Clashing: Prefixed all internal .NET framework types and utilities (like System.Threading.Interlocked and System.IServiceProvider) with the global namespace qualifier (global::System). This ensures the generated code compiles successfully even if the user defines a property named System.

Full Changelog: v2.0.1...v2.0.2

Release v2.0.1

17 Jun 07:25

Choose a tag to compare

Bug Fix Release 🛠️

This patch resolves a critical compilation issue (CS0234) that occurred when integrating the library into projects with nested or overlapping namespace structures (e.g., when a folder/sub-namespace shares a name with part of the parent namespace).

🔧 Fixed

  • Namespace Clashing in Generated Code: The Source Generator now enforces fully qualified type names with the global:: prefix (SymbolDisplayFormat.FullyQualifiedFormat) for all properties and interfaces. This completely eliminates compiler ambiguity and ensures seamless compilation regardless of the user's project directory structure.

Full Changelog: v2.0.0...v2.0.1

Release v2.0.0

17 Jun 03:11

Choose a tag to compare

The Source Generator Era 🏎️

This major release marks a complete architectural evolution of the library, transitioning from dynamic runtime proxies to an ultra-fast, compile-time Incremental Source Generator.

🌟 What's New

  • Incremental Source Generator: Core orchestration has been rewritten from scratch. Code is now generated statically at compile time, eliminating runtime reflection and metadata overhead entirely.
  • 100% Native AOT & Trimming Compatibility: Fully compatible with Ahead-Of-Time compilation out of the box (<PublishAot>true</PublishAot>). Say goodbye to PlatformNotSupportedException and truncation warnings!
  • Hardware-Level Lock-Free Cache: Replaced ConcurrentDictionary with a high-performance atomic CAS (Compare-And-Swap) caching pattern using Interlocked.CompareExchange.
  • Extreme Performance: Property resolution is now up to 120x faster than direct DI container calls, dropping execution time to an unbelievable ~0.8 nanoseconds with absolute zero allocations on the hot path.

⚠️ Breaking Changes

  • RefitCompositeProxy has been completely removed from the public API as the library no longer uses dynamic proxies at runtime.

Full Changelog: v1.0.0...v2.0.0

Release v1.0.0

17 Jun 00:25

Choose a tag to compare

The Dynamic Proxy Era 🔌

This initial stable release introduces Refit.Composite — an elegant, high-performance architectural wrapper for the Refit ecosystem designed to orchestrate multiple granular API contracts into unified services.

🌟 What's New

  • Composite API Pattern: Aggregate multiple isolated Refit interfaces under a single, cohesive service contract without boilerplate abstract classes.
  • Dynamic Proxy Orchestration: Powered by runtime proxy generation via System.Reflection.Emit and DispatchProxy to seamlessly route incoming API calls.
  • ConcurrentDictionary Caching: On-demand property resolution backed by thread-safe caching, ensuring zero subsequent allocations on the hot path.
  • Declarative Pipeline Control: Manage individual DelegatingHandler chains using native C# 12+ generic attributes directly over API definitions.
  • Built-in Quality of Life: Out-of-the-box integration with status-code-aware HTTP logging and automated exception mapping.

⚙️ Getting Started

Simply register your composite interface in your Service Collection with a single clean extension call:

services.AddRefitComposite<IMyCompositeApi>("https://example.com");

Full Changelog: https://github.com/HappyEntity/Refit.Composite/commits/v1.0.0