C# 클래스 Kimono.KMacroExpanderBase

상속: Object, IDisposable
파일 보기 프로젝트 열기: 0xd34df00d/Qross

보호된 프로퍼티들

프로퍼티 타입 설명
interceptor Qyoto.SmokeInvocation

공개 메소드들

메소드 설명
Dispose ( ) : void
EscapeChar ( ) : QChar Obtain the macro escape character.
ExpandMacros ( StringBuilder str ) : void Perform safe macro expansion (substitution) on a string. name="str" the string in which macros are expanded in-place
ExpandMacrosShellQuote ( StringBuilder str ) : bool Same as above, but always starts at position 0, and unmatched closing parens and braces are treated as errors.
ExpandMacrosShellQuote ( StringBuilder str, int &pos ) : bool Perform safe macro expansion (substitution) on a string for use in shell commands.

NIX notes

Explicitly supported shell constructs: \ '' "" $'' $"" {} () $(()) ${} $() `` Implicitly supported shell constructs: (()) Unsupported shell constructs that will cause problems: Shortened "case $v in pat)" syntax. Use "case $v in (pat)" instead. The rest of the shell (incl. bash) syntax is simply ignored, as it is not expected to cause problems. Note that bash contains a bug which makes macro expansion within double quoted substitutions ("${VAR:-%macro}") inherently insecure. For security reasons, never put expandos in command line arguments that are shell commands by themselves - "sh -c 'foo \%f'" is taboo. "file=\%f sh -c 'foo "$file"'" is OK.

Windows notes

All quoting syntax supported by KShell is supported here as well. Additionally, command grouping via parentheses is recognized - note however, that the parser is much stricter about unquoted parentheses than cmd itself. The rest of the cmd syntax is simply ignored, as it is not expected to cause problems - do not use commands that embed other commands, though - "for /f ..." is taboo. name="str" the string in which macros are expanded in-place name="pos" the position inside the string at which parsing/substitution should start, and upon exit where processing stopped
KMacroExpanderBase ( ) : System
KMacroExpanderBase ( QChar c ) : System Constructor. name="c" escape char indicating start of macros, or QChar.Null for none
SetEscapeChar ( QChar c ) : void Set the macro escape character. name="c" escape char indicating start of macros, or QChar.Null if none

보호된 메소드들

메소드 설명
CreateProxy ( ) : void
KMacroExpanderBase ( Type dummy ) : System

비공개 메소드들

메소드 설명
ExpandEscapedMacro ( string str, int pos, List ret ) : int
ExpandPlainMacro ( string str, int pos, List ret ) : int

메소드 상세

CreateProxy() 보호된 메소드

protected CreateProxy ( ) : void
리턴 void

Dispose() 공개 메소드

public Dispose ( ) : void
리턴 void

EscapeChar() 공개 메소드

Obtain the macro escape character.
public EscapeChar ( ) : QChar
리턴 Qyoto.QChar

ExpandMacros() 공개 메소드

Perform safe macro expansion (substitution) on a string. name="str" the string in which macros are expanded in-place
public ExpandMacros ( StringBuilder str ) : void
str StringBuilder
리턴 void

ExpandMacrosShellQuote() 공개 메소드

Same as above, but always starts at position 0, and unmatched closing parens and braces are treated as errors.
public ExpandMacrosShellQuote ( StringBuilder str ) : bool
str StringBuilder
리턴 bool

ExpandMacrosShellQuote() 공개 메소드

Perform safe macro expansion (substitution) on a string for use in shell commands.

NIX notes

Explicitly supported shell constructs: \ '' "" $'' $"" {} () $(()) ${} $() `` Implicitly supported shell constructs: (()) Unsupported shell constructs that will cause problems: Shortened "case $v in pat)" syntax. Use "case $v in (pat)" instead. The rest of the shell (incl. bash) syntax is simply ignored, as it is not expected to cause problems. Note that bash contains a bug which makes macro expansion within double quoted substitutions ("${VAR:-%macro}") inherently insecure. For security reasons, never put expandos in command line arguments that are shell commands by themselves - "sh -c 'foo \%f'" is taboo. "file=\%f sh -c 'foo "$file"'" is OK.

Windows notes

All quoting syntax supported by KShell is supported here as well. Additionally, command grouping via parentheses is recognized - note however, that the parser is much stricter about unquoted parentheses than cmd itself. The rest of the cmd syntax is simply ignored, as it is not expected to cause problems - do not use commands that embed other commands, though - "for /f ..." is taboo. name="str" the string in which macros are expanded in-place name="pos" the position inside the string at which parsing/substitution should start, and upon exit where processing stopped
public ExpandMacrosShellQuote ( StringBuilder str, int &pos ) : bool
str StringBuilder
pos int
리턴 bool

KMacroExpanderBase() 공개 메소드

public KMacroExpanderBase ( ) : System
리턴 System

KMacroExpanderBase() 공개 메소드

Constructor. name="c" escape char indicating start of macros, or QChar.Null for none
public KMacroExpanderBase ( QChar c ) : System
c Qyoto.QChar
리턴 System

KMacroExpanderBase() 보호된 메소드

protected KMacroExpanderBase ( Type dummy ) : System
dummy System.Type
리턴 System

SetEscapeChar() 공개 메소드

Set the macro escape character. name="c" escape char indicating start of macros, or QChar.Null if none
public SetEscapeChar ( QChar c ) : void
c Qyoto.QChar
리턴 void

프로퍼티 상세

interceptor 보호되어 있는 프로퍼티

protected SmokeInvocation,Qyoto interceptor
리턴 Qyoto.SmokeInvocation