Beispiel #1
0
        private void UpdatePrevAndNextLinks(IInstruction value)
        {
            if (value == null)
                return;

            var prevIndex = this.Index - 1;
            if (prevIndex >= 0)
            {
                var prev = _instructions[prevIndex];
                if (prev != null)
                    prev.SetNext(value);
            }

            var nextIndex = Index + 1;
            if (nextIndex >= _instructions.Count)
                return;

            var next = _instructions[nextIndex];
            if (next != null)
                value.SetNext(next);
        }