private void Dispose(bool disposing) { if (disposing) { _state?.Dispose(); _state = null; } }
protected override void SetupMatchFinder(byte[] input, int startPosition) { _states = new HistoryMatchState[FindOptions.TaskCount]; for (var i = 0; i < _states.Length; i++) { _states[i] = new HistoryMatchState(FindLimitations, FindOptions); } }
/// <inheritdoc cref="FindMatchesAtPosition(byte[],int)"/> public override IEnumerable <Match> FindMatchesAtPosition(byte[] input, int position) { if (_states == null) { _states = new HistoryMatchState[1]; _states[0] = new HistoryMatchState(FindLimitations, FindOptions); } return(_states[0].FindMatchesAtPosition(input, position)); }
/// <inheritdoc /> public void PreProcess(byte[] input) { _state = new HistoryMatchState(input, FindLimitations, FindOptions.UnitSize); }