Table of Contents

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

int

ExitSuccess

The exit code for a successful run.

public const int ExitSuccess = 0

Field Value

int

ExitUsage

The exit code for a usage error.

public const int ExitUsage = 2

Field Value

int

Methods

Run(string[], TextWriter, TextWriter)

Runs the tool against the supplied arguments.

public static int Run(string[] args, TextWriter output, TextWriter error)

Parameters

args string[]

The command-line arguments.

output TextWriter

The writer receiving normal output.

error TextWriter

The writer receiving errors and usage help.

Returns

int

The process exit code.

Exceptions

ArgumentNullException

args, output, or error is null.

Applies to

ProductVersions
.NET8, 10