Class CmdApp
Provides core command-line application functionality including file operations, logging setup and unhandled exception handling
public class CmdApp
- Inheritance
-
CmdApp
- Inherited Members
- Extension Methods
Properties
OpenAndWaitForChangeContentOfInputFile
Gets or sets whether to open and wait for content change of an input file
public static bool OpenAndWaitForChangeContentOfInputFile { get; set; }
Property Value
ShouldLoadFromClipboard
Gets or sets whether input should be loaded from clipboard instead of console
public static bool ShouldLoadFromClipboard { get; }
Property Value
ShouldWaitOnEnd
Gets or sets whether to wait for user input before application ends.
public static bool ShouldWaitOnEnd { get; set; }
Property Value
Methods
Init()
Initializes the command-line application environment
public static void Init()
SetLogger()
Initializes the logger. Alternatives: InitApp.SetDebugLogger, WpfApp.SetLogger.
public static void SetLogger()
WaitForSaving(ILogger, string, Action<ILogger, string, bool, int?>)
Waits for the user to save a file, optionally opening it in VS Code first.
public static Task<string> WaitForSaving(ILogger logger, string path, Action<ILogger, string, bool, int?> openVsCode)
Parameters
loggerILoggerLogger instance for diagnostic output
pathstringPath to the file to wait for
openVsCodeAction<ILogger, string, bool, int?>Action to open the file in VS Code for editing
Returns
WaitOnEnd()
Waits for user input before ending the application in debug mode
public static void WaitOnEnd()