Ejemplo n.º 1
0
        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;
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
 public CompositePattern(IRegistrationPattern pattern, params IBasedOnPattern[] basedOnPatterns)
     : base(pattern.Pattern)
 {
     this.pattern         = pattern;
     this.basedOnPatterns = basedOnPatterns;
 }
Ejemplo n.º 4
0
 public CompositePattern(IRegistrationPattern pattern, params IBasedOnPattern[] basedOnPatterns)
     : base(pattern.Pattern)
 {
     this.pattern = pattern;
     this.basedOnPatterns = basedOnPatterns;
 }