Class ServiceCollectionExtensions
- Namespace
- Honua.Sdk
- Assembly
- Honua.Sdk.dll
Umbrella extension methods that register every Honua SDK client enabled by
a single HonuaSdkOptions snapshot. The per-package
AddHonua* extensions remain available and unchanged for callers who
want explicit, narrow control.
public static class ServiceCollectionExtensions
- Inheritance
-
ServiceCollectionExtensions
- Inherited Members
Methods
AddHonua(IServiceCollection, Action<HonuaSdkOptions>)
Registers every Honua SDK client enabled on the supplied
HonuaSdkOptions snapshot. The configuration delegate is
invoked exactly once to capture the snapshot; the snapshot's shared
values (base address, authentication, retry / timeout, primary HTTP
handler) are forwarded into each enabled sub-package's own
AddHonua* extension. Per-package extensions remain available
and unchanged for callers who want explicit, narrow control.
public static IServiceCollection AddHonua(this IServiceCollection services, Action<HonuaSdkOptions> configure)
Parameters
servicesIServiceCollectionThe service collection to register with.
configureAction<HonuaSdkOptions>Configuration delegate for the umbrella options.
Returns
- IServiceCollection
The service collection for chaining.
Exceptions
- ArgumentNullException
Thrown when
servicesorconfigureisnull.- HonuaConfigurationException
Thrown when every
Use*flag isfalse: the umbrella has no modules to register and the caller almost certainly meant to enable at least one.