/// <summary> /// Registers the page as a root page. /// </summary> /// <param name="page">The page.</param> public void Register(IAlfredPage page) { _rootPages.Add(page); }
/// <summary> /// Registers the page as a root page. /// </summary> /// <exception cref="ArgumentNullException"> /// Thrown when one or more required arguments are null. /// </exception> /// <param name="page"> The page. </param> public void Register(IAlfredPage page) { if (page == null) { throw new ArgumentNullException(nameof(page)); } if (page.IsRootLevel) { _rootPages.Add(page); } page.OnRegistered(this); }