SenseNet.Portal.Virtualization.PortalContext.AssertAppmodelelements C# (CSharp) Méthode

AssertAppmodelelements() private static méthode

private static AssertAppmodelelements ( NodeHead requestedNodeHead, string actionName, string appNodePath, string contextNodePath ) : void
requestedNodeHead SenseNet.ContentRepository.Storage.NodeHead
actionName string
appNodePath string
contextNodePath string
Résultat void
        private static void AssertAppmodelelements(NodeHead requestedNodeHead, string actionName, string appNodePath, string contextNodePath)
        {
            var paramCount = (actionName == null ? 0 : 1) + (appNodePath == null ? 0 : 1) + (contextNodePath == null ? 0 : 1);
            if (paramCount > 1)
                throw new InvalidOperationException("More than one Application model parameters are not applicable.");
            if (contextNodePath != null && !IsApplicationNode(requestedNodeHead))
                throw new InvalidOperationException("Requested node is not an application.");
        }