Skip to content

SAIF.NetCore.Clients.UC4 dependencies

This library has exactly one package dependency — the foundation-layer SAIF.NetCore.ServiceContracts — no direct third-party NuGet dependency, and it makes one outbound call of its own, to the external UC4 Core API, through the runtime-supplied IHttpJsonClient.

Internal dependencies

Dependency Reference Type Usage
SAIF.NetCore.ServiceContracts NuGet Package (same-repo) Supplies the IEnvironmentClient, IHttpJsonClient, and IHttpRequestResult interfaces that UC4Client is constructed with and that back its one outbound call.

External dependencies

This library declares no direct third-party PackageReference; its single PackageReference is the internal SAIF.NetCore.ServiceContracts package listed above.

API dependencies

Endpoint Method Called from Source library Reached via Usage
{ScheduleJobEndpoint}{jobname} — the route read from the uc4coreapi.schedulejobroute environment setting, concatenated directly with the job name (no separator inserted by this library), sent against the base URL configured via uc4coreapi.url and applied to the injected IHttpJsonClient through SetClientInfo POST UC4Client.ScheduleJob This library — Schedules a named UC4/Automic job by posting an empty JSON object ({}), with no job parameters, to the configured UC4 Core API route, via the injected IHttpJsonClient (implemented by SAIF.NetCore.HttpClients).

Dependency risks and notes

  • Both uc4coreapi.url and uc4coreapi.schedulejobroute are validated only for existence at construction, not for a non-empty value; an empty url fails later with UriFormatException on the first ScheduleJob call, and an empty route posts to the job name alone (BR-UC4-02).
  • The schedule-job URL is the configured route concatenated directly with jobname, with no separator or validation applied by this library; the route value must supply its own trailing separator (BR-UC4-03). Whether the injected IHttpJsonClient/RestSharp applies URL-encoding to jobname downstream is unknown**.
  • IsConfigured has a public setter; an external caller that sets it true before the first call skips Init and can cause ClientNotInitializedException from the underlying HttpJsonClient (BR-UC4-07).
  • Client identity (appname) is fixed from the first successful ScheduleJob call for the life of the UC4Client instance; subsequent calls with a different appname silently reuse the first value, which can mis-attribute scheduling requests on a shared (Singleton) instance (BR-UC4-06).
  • The schedule-job POST is retried automatically by HttpJsonClient on HTTP 401/502/503 (up to 3 retries, 1000 ms apart) — standard HttpJsonClient defaults, changeable by a host that calls SetOptions, though UC4 itself never calls SetOptions; whether a retry after the UC4 API already accepted the job can result in duplicate job submissions depends on whether the UC4 Core API's schedule endpoint is idempotent, which is unknown** (BR-UC4-08).
  • UC4 itself calls no authentication method (no NTLM, Basic, or bearer token) and does not clear the injected IHttpJsonClient's authenticator; only caller-asserted Client-User, Client-Name, and Application-ID headers are added by UC4 itself to identify the caller to the UC4 Core API. HttpJsonClient.CreateClient assigns client.Authenticator = _authenticator, preserving whatever authenticator the host configured on the injected client — this demonstrably can carry credentials if the host set one via SetNtlmAuthentication/SetBasicAuthentication/a bearer token. Whether the UC4 Core API enforces authorization server-side, and if so by Application-ID or by network location, is unknown**.
  • jobname is caller-controlled and concatenated unvalidated into the request URL (BR-UC4-03), which is a path-manipulation surface if a consumer passes untrusted input as jobname*.
  • The library ships no DI registration extension method; every consumer must register IUC4Client/UC4Client by hand, and no other library in this repository performs that registration on its behalf.

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.Clients.UC4/SAIF.NetCore.Clients.UC4/SAIF.NetCore.Clients.UC4/Services/UC4Client.cs
  • src/SAIF.NetCore.Clients.UC4/SAIF.NetCore.Clients.UC4/SAIF.NetCore.Clients.UC4/IUC4Client.cs
  • src/SAIF.NetCore.Clients.UC4/SAIF.NetCore.Clients.UC4/SAIF.NetCore.Clients.UC4/Constants.cs
  • src/SAIF.NetCore.Clients.UC4/SAIF.NetCore.Clients.UC4/SAIF.NetCore.Clients.UC4/SAIF.NetCore.Clients.UC4.csproj
  • src/SAIF.NetCore.HttpClients/SAIF.NetCore.HttpClients/SAIF.NetCore.HttpClients/HttpJsonClient/HttpJsonClient.cs — declares ExecuteAsync's retry behavior and CreateClient's client.Authenticator = _authenticator assignment referenced above.
  • src/SAIF.NetCore.ServiceContracts/SAIF.NetCore.ServiceContracts/SAIF.NetCore.ServiceContracts/HttpClientOptions.cs — declares the default RetryOnStatusCodes/RetryDelayInMs values.