WriterUI 1.0.1
See the version list below for details.
dotnet add package WriterUI --version 1.0.1
NuGet\Install-Package WriterUI -Version 1.0.1
<PackageReference Include="WriterUI" Version="1.0.1" />
<PackageVersion Include="WriterUI" Version="1.0.1" />
<PackageReference Include="WriterUI" />
paket add WriterUI --version 1.0.1
#r "nuget: WriterUI, 1.0.1"
#:package WriterUI@1.0.1
#addin nuget:?package=WriterUI&version=1.0.1
#tool nuget:?package=WriterUI&version=1.0.1
WriterUI - Console UI Helper
Welcome to WriterUI, your go-to library for simplifying console-based user interactions and message formatting.
Description
WriterUI provides a set of convenient methods for interacting with the console, allowing you to display formatted messages, capture user input, and customize the console output to match your application's style.
Features
1. Formatted Messages
Easily display formatted messages on the console with customizable colors.
Writer.Message("Welcome to the writer console UI helper!");
Writer.Error("Oops! Something went wrong.");
Writer.Warn("Warning: Proceed with caution.");
2. Input Capture
Capture user input from the console, ensuring seamless integration into your application flow.
int intInput = Writer.Input<int>("Please enter an integer:");
bool boolInput = Writer.Input<bool>("Enter 'true' or 'false':");
string strInput = Writer.Input("Enter a string:");
3. Customisation
Customise message colors and prompts to match your application's style.
Writer.Message("This message is in magenta color!", ConsoleColor.Magenta);
string customColorInput = Writer.Input("Enter a string:", ConsoleColor.DarkCyan);
4. Type Safety
Ensure type safety when capturing user input, preventing invalid inputs and runtime errors.
// No compilation for impossible tasks!
HttpClient badInput = Writer.Input<HttpClient>("Invalid input!");
Usage
Installation:
Add the WriterUI library to your project through NuGet Package Manager or by downloading and referencing the assembly.
Usage:
Import the WriterUI namespace into your code file. Use the provided methods (Message, Error, Warn, Input) to interact with the console.
using WriterUI;
Writer.Message("Welcome to my application!");
int age = Writer.Input<int>("Please enter your age:");
Customisation:
Experiment with different message colors and input prompts to enhance user experience.
Writer.Message("This is a custom message.", ConsoleColor.Green);
string userInput = Writer.Input("Enter a value:", ConsoleColor.Yellow);
Considerations
- Error Handling: Writer will continue asking for input until a value can be converted when using Input<T>() but you might still need your own in some cases.
- Input Validation: Always validate user input to prevent unexpected behavior or security vulnerabilities.
- Thread Safety: Use synchronization mechanisms if accessing WriterUI methods concurrently from multiple threads.
Contributions
Contributions to the WriterUI library are welcome! If you encounter any issues or have suggestions for improvements, please feel free to open an issue or submit a pull request on GitHub.
License
This library is licensed under the MIT License. See the LICENSE file for details.
| 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. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.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.