private TelnetPage FindPage(TelnetPage page, string context)
        {
            if (string.IsNullOrEmpty(context))
            {
                return(page);
            }

            var subPage = page.Pages.SingleOrDefault(x => x.Key == context[0]);

            if (subPage == null)
            {
                throw new InvalidOperationException(string.Format("No page {0} under page {1}.", context[0], page.Name));
            }

            return(FindPage(subPage, context.Substring(1)));
        }
 public TelnetActor(ITcpClientActor tcpClientActor)
 {
     _tcpClientActor = tcpClientActor;
     _rootPage       = CreatePages(tcpClientActor);
 }