C# Класс PEBakery.Core.StringEscaper

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
PackListStr ( IList list, string separator ) : string
UnpackListStr ( string listStr, string separator ) : List

Описание методов

DoubleQuote() публичный статический Метод

public static DoubleQuote ( string str ) : string
str string
Результат string

Escape() публичный статический Метод

public static Escape ( IEnumerable strs, bool fullEscape = false, bool escapePercent = false ) : List
strs IEnumerable
fullEscape bool
escapePercent bool
Результат List

Escape() публичный статический Метод

public static Escape ( string str, bool fullEscape = false, bool escapePercent = false ) : string
str string
fullEscape bool
escapePercent bool
Результат string

EscapePercent() публичный статический Метод

public static EscapePercent ( IEnumerable strs ) : List
strs IEnumerable
Результат List

EscapePercent() публичный статический Метод

public static EscapePercent ( string str ) : string
str string
Результат string

ExpandSectionParams() публичный статический Метод

public static ExpandSectionParams ( PEBakery.Core.EngineState s, IEnumerable strs ) : List
s PEBakery.Core.EngineState
strs IEnumerable
Результат List

ExpandSectionParams() публичный статический Метод

Expand #1, #2, #3, etc...
public static ExpandSectionParams ( PEBakery.Core.EngineState s, string str ) : string
s PEBakery.Core.EngineState
str string
Результат string

ExpandVariables() публичный статический Метод

public static ExpandVariables ( PEBakery.Core.EngineState s, IEnumerable strs ) : List
s PEBakery.Core.EngineState
strs IEnumerable
Результат List

ExpandVariables() публичный статический Метод

public static ExpandVariables ( PEBakery.Core.Variables vars, IEnumerable strs ) : List
vars PEBakery.Core.Variables
strs IEnumerable
Результат List

ExpandVariables() публичный статический Метод

Expand #n and %Var% variables.
public static ExpandVariables ( PEBakery.Core.EngineState s, string str ) : string
s PEBakery.Core.EngineState
str string
Результат string

ExpandVariables() публичный статический Метод

public static ExpandVariables ( PEBakery.Core.Variables vars, string str ) : string
vars PEBakery.Core.Variables
str string
Результат string

GetUniqueFileName() публичный статический Метод

public static GetUniqueFileName ( string srcKey, IEnumerable keys ) : string
srcKey string
keys IEnumerable
Результат string

GetUniqueKey() публичный статический Метод

public static GetUniqueKey ( string srcKey, IEnumerable keys, int startIdx = 1 ) : string
srcKey string
keys IEnumerable
startIdx int
Результат string

IsFileFilterValid() публичный статический Метод

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
Результат bool

IsFileNameValid() публичный статический Метод

public static IsFileNameValid ( string path, IEnumerable more = null ) : bool
path string
more IEnumerable
Результат bool

IsPathValid() публичный статический Метод

public static IsPathValid ( string path, IEnumerable more = null ) : bool
path string
more IEnumerable
Результат bool

IsUrlValid() публичный статический Метод

Check if given url is valid http or https url.
public static IsUrlValid ( string url ) : bool
url string
Результат bool

PackRegBinary() публичный статический Метод

public static PackRegBinary ( Array bin, bool escape = false ) : string
bin Array
escape bool
Результат string

PackRegMultiBinary() публичный статический Метод

public static PackRegMultiBinary ( IEnumerable multiStrs ) : string
multiStrs IEnumerable
Результат string

PackRegMultiString() публичный статический Метод

public static PackRegMultiString ( IEnumerable multiStrs ) : string
multiStrs IEnumerable
Результат string

PathSecurityCheck() публичный статический Метод

Check if a path is safe to write. Allows wildcard.
public static PathSecurityCheck ( string path, string &errorMsg ) : bool
path string
errorMsg string
Результат bool

Preprocess() публичный статический Метод

public static Preprocess ( PEBakery.Core.EngineState s, IEnumerable strs, bool escapePercent = true ) : List
s PEBakery.Core.EngineState
strs IEnumerable
escapePercent bool
Результат List

Preprocess() публичный статический Метод

public static Preprocess ( PEBakery.Core.Variables vars, IEnumerable strs, bool escapePercent = true ) : List
vars PEBakery.Core.Variables
strs IEnumerable
escapePercent bool
Результат List

Preprocess() публичный статический Метод

public static Preprocess ( PEBakery.Core.EngineState s, string str, bool escapePercent = true ) : string
s PEBakery.Core.EngineState
str string
escapePercent bool
Результат string

Preprocess() публичный статический Метод

public static Preprocess ( PEBakery.Core.Variables vars, string str, bool escapePercent = true ) : string
vars PEBakery.Core.Variables
str string
escapePercent bool
Результат string

ProcessVersionString() публичный статический Метод

public static ProcessVersionString ( string str ) : string
str string
Результат string

QuoteEscape() публичный статический Метод

public static QuoteEscape ( IEnumerable strs, bool fullEscape = false, bool escapePercent = false ) : List
strs IEnumerable
fullEscape bool
escapePercent bool
Результат List

QuoteEscape() публичный статический Метод

public static QuoteEscape ( string str, bool fullEscape = false, bool escapePercent = false ) : string
str string
fullEscape bool
escapePercent bool
Результат string

QuoteUnescape() публичный статический Метод

public static QuoteUnescape ( IEnumerable strs, bool escapePercent = false ) : List
strs IEnumerable
escapePercent bool
Результат List

QuoteUnescape() публичный статический Метод

public static QuoteUnescape ( string str, bool escapePercent = false ) : string
str string
escapePercent bool
Результат string

Unescape() публичный статический Метод

public static Unescape ( IEnumerable strs, bool escapePercent = false ) : List
strs IEnumerable
escapePercent bool
Результат List

Unescape() публичный статический Метод

public static Unescape ( string str, bool escapePercent = false ) : string
str string
escapePercent bool
Результат string

UnescapePercent() публичный статический Метод

public static UnescapePercent ( IEnumerable strs ) : List
strs IEnumerable
Результат List

UnescapePercent() публичный статический Метод

public static UnescapePercent ( string str ) : string
str string
Результат string

UnpackRegBinary() публичный статический Метод

public static UnpackRegBinary ( Array packStrs, Array &bin ) : bool
packStrs Array
bin Array
Результат bool

UnpackRegBinary() публичный статический Метод

public static UnpackRegBinary ( string packStr, Array &bin ) : bool
packStr string
bin Array
Результат bool

UnpackRegMultiString() публичный статический Метод

public static UnpackRegMultiString ( string packStr ) : List
packStr string
Результат List