C# Класс ICSharpCode.SharpZipLib.Core.NameFilter

NameFilter is a string matching class which allows for both positive and negative matching. A filter is a sequence of independant regular expressions separated by semi-colons ';' Each expression can be prefixed by a plus '+' sign or a minus '-' sign to denote the expression is intended to include or exclude names. If neither a plus or minus sign is found include is the default A given name is tested for inclusion before checking exclusions. Only names matching an include spec and not matching an exclude spec are deemed to match the filter. An empty filter matches any name.
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
IsExcluded ( string name ) : bool

Test a value to see if it is excluded by the filter.

IsIncluded ( string name ) : bool

Test a value to see if it is included by the filter.

IsMatch ( string name ) : bool

Test a value to see if it matches the filter.

IsValidExpression ( string expression ) : bool

Test a string to see if it is a valid regular expression.

IsValidFilterExpression ( string toTest ) : bool

Test an expression to see if it is valid as a filter.

NameFilter ( string filter ) : System

Construct an instance based on the filter expression passed

SplitQuoted ( string original ) : string[]

Split a string into its component pieces

ToString ( ) : string

Convert this filter to its string equivalent.

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

Метод Описание
Compile ( ) : void

Compile this filter.

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

IsExcluded() публичный Метод

Test a value to see if it is excluded by the filter.
public IsExcluded ( string name ) : bool
name string The value to test.
Результат bool

IsIncluded() публичный Метод

Test a value to see if it is included by the filter.
public IsIncluded ( string name ) : bool
name string The value to test.
Результат bool

IsMatch() публичный Метод

Test a value to see if it matches the filter.
public IsMatch ( string name ) : bool
name string The value to test.
Результат bool

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

Test a string to see if it is a valid regular expression.
public static IsValidExpression ( string expression ) : bool
expression string The expression to test.
Результат bool

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

Test an expression to see if it is valid as a filter.
public static IsValidFilterExpression ( string toTest ) : bool
toTest string The filter expression to test.
Результат bool

NameFilter() публичный Метод

Construct an instance based on the filter expression passed
public NameFilter ( string filter ) : System
filter string The filter expression.
Результат System

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

Split a string into its component pieces
public static SplitQuoted ( string original ) : string[]
original string The original string
Результат string[]

ToString() публичный Метод

Convert this filter to its string equivalent.
public ToString ( ) : string
Результат string