internal MatchResult(MatchContext <T> context, int startIndex) { this._context = context; StartIndex = startIndex; Elements = context.GetSubsequence(StartIndex, Length).ToList(); Groups = new GroupContainer <T>(context); }
internal override IEnumerable <MatchContext <T> > Match(MatchContext <T> context) { var groups = new GroupContainer <T>(context); if (!context.IsEndOfSequence && Predicate(context.CurrentItem, groups)) { yield return(context.WithIndex(context.Index + 1)); } }