Register data clients¶
Register the Guidewire data-client configuration, HTTP clients, and cache infrastructure in the DI container.
| Field | Value |
|---|---|
| Operation ID | OP-SD-01 |
| Trigger | Host application calls AddDataClients during startup. |
| Inputs | SystemType, systemName, optional configure action |
| Outputs | Registered IDataClientConfiguration singleton, 7 API clients, cache infrastructure |
| Primary components | ContainerBuilderExtensions.AddDataClients |
| Entry point | Data/SAIF.Data/Configuration/ContainerBuilderExtensions.cs |
Steps¶
- Create a
DataClientConfigurationwith theSystemTypeandsystemName, then apply the optional configure action (SD-BR-001). - Delegates:
SAIF.Data.Guidewire/DataClientConfiguration. - Register
IDataClientConfigurationas a singleton. - Register the 7 API clients per their configured lifetime scope (delegates to the Guidewire client classes).
- Register the cache:
MemoryCacheProvider, and a PollyCacheAsyncpolicy keyed byCachePolicyKeywithMaxCacheDuration(SD-BR-002). - Register the Options and
MemoryCacheinfrastructure.
Process flow¶
The following diagram visualizes this operation's control flow.
flowchart TD
Start(["Host application calls `AddDataClients` during startup."]) --> S1["`ContainerBuilderExtensions.AddDataClients`"]
S1 --> S2{"Rules satisfied?"}
S2 -->|Yes| EndOk([Result returned])
S2 -->|No| EndErr([Exception / empty result])
Failure and edge-case behavior¶
- Missing configuration action: defaults are used from
DataClientConfiguration's constructor.
Related documentation¶
Sources¶
Data/SAIF.Data/Configuration/ContainerBuilderExtensions.cs