Option Strict On
Option Explicit On

Namespace Nexamas.UI.Components

    Partial Public NotInheritable Class MASAppLayout

#Region "Friend routing/page ownership boundary"

        Friend Function CreateRouteOwnershipBoundarySnapshot() As MASRouteShellBoundarySnapshot
            Return MASRouteShellBoundaryPolicy.CreateAppLayoutBoundary()
        End Function

        Friend Function HasRouteOwnershipBoundaryForTests() As Boolean
            Dim snapshot As MASRouteShellBoundarySnapshot = CreateRouteOwnershipBoundarySnapshot()
            If Not MASRouteShellBoundaryPolicy.IsSafeClosedBoundary(snapshot,
                                                                    "applayout",
                                                                    "AppLayout.RoutingOwnership",
                                                                    MASRouteShellBoundaryKind.AppLayoutRouteOwnership) Then Return False
            If snapshot.OwnsRouter OrElse snapshot.OwnsPageHost OrElse snapshot.OwnsNativeShell Then Return False
            If snapshot.ExposesPublicAdapter OrElse snapshot.ObservesExternalRoute Then Return False
            Return snapshot.IsPureVisualBoundary
        End Function

#End Region

    End Class

End Namespace
