public IEnumerable<IStructuralMatchResult> Search(IRegistrationPattern patern) { var results = new List<IStructuralMatchResult>(); var consumer = new FindResultConsumer<IStructuralMatchResult>(result => { var findResultStructural = result as FindResultStructural; if (findResultStructural != null && findResultStructural.DocumentRange.IsValid()) { return findResultStructural.MatchResult; } return null; }, match => { if (match != null) { results.Add(match); } return FindExecution.Continue; }); DoSearch(patern.Matcher, consumer); return results; }
public IEnumerable <IStructuralMatchResult> Search(IRegistrationPattern patern) { var results = new List <IStructuralMatchResult>(); var consumer = new FindResultConsumer <IStructuralMatchResult>(result => { var findResultStructural = result as FindResultStructural; if (findResultStructural != null && findResultStructural.DocumentRange.IsValid()) { return(findResultStructural.MatchResult); } return(null); }, match => { if (match != null) { results.Add(match); } return(FindExecution.Continue); }); DoSearch(patern.Matcher, consumer); return(results); }
public CompositePattern(IRegistrationPattern pattern, params IBasedOnPattern[] basedOnPatterns) : base(pattern.Pattern) { this.pattern = pattern; this.basedOnPatterns = basedOnPatterns; }