public ISearchResult[] FindAll(string text) { if (charStateMachine == null) { KeywordTree tree = new KeywordTree(_keys); charStateMachine = tree.BuildStateMachine(); } return charStateMachine.FindAll(text.ToCharArray()); }
public ISearchResult SearchChars(char[] text, int textStart, int textEnd) { if (charStateMachine == null) { KeywordTree tree = new KeywordTree(_keys); charStateMachine = tree.BuildStateMachine(); } return charStateMachine.Find(text); }
public static ISetSearch GetSetStateMachine(string[] keys) { if (keys == null) throw new ArgumentNullException(); if (keys.Length == 0) throw new ArgumentOutOfRangeException(); KeywordTree keywordTree = new KeywordTree(keys); return keywordTree.BuildStateMachine(); }