예제 #1
0
        public void Apply(Navigator navigator, ScreenStack screens)
        {
            var screen = screens.FirstOrDefault(e => e.GetType() == _screenType);

            if (screen is null)
            {
                throw new ScreenNotFoundException(_screenType);
            }

            while (screens.CurrentScreen != screen)
            {
                screens.Pop();
            }

            navigator.BackToScreen(screen);
        }