InputHandler 2.0.0
dotnet add package InputHandler --version 2.0.0
NuGet\Install-Package InputHandler -Version 2.0.0
<PackageReference Include="InputHandler" Version="2.0.0" />
paket add InputHandler --version 2.0.0
#r "nuget: InputHandler, 2.0.0"
// Install InputHandler as a Cake Addin #addin nuget:?package=InputHandler&version=2.0.0 // Install InputHandler as a Cake Tool #tool nuget:?package=InputHandler&version=2.0.0
InputHandler
A small library for handling user input in console apps
All methods are contained in a static class Input within the InputHandler namespace, and include XML documentation.
The UnitTests project contains unit tests for every method. <br><br><br><br><br> How to decide which method to use:
Want the user to pick from a set of options?
Want the user to input yes/no? ⇒ GetYN (includes overload to specify your own options for yes/no)
Want the user to input specifically y/n? ⇒ GetYNStrict
Want the user to choose from a collection of options? ⇒ GetOption (includes generic overload if you want to convert it off of string after, and one if you want them to choose from string keys in a Dictionary, and another if you want to choose from names in an Enum)
Want the user to enter one input...
that doesn't error? ⇒ Get
that passes a check? ⇒ GetCheck
that passes a check without throwing an exception? ⇒ GetCheck<T>
and convert it into a bool? ⇒ GetBool
Want the user to enter a block of text ending in...
the first line of whitespace? ⇒ GetUntilWhiteSpace
the first null or empty line? ⇒ GetUntilEmpty
the first line that passes a specified check? ⇒ GetUntil
Want the user to enter a series of inputs ending in...
a line of whitespace? ListUntilWhiteSpace, YieldUntilWhiteSpace
a null or empty line? ListUntilEmpty, YieldUntilEmpty
a line that passes a specified check? ListUntil, YieldUntil
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net6.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
v2.0.0.0: overhauled everything