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

GetApplicationContext() public méthode

Returns the current application if it is the requested node
public GetApplicationContext ( ) : Node
Résultat Node
        public Node GetApplicationContext()
        {
            var context = ContextNode;

            //If the requested node is an app and the action 
            //is browse, than return that node.
            if (context is Page && (ActionName == null || ActionName.ToLower() == "browse"))
                return context;

            //If a context node was given in the url than
            //the original requested node should be an app.
            //In this case the page property will contain that content.
            var contextNodePath = HttpContext.Current.Request.Params[ContextNodeParamName];
            if (!string.IsNullOrEmpty(contextNodePath))
                return this.Page;

            return null;
        }