System Commandline Options And Arguments

Use when declaring or configuring System.CommandLine inputs — Option<T> and Argument<T>: names vs aliases, Description, Required, DefaultValueFactory, Arity, restricting a value to a fixed set with AcceptOnlyFromAmong, requiring that a file or directory path already exists, rejecting bad or out-of-range input, and checking one option against another. This is where CustomParser, Validators.Add and result.AddError belong. Covers the constructor-alias gotcha in depth.

richlander Updated 161 repo stars

File contents

richlander/dotnet-package-skills commit e90381161d

Frequently asked questions

npx get-skill add richlander/system-commandline-options-and-arguments-2