コード例 #1
0
        public ConsoleMenu AddPage <T>() where T : ConsolePage, new()
        {
            if (ConsolePages.ContainsKey(typeof(T)))
            {
                throw PageException.PageTypeExists <T>();
            }

            var page = new T();

            ConsolePages.Add(typeof(T), page);

            return(this);
        }