CalendarTool Class
Definition
- Namespace
- Bodu.Globalization.Calendar.Tool
- Assembly
- Bodu.Globalization.Calendar.Tool.dll
- Package
- Bodu.Globalization.Calendar.Tool 0.7.1 (not published on nuget.org)
- Source
- CalendarTool.cs
Implements the bodu-calendar command surface - lint, compile, and info - as an
in-process entry point the console host and the tests share.
public static class CalendarTool
- Inheritance
-
CalendarTool
- Inherited Members
Remarks
Exit codes: 0 success, 1 validation or input failure, 2 usage error. Diagnostics print one per
line as [Severity] CODE: message, so build logs and editors can match on the stable BODU-CAL-* codes.
Fields
ExitFailure
The exit code for a validation or input failure.
public const int ExitFailure = 1
Field Value
ExitSuccess
The exit code for a successful run.
public const int ExitSuccess = 0
Field Value
ExitUsage
The exit code for a usage error.
public const int ExitUsage = 2
Field Value
Methods
Run(string[], TextWriter, TextWriter)
Runs the tool against the supplied arguments.
public static int Run(string[] args, TextWriter output, TextWriter error)
Parameters
argsstring[]The command-line arguments.
outputTextWriterThe writer receiving normal output.
errorTextWriterThe writer receiving errors and usage help.
Returns
- int
The process exit code.
Exceptions
- ArgumentNullException
args,output, orerroris null.
Applies to
| Product | Versions |
|---|---|
| .NET | 8, 10 |