/// <exclude />
        public void Dispose()
        {
            var top = SiteMapStack.Pop();

            Verify.That(object.ReferenceEquals(top, this), "SiteMapContext weren't disposed properly");
#if LeakCheck
            GC.SuppressFinalize(this);
#endif
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="SiteMapContext"/> class.
        /// </summary>
        /// <param name="rootPage">The root page.</param>
        public SiteMapContext(IPage rootPage)
        {
            RootPage = rootPage;

            SiteMapStack.Push(this);
        }
        /// <exclude />
        public void Dispose()
        {
            var top = SiteMapStack.Pop();

            Verify.That(object.ReferenceEquals(top, this), "SiteMapContext weren't disposed properly");
        }