Commit Graph

4 Commits

Author SHA1 Message Date
1fc395f495 Improve ReCClient static client and documentation
Updated `ReCClientOptions` to include a warning about the `LogSuccessfulRequests` option throwing an `InvalidOperationException` if no `ILogger` is registered via DI. Added validation and thread-safety to `BuildStaticClient` using `Lazy<IServiceProvider>`.

Introduced `StaticBuildConfiguration` for callback-based configuration and detailed its properties. Clarified usage patterns, added VB.NET and C# examples, and documented validation rules.

Marked older `BuildStaticClient` overloads as `[Obsolete]` while retaining functionality. Expanded context on static client use cases and synchronous wrappers. Improved documentation clarity and consistency.
2026-05-21 08:33:24 +02:00
275746afde Clarify static API and sync wrapper usage in ReC.Client
Expand documentation on `[Obsolete]` static APIs and sync wrappers,
emphasizing their maintained status and appropriate use cases.

- Added detailed examples for `BuildStaticClient` and `Create`
  in VB.NET and C#, including configuration options.
- Updated `TaskSyncExtensions.Sync` section with warnings about
  potential deadlocks and recommendations for `async/await`.
- Introduced "6.3 Mid-Term Recommendation" to guide migration
  to DI and async patterns.
- Highlighted scenarios where static APIs and sync wrappers
  remain appropriate, such as legacy .NET Framework projects
  or quick-start use cases.
- Clarified that `[Obsolete]` is a reminder, not a breaking change.
2026-05-20 15:35:17 +02:00
e69bc9cdb9 Refactor ReCClient API for async and DI compatibility
Updated `RecActions.InvokeAsync(...).Sync()` to align with migration guidelines, marking `Sync()` as `[Obsolete]` and recommending `async/await` for asynchronous patterns.

Enhanced `BuildStaticClient` methods to include an optional `configureOptions` parameter for flexible `ReCClientOptions` configuration. Added conditional compilation for nullable reference type compatibility across .NET Framework and modern .NET versions.

Updated `Services.AddRecClient` calls to support `configureOptions`. Retained `[Obsolete]` on static helpers to encourage dependency injection (`services.AddRecClient(...)`) for new code.

Revised migration notes to emphasize deprecation of synchronous methods, static helpers, and the importance of adopting modern async and DI patterns. Clarified changes to `GetAsync` methods, error handling with `ReCApiException`, and deserialization behavior.
2026-05-20 15:11:14 +02:00
983f3f76ad Update ReC.Client docs with DI, async, and API changes
Comprehensively updated the documentation for the ReC.Client
library to improve usability and align with modern .NET
development practices. Key changes include:

- Added an introduction to the library, its purpose, and
  supported frameworks (.NET 8 and .NET Framework 4.6.2).
- Documented core features like DI support, typed APIs,
  consistent error handling, and flexible GET methods.
- Provided installation and setup instructions with examples
  in VB.NET and C#.
- Explained usage patterns for GET endpoints (typed and
  dynamic), CRUD operations, and invoking RecActions.
- Highlighted error handling via ReCApiException with examples.
- Added a section on testing with in-process API testing
  recommendations.
- Marked static APIs and synchronous helpers as [Obsolete],
  explaining limitations and providing migration tips.
- Provided migration guidance for recent API changes, such as
  `GetAsync<T>` returning deserialized values and unified
  error handling.
- Addressed FAQs about new patterns and deprecated methods.

These updates aim to modernize the library, promote best
practices, and simplify adoption for developers.
2026-05-20 14:04:05 +02:00