-
Notifications
You must be signed in to change notification settings - Fork 13
Metadata and startup message
Adam Bajguz edited this page Apr 5, 2021
·
2 revisions
CliApplicationBuilder
provides methods to sets some application metadata:
-
UseTitle(string title)
- sets application title, which appears in the help text (default from entry assembly). -
UseExecutableName(string executableName)
- sets application executable name, which appears in the help text (default from entry assembly). -
UseVersionText(string versionText)
- sets application version text, which appears in the help text and when the user requests version information (default from entry assembly). -
UseDescription(string description)
- sets application description, which appears in the help text (default: null).
All above metadata can be access with DI-injectable singleton ApplicationMetadata
.
By default, there is no startup message defined in Typin, but user can specify it in CliApplicationBuilder
using:
UseStartupMessage(string message, ConsoleColor messageColor = ConsoleColor.DarkYellow)
UseStartupMessage(Func<ApplicationMetadata, string> message, ConsoleColor messageColor = ConsoleColor.DarkYellow)
UseStartupMessage(Action<ApplicationMetadata, IConsole> message)
Different method overloads provide different levels of flexibility.
Getting started
Advanced features
- Reporting errors
- Exception handling
- Metadata and startup message
- Graceful cancellation
- Dependency injection
- Middleware pipeline
- Environment variables
Utilities
Tests
Misc