Example #1
0
        protected ThemeableVirtualPathProviderViewEngine()
        {
            this.ViewLocationCache = new TwoLevelViewLocationCache();

            // prepare localized mobile & desktop display modes
            DisplayModeProvider.Modes.Clear();
            var mobileDisplayMode = new LocalizedDisplayMode(DisplayModeProvider.MobileDisplayModeId, EnableLocalizedViews)
            {
                ContextCondition = IsMobileDevice
            };
            var desktopDisplayMode = new LocalizedDisplayMode(DisplayModeProvider.DefaultDisplayModeId, EnableLocalizedViews);

            DisplayModeProvider.Modes.Add(mobileDisplayMode);
            DisplayModeProvider.Modes.Add(desktopDisplayMode);
        }
        protected ThemeableVirtualPathProviderViewEngine()
        {
            this.ViewLocationCache = new TwoLevelViewLocationCache(base.ViewLocationCache);

            // prepare localized mobile & desktop display modes
            DisplayModeProvider.Modes.Clear();
            var mobileDisplayMode = new LocalizedDisplayMode(DisplayModeProvider.MobileDisplayModeId, EnableLocalizedViews)
            {
                ContextCondition = IsMobileDevice
            };
            var desktopDisplayMode = new LocalizedDisplayMode(DisplayModeProvider.DefaultDisplayModeId, EnableLocalizedViews);

            DisplayModeProvider.Modes.Add(mobileDisplayMode);
            DisplayModeProvider.Modes.Add(desktopDisplayMode);
        }