PowerArgs.Cli.ConsoleAppKeyboardInputManager.StackDepthChanged C# (CSharp) Method

StackDepthChanged() private method

private StackDepthChanged ( ) : void
return void
        private void StackDepthChanged()
        {
            if(Math.Abs(Application.FocusManager.StackDepth - currentStackDepth) != 1)
            {
                throw new InvalidOperationException("Stack depth changed by more than 1");
            }
            else if(Application.FocusManager.StackDepth == currentStackDepth + 1)
            {
                handlers.Push(new Dictionary<string, KeyboardEventHandler>());
            }
            else
            {
                handlers.Pop();
            }
        }