Fingerprint_Card

Loading...
Searching...
No Matches
ICSharpCode.SharpZipLib.Core.NameFilter Class Reference

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 ';'. To include a semi-colon it may be quoted as in \;. 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. More...

Inheritance diagram for ICSharpCode.SharpZipLib.Core.NameFilter:
[legend]
Collaboration diagram for ICSharpCode.SharpZipLib.Core.NameFilter:
[legend]

## Public Member Functions
| NameFilter (string filter)
| Construct an instance based on the filter expression passed.
override string | ToString ()
| Convert this filter to its string equivalent.
bool | IsIncluded (string name)
| Test a value to see if it is included by the filter.
bool | IsExcluded (string name)
| Test a value to see if it is excluded by the filter.
bool | IsMatch (string name)
| Test a value to see if it matches the filter.

## Static Public Member Functions
static bool | IsValidExpression (string expression)
| Test a string to see if it is a valid regular expression.
static bool | IsValidFilterExpression (string toTest)
| Test an expression to see if it is valid as a filter.
static string[] | SplitQuoted (string original)
| Split a string into its component pieces.

## Private Member Functions
void | Compile ()
| Compile this filter.

## Private Attributes
string | filter_
ArrayList | inclusions_
ArrayList | exclusions_

## Detailed Description

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 ';'. To include a semi-colon it may be quoted as in \;. 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.

The following expression includes all name ending in '.dat' with the exception of 'dummy.dat' "+\.dat$;-^dummy\.dat$"

## Constructor & Destructor Documentation

## ◆ NameFilter()

ICSharpCode.SharpZipLib.Core.NameFilter.NameFilter | ( | string | filter | ) |

Construct an instance based on the filter expression passed.

Parameters

  filter | The filter expression.

Here is the call graph for this function:

## Member Function Documentation

## ◆ Compile()

void ICSharpCode.SharpZipLib.Core.NameFilter.Compile | ( |  | ) |
| private

Compile this filter.

Here is the call graph for this function:
Here is the caller graph for this function:

## ◆ IsExcluded()

bool ICSharpCode.SharpZipLib.Core.NameFilter.IsExcluded | ( | string | name | ) |

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

Parameters

  name | The value to test.

Returns
  True if the value is excluded, false otherwise.

Here is the caller graph for this function:

## ◆ IsIncluded()

bool ICSharpCode.SharpZipLib.Core.NameFilter.IsIncluded | ( | string | name | ) |

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

Parameters

  name | The value to test.

Returns
  True if the value is included, false otherwise.

Here is the caller graph for this function:

## ◆ IsMatch()

bool ICSharpCode.SharpZipLib.Core.NameFilter.IsMatch | ( | string | name | ) |

Test a value to see if it matches the filter.

Parameters

  name | The value to test.

Returns
  True if the value matches, false otherwise.

Implements ICSharpCode.SharpZipLib.Core.IScanFilter.

Here is the call graph for this function:

## ◆ IsValidExpression()

bool ICSharpCode.SharpZipLib.Core.NameFilter.IsValidExpression | ( | string | expression | ) |
| static

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

Parameters

  expression | The expression to test.

Returns
  True if expression is a valid System.Text.RegularExpressions.Regex false otherwise.

## ◆ IsValidFilterExpression()

bool ICSharpCode.SharpZipLib.Core.NameFilter.IsValidFilterExpression | ( | string | toTest | ) |
| static

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

Parameters

  toTest | The filter expression to test.

Returns
  True if the expression is valid, false otherwise.

Here is the call graph for this function:

## ◆ SplitQuoted()

string[] ICSharpCode.SharpZipLib.Core.NameFilter.SplitQuoted | ( | string | original | ) |
| static

Split a string into its component pieces.

Parameters

  original | The original string

Returns
  Returns an array of T:System.String values containing the individual filter elements.

Here is the caller graph for this function:

## ◆ ToString()

override string ICSharpCode.SharpZipLib.Core.NameFilter.ToString | ( |  | ) |

Convert this filter to its string equivalent.

Returns
  The string equivalent for this filter.

## Member Data Documentation

## ◆ exclusions_

ArrayList ICSharpCode.SharpZipLib.Core.NameFilter.exclusions_
| private

## ◆ filter_

string ICSharpCode.SharpZipLib.Core.NameFilter.filter_
| private

## ◆ inclusions_

ArrayList ICSharpCode.SharpZipLib.Core.NameFilter.inclusions_
| private

The documentation for this class was generated from the following file:

- ICSharpCode.SharpZLib/Core/NameFilter.cs