private Tuple <string, string> GetFromRenderingItem(Rendering rendering, GetRendererArgs args)
        {
            Template renderingTemplate = args.RenderingTemplate;

            if (renderingTemplate == null)
            {
                return(null);
            }

            if (!renderingTemplate.DescendsFromOrEquals(TemplateIds.ControllerRendering))
            {
                return(null);
            }

            RenderingItem renderingItem = rendering.RenderingItem;

            if (renderingItem == null)
            {
                return(null);
            }

            string controllerName = renderingItem.InnerItem["Controller"];
            string actionName     = renderingItem.InnerItem["Controller Action"];

            if (controllerName.IsWhiteSpaceOrNull())
            {
                controllerName = NameConverter.ConvertItemNameToClassName(renderingItem.Name);
            }

            return(new Tuple <string, string>(controllerName, actionName));
        }