$ account reactiveui
Refit is a .NET library that automatically generates type-safe HTTP API clients from C# interfaces decorated with attributes like [Get], [Post], [Header], [Body], and [Query]. It operates via two parallel request-building paths: a Roslyn source generator that emits inline request construction at compile time (trim/AOT-safe), and a reflection-based fallback for unsupported shapes. The library integrates deeply with Microsoft.Extensions.DependencyInjection and IHttpClientFactory, providing extension methods like AddRefitClient<T> and AddKeyedRefitClient for managed HTTP client lifecycles. It supports multiple serializers (System.Text.Json, Newtonsoft.Json, XML), content compression (gzip, Brotli, Zstandard), streaming responses (IAsyncEnumerable, JSON Lines, SSE), multipart form data, and per-request timeouts and authorization via DelegatingHandler pipelines. The architecture is modular: the core Refit package provides attributes, serialization interfaces, and the runtime GeneratedRequestRunner; Refit.HttpClientFactory adds DI integration; Refit.Newtonsoft.Json and Refit.Xml provide alternative serializers; Refit.Reflection offers the runtime request builder; and Refit.Testing supplies StubHttp and Reply for unit testing without a live server. The source generator (InterfaceStubGeneratorV2) is an incremental generator that parses interfaces and emits partial classes into the consumer assembly, using value-equatable models (ImmutableEquatableArray) for caching. The reflection path caches parsed method metadata and builds requests via delegates, ensuring parity with generated code. Key entry points include RestService.For<T>() for creating clients, AddRefitClient<T>() for DI registration, and RefitSettings for central configuration. External dependencies are minimal: System.Text.Json (built-in), Microsoft.Extensions.Http, and optionally Newtonsoft.Json or System.Xml. The library is extensively tested with unit tests, integration tests, snapshot-based generator tests, and benchmarks measuring allocation and throughput. It targets .NET 8/9/10/11 and .NET Framework 4.6.2+, with polyfills for missing BCL types.
ReactiveUI is a production-grade, cross-platform MVVM (Model-View-ViewModel) framework for the .NET ecosystem. Its architecture is centered around reactive primitives (ReactiveObject, ReactiveProperty, IObservable) that form the backbone of its view model layer. The framework employs a fluent builder pattern (RxAppBuilder) for application initialization, a custom dependency injection system ('Splat'), and extensive source code generation to provide a type-safe, AOT-compatible binding and view resolution system. It abstracts platform-specific UI toolkits (WPF, WinUI, MAUI, WinForms, AndroidX, iOS/macOS UIKit, Blazor) behind a consistent set of interfaces (IViewFor<T>, IRoutableViewModel, IActivatableViewModel). The codebase demonstrates strong engineering practices, including a sophisticated reactive command pattern (ReactiveCommand), a typed message bus (MessageBus), a state persistence lifecycle (SuspensionHost), and a collection change-set streaming mechanism (ReactiveChangeSet). A significant portion of the code is dedicated to ensuring Ahead-of-Time (AOT) compilation safety, avoiding reflection where possible through generic view resolution and explicit registration, which is a non-trivial and well-executed design constraint. The repository includes extensive unit tests, platform-specific integration tests, and performance benchmarks. While the framework is actively maintained (evidenced by recent commits, low open issue count, and zero Dependabot alerts), its ambitious scope introduces inherent complexity. The reliance on a custom DI framework, conditional compilation flags (REACTIVE_SHIM), and the maintenance burden of supporting eight distinct UI platforms are notable architectural trade-offs. Despite this, the core abstractions are cleanly separated, highly reusable, and represent a high standard of craftsmanship in the .NET reactive programming space.
Splat is a cross-platform .NET utility library that provides a lean abstraction layer for dependency injection (service location), logging, bitmap loading, color handling, and application performance monitoring. It is part of the ReactiveUI ecosystem and is designed to work across .NET Framework, .NET Core, Xamarin, and modern .NET (including NativeAOT). The library offers multiple DI container adapters (Autofac, DryIoc, Ninject, SimpleInjector, Microsoft.Extensions.DependencyInjection), logging backends (Serilog, NLog, Log4Net, Microsoft.Extensions.Logging, Exceptionless), and bitmap loaders (SkiaSharp, WPF, Android native, Cocoa). The core service location includes several resolver implementations with different performance characteristics, including a modern lock-free generic-first resolver optimized for AOT. The logging abstraction supports allocation-free typed arguments and composable wrappers. While the library is well-tested and actively maintained, some adapter packages are marked as alpha/prototype and a few components rely on reflection or platform-specific code that may drift.