예제 #1
0
 private void Dispose(bool disposing)
 {
     if (disposing)
     {
         _state?.Dispose();
         _state = null;
     }
 }
예제 #2
0
 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);
     }
 }
예제 #3
0
        /// <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));
        }
예제 #4
0
 /// <inheritdoc />
 public void PreProcess(byte[] input)
 {
     _state = new HistoryMatchState(input, FindLimitations, FindOptions.UnitSize);
 }