C# Class PEBakery.Core.StringEscaper

Afficher le fichier Open project: pebakery/pebakery Class Usage Examples

Méthodes publiques

Méthode Description
DoubleQuote ( string str ) : string
Escape ( IEnumerable strs, bool fullEscape = false, bool escapePercent = false ) : List
Escape ( string str, bool fullEscape = false, bool escapePercent = false ) : string
EscapePercent ( IEnumerable strs ) : List
EscapePercent ( string str ) : string
ExpandSectionParams ( PEBakery.Core.EngineState s, IEnumerable strs ) : List
ExpandSectionParams ( PEBakery.Core.EngineState s, string str ) : string

Expand #1, #2, #3, etc...

ExpandVariables ( PEBakery.Core.EngineState s, IEnumerable strs ) : List
ExpandVariables ( PEBakery.Core.Variables vars, IEnumerable strs ) : List
ExpandVariables ( PEBakery.Core.EngineState s, string str ) : string

Expand #n and %Var% variables.

ExpandVariables ( PEBakery.Core.Variables vars, string str ) : string
GetUniqueFileName ( string srcKey, IEnumerable keys ) : string
GetUniqueKey ( string srcKey, IEnumerable keys, int startIdx = 1 ) : string
IsFileFilterValid ( string filter ) : bool

Check if given filter is a valid Microsoft.Win32.OpenFileDialog.Filter format.

IsFileNameValid ( string path, IEnumerable more = null ) : bool
IsPathValid ( string path, IEnumerable more = null ) : bool
IsUrlValid ( string url ) : bool

Check if given url is valid http or https url.

PackRegBinary ( Array bin, bool escape = false ) : string
PackRegMultiBinary ( IEnumerable multiStrs ) : string
PackRegMultiString ( IEnumerable multiStrs ) : string
PathSecurityCheck ( string path, string &errorMsg ) : bool

Check if a path is safe to write. Allows wildcard.

Preprocess ( PEBakery.Core.EngineState s, IEnumerable strs, bool escapePercent = true ) : List
Preprocess ( PEBakery.Core.Variables vars, IEnumerable strs, bool escapePercent = true ) : List
Preprocess ( PEBakery.Core.EngineState s, string str, bool escapePercent = true ) : string
Preprocess ( PEBakery.Core.Variables vars, string str, bool escapePercent = true ) : string
ProcessVersionString ( string str ) : string
QuoteEscape ( IEnumerable strs, bool fullEscape = false, bool escapePercent = false ) : List
QuoteEscape ( string str, bool fullEscape = false, bool escapePercent = false ) : string
QuoteUnescape ( IEnumerable strs, bool escapePercent = false ) : List
QuoteUnescape ( string str, bool escapePercent = false ) : string
Unescape ( IEnumerable strs, bool escapePercent = false ) : List
Unescape ( string str, bool escapePercent = false ) : string
UnescapePercent ( IEnumerable strs ) : List
UnescapePercent ( string str ) : string
UnpackRegBinary ( Array packStrs, Array &bin ) : bool
UnpackRegBinary ( string packStr, Array &bin ) : bool
UnpackRegMultiString ( string packStr ) : List

Private Methods

Méthode Description
PackListStr ( IList list, string separator ) : string
UnpackListStr ( string listStr, string separator ) : List

Method Details

DoubleQuote() public static méthode

public static DoubleQuote ( string str ) : string
str string
Résultat string

Escape() public static méthode

public static Escape ( IEnumerable strs, bool fullEscape = false, bool escapePercent = false ) : List
strs IEnumerable
fullEscape bool
escapePercent bool
Résultat List

Escape() public static méthode

public static Escape ( string str, bool fullEscape = false, bool escapePercent = false ) : string
str string
fullEscape bool
escapePercent bool
Résultat string

EscapePercent() public static méthode

public static EscapePercent ( IEnumerable strs ) : List
strs IEnumerable
Résultat List

EscapePercent() public static méthode

public static EscapePercent ( string str ) : string
str string
Résultat string

ExpandSectionParams() public static méthode

public static ExpandSectionParams ( PEBakery.Core.EngineState s, IEnumerable strs ) : List
s PEBakery.Core.EngineState
strs IEnumerable
Résultat List

ExpandSectionParams() public static méthode

Expand #1, #2, #3, etc...
public static ExpandSectionParams ( PEBakery.Core.EngineState s, string str ) : string
s PEBakery.Core.EngineState
str string
Résultat string

ExpandVariables() public static méthode

public static ExpandVariables ( PEBakery.Core.EngineState s, IEnumerable strs ) : List
s PEBakery.Core.EngineState
strs IEnumerable
Résultat List

ExpandVariables() public static méthode

public static ExpandVariables ( PEBakery.Core.Variables vars, IEnumerable strs ) : List
vars PEBakery.Core.Variables
strs IEnumerable
Résultat List

ExpandVariables() public static méthode

Expand #n and %Var% variables.
public static ExpandVariables ( PEBakery.Core.EngineState s, string str ) : string
s PEBakery.Core.EngineState
str string
Résultat string

ExpandVariables() public static méthode

public static ExpandVariables ( PEBakery.Core.Variables vars, string str ) : string
vars PEBakery.Core.Variables
str string
Résultat string

GetUniqueFileName() public static méthode

public static GetUniqueFileName ( string srcKey, IEnumerable keys ) : string
srcKey string
keys IEnumerable
Résultat string

GetUniqueKey() public static méthode

public static GetUniqueKey ( string srcKey, IEnumerable keys, int startIdx = 1 ) : string
srcKey string
keys IEnumerable
startIdx int
Résultat string

IsFileFilterValid() public static méthode

Check if given filter is a valid Microsoft.Win32.OpenFileDialog.Filter format.
public static IsFileFilterValid ( string filter ) : bool
filter string File filter string to test
Résultat bool

IsFileNameValid() public static méthode

public static IsFileNameValid ( string path, IEnumerable more = null ) : bool
path string
more IEnumerable
Résultat bool

IsPathValid() public static méthode

public static IsPathValid ( string path, IEnumerable more = null ) : bool
path string
more IEnumerable
Résultat bool

IsUrlValid() public static méthode

Check if given url is valid http or https url.
public static IsUrlValid ( string url ) : bool
url string
Résultat bool

PackRegBinary() public static méthode

public static PackRegBinary ( Array bin, bool escape = false ) : string
bin Array
escape bool
Résultat string

PackRegMultiBinary() public static méthode

public static PackRegMultiBinary ( IEnumerable multiStrs ) : string
multiStrs IEnumerable
Résultat string

PackRegMultiString() public static méthode

public static PackRegMultiString ( IEnumerable multiStrs ) : string
multiStrs IEnumerable
Résultat string

PathSecurityCheck() public static méthode

Check if a path is safe to write. Allows wildcard.
public static PathSecurityCheck ( string path, string &errorMsg ) : bool
path string
errorMsg string
Résultat bool

Preprocess() public static méthode

public static Preprocess ( PEBakery.Core.EngineState s, IEnumerable strs, bool escapePercent = true ) : List
s PEBakery.Core.EngineState
strs IEnumerable
escapePercent bool
Résultat List

Preprocess() public static méthode

public static Preprocess ( PEBakery.Core.Variables vars, IEnumerable strs, bool escapePercent = true ) : List
vars PEBakery.Core.Variables
strs IEnumerable
escapePercent bool
Résultat List

Preprocess() public static méthode

public static Preprocess ( PEBakery.Core.EngineState s, string str, bool escapePercent = true ) : string
s PEBakery.Core.EngineState
str string
escapePercent bool
Résultat string

Preprocess() public static méthode

public static Preprocess ( PEBakery.Core.Variables vars, string str, bool escapePercent = true ) : string
vars PEBakery.Core.Variables
str string
escapePercent bool
Résultat string

ProcessVersionString() public static méthode

public static ProcessVersionString ( string str ) : string
str string
Résultat string

QuoteEscape() public static méthode

public static QuoteEscape ( IEnumerable strs, bool fullEscape = false, bool escapePercent = false ) : List
strs IEnumerable
fullEscape bool
escapePercent bool
Résultat List

QuoteEscape() public static méthode

public static QuoteEscape ( string str, bool fullEscape = false, bool escapePercent = false ) : string
str string
fullEscape bool
escapePercent bool
Résultat string

QuoteUnescape() public static méthode

public static QuoteUnescape ( IEnumerable strs, bool escapePercent = false ) : List
strs IEnumerable
escapePercent bool
Résultat List

QuoteUnescape() public static méthode

public static QuoteUnescape ( string str, bool escapePercent = false ) : string
str string
escapePercent bool
Résultat string

Unescape() public static méthode

public static Unescape ( IEnumerable strs, bool escapePercent = false ) : List
strs IEnumerable
escapePercent bool
Résultat List

Unescape() public static méthode

public static Unescape ( string str, bool escapePercent = false ) : string
str string
escapePercent bool
Résultat string

UnescapePercent() public static méthode

public static UnescapePercent ( IEnumerable strs ) : List
strs IEnumerable
Résultat List

UnescapePercent() public static méthode

public static UnescapePercent ( string str ) : string
str string
Résultat string

UnpackRegBinary() public static méthode

public static UnpackRegBinary ( Array packStrs, Array &bin ) : bool
packStrs Array
bin Array
Résultat bool

UnpackRegBinary() public static méthode

public static UnpackRegBinary ( string packStr, Array &bin ) : bool
packStr string
bin Array
Résultat bool

UnpackRegMultiString() public static méthode

public static UnpackRegMultiString ( string packStr ) : List
packStr string
Résultat List