Show / Hide Table of Contents

Class ConsoleUtil

Utility class for handling console input and output. Provides methods for printing translated messages and retrieving user input.

Inheritance
object
ConsoleUtil
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: EasySave_Project.Util
Assembly: .dll
Syntax
public static class ConsoleUtil

Methods

| Edit this page View Source

GetInputInt()

Reads a valid integer input from the console. Ensures that the user enters a numeric value before returning it.

Declaration
public static int GetInputInt()
Returns
Type Description
int

A valid integer input from the user.

| Edit this page View Source

GetInputJobSaveTypeEnum()

Displays a list of job save types and retrieves the user's choice. Ensures valid input before returning the selected enum value.

Declaration
public static JobSaveTypeEnum GetInputJobSaveTypeEnum()
Returns
Type Description
JobSaveTypeEnum

The selected JobSaveTypeEnum value.

| Edit this page View Source

GetInputString()

Reads a valid non-empty string input from the console. Repeats the prompt if the input is empty or invalid.

Declaration
public static string GetInputString()
Returns
Type Description
string

A valid non-empty string.

| Edit this page View Source

PrintTextconsole(string)

Prints a translated message to the console. If no translation is available, it prints the original text.

Declaration
public static void PrintTextconsole(string textKey)
Parameters
Type Name Description
string textKey

The translation key to fetch the translated message.

  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX