RegExpose.RegexEngine.RegexEngineInternal.AddCapture C# (CSharp) Méthode

AddCapture() public méthode

public AddCapture ( int number, int index, string value ) : void
number int
index int
value string
Résultat void
            public void AddCapture(int number, int index, string value)
            {
                if (!_captures.ContainsKey(number))
                {
                    _captures.Add(number, new Stack<ParenCapture>());
                }

                var capture = ParenCapture.Pass(number, index, value);
                _captures[number].Push(capture);

                // In case there are any saved states, we need to associate the capture with all of them. That way, should
                // a saved state be backtracted away, it can clear any captures associated with it.
                foreach (var savedState in _savedStates)
                {
                    savedState.AddCapture(capture);
                }
            }