Table of Contents

Class CmdApp

Namespace
SunamoCl.SunamoCmd.Essential
Assembly
SunamoCl.dll

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

bool

ShouldLoadFromClipboard

Gets or sets whether input should be loaded from clipboard instead of console

public static bool ShouldLoadFromClipboard { get; }

Property Value

bool

ShouldWaitOnEnd

Gets or sets whether to wait for user input before application ends.

public static bool ShouldWaitOnEnd { get; set; }

Property Value

bool

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

logger ILogger

Logger instance for diagnostic output

path string

Path to the file to wait for

openVsCode Action<ILogger, string, bool, int?>

Action to open the file in VS Code for editing

Returns

Task<string>

Content of the file after saving

WaitOnEnd()

Waits for user input before ending the application in debug mode

public static void WaitOnEnd()