private static int GetStartIndex(SequenceHandler <TValue> handler, int startIndex) { if (startIndex < 0) { return(0); } return(handler.Invert(startIndex)); }
public override bool IsMatch(SequenceHandler <TValue> values, int index) { index = _isBehind ? index - 1 : index; index = values.Invert(index); if (index < 0) { return(false); } var isMatch = _oregex.IsMatch(values.Collection, index); return(_isNegative ^ isMatch); }