C# 클래스 SimpleHelpers.ConsoleUtils

파일 보기 프로젝트 열기: khalidsalomao/SimpleHelpers.Net

공개 프로퍼티들

프로퍼티 타입 설명
cultureBR System.Globalization.CultureInfo
cultureUS System.Globalization.CultureInfo

공개 메소드들

메소드 설명
CloseApplication ( int exitCode, bool exitApplication ) : void

Execute some housekeeping and closes the application.

DisplayHeader ( ) : void
DisplaySeparator ( ) : void
GetUserInput ( string message ) : string
GetUserInputAsBool ( string message ) : bool
GetUserInputAsDouble ( string message ) : double
GetUserInputAsInt ( string message ) : int
GetUserInputAsList ( string message ) : IEnumerable
GetUserInputKey ( string message = null ) : char
Initialize ( string args, bool thrownOnError, InitializationOptions options = null ) : FlexibleOptions

Parses command line and app.config arguments and initilialize log.

ReadFileAllLines ( string filename ) : string[]
ReadFileAllText ( string filename ) : string
WaitForAnyKey ( ) : void
WaitForAnyKey ( string message ) : void

비공개 메소드들

메소드 설명
CheckCommandLineParams ( string args, bool thrownOnError ) : FlexibleOptions

Checks the command line params. arguments format: key=value or --key value

DefaultProgramInitialization ( ) : void
GetLogger ( ) : Logger
GetNLogTargetName ( NLog target ) : IEnumerable
InitializeLog ( InitializationOptions options ) : void

Initializes log with initialization options.

InitializeLog ( string logFileName = null, string logLevel = null, InitializationOptions initOptions = null, FlexibleOptions appOptions = null ) : void

Log initialization.

LoadExtenalConfigurationFile ( string filePath, bool thrownOnError ) : FlexibleOptions
LoadFileSystemConfigurationFile ( string filePath, bool thrownOnError ) : FlexibleOptions
LoadWebConfigurationFile ( string filePath, bool thrownOnError ) : FlexibleOptions
ParseCommandLineArguments ( string args ) : FlexibleOptions
parseFile ( string content ) : FlexibleOptions
show_help ( string message, bool isError = false ) : void

메소드 상세

CloseApplication() 공개 정적인 메소드

Execute some housekeeping and closes the application.
public static CloseApplication ( int exitCode, bool exitApplication ) : void
exitCode int The exit code.
exitApplication bool
리턴 void

DisplayHeader() 공개 정적인 메소드

public static DisplayHeader ( ) : void
리턴 void

DisplaySeparator() 공개 정적인 메소드

public static DisplaySeparator ( ) : void
리턴 void

GetUserInput() 공개 정적인 메소드

public static GetUserInput ( string message ) : string
message string
리턴 string

GetUserInputAsBool() 공개 정적인 메소드

public static GetUserInputAsBool ( string message ) : bool
message string
리턴 bool

GetUserInputAsDouble() 공개 정적인 메소드

public static GetUserInputAsDouble ( string message ) : double
message string
리턴 double

GetUserInputAsInt() 공개 정적인 메소드

public static GetUserInputAsInt ( string message ) : int
message string
리턴 int

GetUserInputAsList() 공개 정적인 메소드

public static GetUserInputAsList ( string message ) : IEnumerable
message string
리턴 IEnumerable

GetUserInputKey() 공개 정적인 메소드

public static GetUserInputKey ( string message = null ) : char
message string
리턴 char

Initialize() 공개 정적인 메소드

Parses command line and app.config arguments and initilialize log.
public static Initialize ( string args, bool thrownOnError, InitializationOptions options = null ) : FlexibleOptions
args string Program arguments
thrownOnError bool The thrown exception on internal initialization error.
options InitializationOptions The additional options.
리턴 FlexibleOptions

ReadFileAllLines() 공개 정적인 메소드

public static ReadFileAllLines ( string filename ) : string[]
filename string
리턴 string[]

ReadFileAllText() 공개 정적인 메소드

public static ReadFileAllText ( string filename ) : string
filename string
리턴 string

WaitForAnyKey() 공개 정적인 메소드

public static WaitForAnyKey ( ) : void
리턴 void

WaitForAnyKey() 공개 정적인 메소드

public static WaitForAnyKey ( string message ) : void
message string
리턴 void

프로퍼티 상세

cultureBR 공개적으로 정적으로 프로퍼티

public static CultureInfo,System.Globalization cultureBR
리턴 System.Globalization.CultureInfo

cultureUS 공개적으로 정적으로 프로퍼티

public static CultureInfo,System.Globalization cultureUS
리턴 System.Globalization.CultureInfo