Refactor static IServiceProvider initialization

Refactor static IServiceProvider initialization to use a thread-safe Lazy<IServiceProvider>, ensuring lazy creation and improved efficiency. Replace `Services` and `Provider` fields with `_staticConfigure` delegate for dynamic service collection configuration.

Update `BuildStaticClient` methods to use `Interlocked.CompareExchange` for safe initialization of `_staticConfigure`. Modify `Create` method to retrieve the provider via `LazyProvider`.

Mark `BuildStaticClient` and `Create` methods as obsolete, encouraging the use of local service collections. Adjust exception messages and documentation to reflect these changes.
This commit is contained in:
2026-05-20 16:43:47 +02:00
parent 46eccf7a9b
commit 09c0a5f3cf
2 changed files with 20 additions and 17 deletions

0
docs/ReC.Client.xwiki.md Normal file
View File