SAIF.Web.API.Core operations and processes¶
This library defines almost no multi-step operations: it is primarily a set of inert data-transfer objects (ApiResponse<T>, ErrorResponse) and exception types with single-assignment constructors, none of which constitute a business operation in their own right. Two pieces of logic in the codebase do have enough control flow to document as operations, and both are catalogued below with their own detail pages under operations/.
Operation catalog¶
| Operation | Intent | Trigger | Inputs | Outputs | Rules | Tables | SQL |
|---|---|---|---|---|---|---|---|
| Get build info | Read an optional build/version metadata file from a directory and return its contents as key/value pairs, tolerating the file's absence. | Called by a consumer (no in-repo caller found)* | appDirectory, optional buildInfoFilePattern |
IEnumerable<KeyValuePair<string,string>> |
— | — | — |
| Construct InvalidDataException from validation failures | Build an InvalidDataException whose message and ValidationErrors list are derived from a set of validation failures. |
InvalidDataException(IEnumerable<ValidationFailure> failures) constructor invoked by a consumer |
IEnumerable<ValidationFailure> failures |
Constructed InvalidDataException |
BR-CORE-001 | — | — |
Process flow diagram¶
The following diagrams visualize the two documented operations. They are independent entry points with no shared control flow, so each is shown as its own diagram.
The BuildInfo.GetBuildInfo flow:
flowchart TD
Start1(["BuildInfo.GetBuildInfo<br>called"]) --> Search["Search appDirectory for<br>buildInfoFilePattern"]
Search --> Found{File found?}
Found -->|No| Seeded(["Return<br>Assembly/Directory pairs<br>only"])
Found -->|Yes| Parse["Parse each line with<br>key: value regex"]
Parse --> Combined(["Return seeded + parsed<br>pairs"])
The InvalidDataException construction flow:
flowchart TD
Start2(["InvalidDataException<br>constructed with<br>failures"]) --> Project["Project failures to<br>ErrorMessage strings"]
Project --> Join["Join messages with<br>ToStringAll semicolon"]
Join --> Assign["Assign joined message<br>and ValidationErrors<br>list"]
Assign --> Done([Exception ready to throw])
Failure and edge-case behavior¶
BuildInfo.GetBuildInfo: if no file matchesbuildInfoFilePatterninappDirectory, the method does not throw — it silently returns only the seededAssembly/Directoryentries. Lines in a found file that do not match the(?<key>\w+): (?<value>.*)regex are silently skipped, with no error or logging.InvalidDataException(IEnumerable<ValidationFailure>): the join implementation (SAIF.Common.Extensions.ToStringAll) was not traced beyond its call site, since it is defined in the internal-organizationSAIF.Framework.CommonNuGet package*.
Related documentation¶
Note: Statements marked with
*were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts.
Sources¶
src/SAIF.Web.API.Core/BuildInfo.cssrc/SAIF.Web.API.Core/SAIFException.cs