Table of Contents

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

services IServiceCollection

The service collection to register with.

configure Action<HonuaSdkOptions>

Configuration delegate for the umbrella options.

Returns

IServiceCollection

The service collection for chaining.

Exceptions

ArgumentNullException

Thrown when services or configure is null.

HonuaConfigurationException

Thrown when every Use* flag is false: the umbrella has no modules to register and the caller almost certainly meant to enable at least one.