Ejemplo n.º 1
0
        private static Action FindAction(Guid actionId, string absoluteNavigateUrl, ActionCollection actions)
        {
            Action originalItem = null;

            if (actionId != Guid.Empty)
            {
                originalItem = actions.FindByActionId(actionId);
            }
            else if (!string.IsNullOrEmpty(absoluteNavigateUrl))
            {
                if (absoluteNavigateUrl.Contains("?"))
                {
                    originalItem = actions.FindByNavigateUrlPathAndQuery(absoluteNavigateUrl, true, true);
                    if (originalItem == null)
                    {
                        originalItem = actions.FindByNavigateUrlPathAndQuery(absoluteNavigateUrl, true, false);
                    }
                }
                if (originalItem == null)
                {
                    originalItem = actions.FindByNavigateUrl(absoluteNavigateUrl.Split('?')[0], true);
                }
            }

            return(originalItem);
        }