---
title: SAIF.NetCore.EnvironmentClient dependencies
summary: Internal and external dependencies for this library.
status: draft
owner: Framework.NCore maintainers
last_reviewed: 2026-10-02
library: SAIF.NetCore.EnvironmentClient
reference_type: package
---

# SAIF.NetCore.EnvironmentClient dependencies

`SAIF.NetCore.EnvironmentClient` depends on the foundation `SAIF.NetCore.ServiceContracts` package for the interfaces it implements and consumes, on several `Microsoft.Extensions.*`/`Newtonsoft.Json`/`System.DirectoryServices.AccountManagement` third-party packages, and it makes its own outbound HTTP calls to a remote Environment API through the injected `IHttpJsonClient` contract.

## Internal dependencies

| Dependency | Reference Type | Usage |
| --- | --- | --- |
| [SAIF.NetCore.ServiceContracts](../saif-netcore-servicecontracts/overview.md) | NuGet Package (same-repo) | Implements `IEnvironmentClient`; consumes `IHttpJsonClient`, `IHttpRequestResult`, `ISystemHashService`, and `SystemType`. |

## External dependencies

| Dependency | Version | Usage |
| --- | --- | --- |
| `Microsoft.Extensions.Configuration.Json` | 3.1.9 | Backs `IConfiguration` (`GetSection`, `GetValue<T>`, indexer) for the developer-settings override path. |
| `Microsoft.Extensions.Hosting.Abstractions` | 3.1.9 | Backs `IHostEnvironment` (`ApplicationName`, `ContentRootPath`). |
| `Newtonsoft.Json` | 13.0.1 | Deserializes the developer-settings override file (`JsonConvert.DeserializeObject<ConfigSetting[]>`). |
| `System.DirectoryServices.AccountManagement` | 4.7.0 | Active Directory group/host lookups in `HostResolver` (`PrincipalContext`, `ComputerPrincipal`, `GroupPrincipal`). |

## API dependencies

| Endpoint | Method | Called from | Source library | Reached via | Usage |
| --- | --- | --- | --- | --- | --- |
| `/v2/tracks/{ApplicationName}/value` | GET | `BaseEnvironmentClient.GetHostsByTrack` (via `Setup`) | This library | — | Resolves the set of hosts per environment track to determine the application's own track and host identity. |
| `/v2/settings/{ApplicationName}/{ApplicationHost}/value` or `/v2/settings/{ApplicationName}/{ApplicationHost}/{section}/value` | GET | `BaseEnvironmentClient.LoadSettings` / `LoadSettingsAsync` (via `GetSettingValue*`, `HasSetting`, `GetSectionSettings`, `CheckForUpdates`) | This library | — | Loads configuration settings, optionally scoped to a named section, into the in-memory settings cache. |
| `/settings/lastRefreshed` | GET | `BaseEnvironmentClient.TestForRefreshSettings` (via `CheckForUpdates`) | This library | — | Checks whether cached settings are stale (throttled to roughly 60 seconds) before triggering a reload. |
| `/v2/secureSetting/{ApplicationName}/{TrackName}[/{section}]/{configKey}/value?systemHashValue={hash}` | GET | `SecureEnvironmentClient.RetrieveSecureSetting<T>` / `RetrieveSecureSettingAsync<T>` (via `GetSecureSetting*`) | This library | — | Retrieves a secure (crypto) configuration value, authorized by a system-hash query parameter. |

All four endpoints are issued directly by `BaseEnvironmentClient`/`SecureEnvironmentClient` through the injected `IHttpJsonClient.Get`/`GetAsync` (ServiceContracts contract) against the base URL supplied by the `EnvironmentApiUrl` OS environment variable; the Environment API itself is an external HTTP service and is not part of this repository.

## Dependency risks and notes
- `IHttpJsonClient` and `ISystemHashService` are consumed only as ServiceContracts interfaces; the library does not reference `SAIF.NetCore.HttpClients` or `SAIF.NetCore.SystemHash`/`SAIF.NetCore.HashUtil` directly, so the concrete HTTP transport and hash computation are determined entirely by what the consuming application registers*.
- `TestForRefreshSettings` reads `GetResult<DateTime>` before checking `IsSuccessful`; whether this throws on a failed result depends on the registered `IHttpJsonClient` implementation**.
- Server-side Environment API semantics (hash validation, `lastRefreshed` meaning, response casing) are outside this repository and cannot be verified from source alone**.
- The developer-settings override path couples this library to ASP.NET Core via a transitively flowed `FrameworkReference Microsoft.AspNetCore.App` from `SAIF.NetCore.ServiceContracts`, even for non-web (console/Windows-service) hosts*.

## Related documentation
- [Index](index.md)
- [Overview](overview.md)
- [Architecture](architecture.md)
- [Configuration](configuration.md)
- [Operations and processes](operations-processes.md)
- [Business rules](business-rules.md)
- [Security and authorization](security-authorization.md)
- [API reference](api/index.md)

> **Note:** Statements marked with `*` were inferred from code structure, naming
> conventions, or contextual evidence where direct confirmation was not available
> in source artifacts. Statements marked with `**` could not be confirmed; treat
> as unknown until verified.

## Sources
- `src/SAIF.NetCore.EnvironmentClient/SAIF.NetCore.EnvironmentClient/SAIF.NetCore.EnvironmentClient/SAIF.NetCore.EnvironmentClient.csproj`
- `src/SAIF.NetCore.EnvironmentClient/SAIF.NetCore.EnvironmentClient/SAIF.NetCore.EnvironmentClient/BaseEnvironmentClient.cs`
- `src/SAIF.NetCore.EnvironmentClient/SAIF.NetCore.EnvironmentClient/SAIF.NetCore.EnvironmentClient/SecureEnvironmentClient.cs`
- `src/SAIF.NetCore.ServiceContracts/SAIF.NetCore.ServiceContracts/SAIF.NetCore.ServiceContracts/IEnvironmentClient.cs`, `ISystemHashService.cs`, `IHttpJsonClient.cs`, `IHttpRequestResult.cs`
