C# Class FileScanner.PatternMatching.AhoMatcher

The implementation of IMatcher interface using Aho-Corasick algorithm for matching patterns in text.
Inheritance: IMatcher
Show file Open project: kzemek/FileScanner

Public Methods

Method Description
AhoMatcher ( List patterns ) : System.Collections.Generic

Initializes a new instance of the AhoMatcher class for the specified patterns.

IsMatch ( TextReader reader ) : bool
Match ( TextReader reader ) : Match
Matches ( TextReader reader ) : IEnumerable

Private Methods

Method Description
Match ( TextReader reader, int position ) : int>.KeyValuePair

Method Details

AhoMatcher() public method

Initializes a new instance of the AhoMatcher class for the specified patterns.
public AhoMatcher ( List patterns ) : System.Collections.Generic
patterns List The patterns to search for in text.
return System.Collections.Generic

IsMatch() public method

public IsMatch ( TextReader reader ) : bool
reader System.IO.TextReader
return bool

Match() public method

public Match ( TextReader reader ) : Match
reader System.IO.TextReader
return Match

Matches() public method

public Matches ( TextReader reader ) : IEnumerable
reader System.IO.TextReader
return IEnumerable