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.");
}