public override ViewEngineResult FindView(ControllerContext controllerContext, string viewName, string masterName, bool useCache)
        {
            IMobileDeviceHelper mobileDeviceHelper = new MobileDeviceHelper();
            bool useMobileDevice = mobileDeviceHelper.IsMobileDevice(controllerContext.HttpContext)
                && mobileDeviceHelper.MobileDevicesSupported()
                && !mobileDeviceHelper.CustomerDontUseMobileVersion();

            string overrideViewName = useMobileDevice ?
                string.Format("{0}.{1}", viewName, _mobileViewModifier)
                : viewName;

            ViewEngineResult result = FindThemeableView(controllerContext, overrideViewName, masterName, useCache, useMobileDevice);
            // If we're looking for a Mobile view and couldn't find it try again without modifying the viewname
            if (useMobileDevice && (result == null || result.View == null))
                result = FindThemeableView(controllerContext, viewName, masterName, useCache, false);
            return result;
        }
        public override ViewEngineResult FindView(ControllerContext controllerContext, string viewName, string masterName, bool useCache)
        {
            IMobileDeviceHelper mobileDeviceHelper = new MobileDeviceHelper();
            bool useMobileDevice = mobileDeviceHelper.IsMobileDevice(controllerContext.HttpContext) &&
                                   mobileDeviceHelper.MobileDevicesSupported() &&
                                   !mobileDeviceHelper.CustomerDontUseMobileVersion();

            string overrideViewName = useMobileDevice ?
                                      string.Format("{0}.{1}", viewName, _mobileViewModifier)
                : viewName;

            ViewEngineResult result = FindThemeableView(controllerContext, overrideViewName, masterName, useCache, useMobileDevice);

            // If we're looking for a Mobile view and couldn't find it try again without modifying the viewname
            if (useMobileDevice && (result == null || result.View == null))
            {
                result = FindThemeableView(controllerContext, viewName, masterName, useCache, false);
            }
            return(result);
        }