ProcessOB3PRetention arguments¶
The application accepts three optional named integer arguments that together define the processing date sent to the Imaging API. They are declared in ArgContainer and parsed by the framework's argument resolver.
Argument contract¶
| Argument | Type | Required | Default | Description |
|---|---|---|---|---|
Day |
int |
No | Current day of month | Day component of the processing date |
Month |
int |
No | Current month | Month component of the processing date |
Year |
int |
No | Current year | Year component of the processing date |
Defaults are captured from DateTime.Now when arguments are resolved, using the machine's local time. Each argument can be overridden independently, so supplying only Day combines it with the current month and year. See BR-OB3P-001.
Per-argument resolvers and validation¶
Each argument is configured in ArgContainer.BuildArgumentResolvers (ArgContainer.cs, lines 21-29) with argumentResolverBuilder.Setup(selector, parser).NotRequired(default). The parser is !string.IsNullOrEmpty(y) ? int.Parse(y) : default<Name>.
| Argument | Required or optional | Resolver and optional marker | Validation | Failure message |
|---|---|---|---|---|
Day |
Optional | Setup(x => x.Day, parser) with .NotRequired(defaultDay) (ArgContainer.cs:26) |
Parseable as Int32 only; no 1-31 range check* |
DAY '<value>' is not a valid Int32.† |
Month |
Optional | Setup(x => x.Month, parser) with .NotRequired(defaultMonth) (ArgContainer.cs:27) |
Parseable as Int32 only; no 1-12 range check* |
MONTH '<value>' is not a valid Int32.† |
Year |
Optional | Setup(x => x.Year, parser) with .NotRequired(defaultYear) (ArgContainer.cs:28) |
Parseable as Int32 only; no range check* |
YEAR '<value>' is not a valid Int32.† |
When any resolver fails, ResolveArguments collects the messages, writes Invalid arguments list (n total): followed by the messages to stderr, sets exit code 1, calls Console.ReadLine(), and returns without running the application.† Whether Console.ReadLine() blocks an unattended run is not confirmed.**
Syntax forms¶
The framework accepts these forms:†
| Form | Example |
|---|---|
-Name value |
-Month 3 |
--Name value |
--Month 3 |
/Name value |
/Month 3 |
Name:value |
Month:3 |
Name=value |
Month=3 |
-Name:value |
-Month:3 |
/Name=value |
/Month=3 |
Validation¶
- Each value is parsed with
int.Parse; a non-numeric value fails resolution with a message such asDAY 'x' is not a valid Int32.(likewise forMONTHandYEAR). - A bare flag with no value binds the text
true, which is rejected by the same check. - No range validation is applied: values such as month 13 or day 0 are accepted by the console application and passed to the Imaging API unchanged.* See Tech debt.
- On success the framework echoes each resolved value, for example
* Resolved argument - DAY: 31.†
Exit behavior¶
A validation failure writes Invalid arguments list (n total): and the messages to stderr and ends the run with exit code 1 before any service is contacted. See Run lifecycle.
Examples¶
ProcessOB3PRetention.exe
ProcessOB3PRetention.exe -Year 2026 -Month 3 -Day 31
ProcessOB3PRetention.exe Month=3 Year=2026
Related documentation¶
| Documentation | Description |
|---|---|
| Index | Documentation entry point |
| Overview | Purpose and capabilities |
| Architecture | Components and composition root |
| Run lifecycle | Execution flow and exit codes |
| Configuration | Settings and environment variables |
| Dependencies | Packages and API dependencies |
| Operations and processes | Operation catalog |
| Business rules | Rules enforced during processing |
| Operational runbook | Run and recovery procedures |
| Tech debt | Technical debt observations |
Note: Statements marked with
†are derived from dependency library documentation via the Legends CLI. Statements marked with*were inferred from code structure or contextual evidence. Statements marked with**could not be confirmed; treat as unknown until verified.
Sources¶
ProcessOB3PRetention/ArgContainer.csProcessOB3PRetention/Program.csProcessOB3PRetention/ThirdPartyRetentionProcessor.cs