Пример #1
0
        /// <summary>
        /// 创建 JumonyViewEngine 对象
        /// </summary>
        public JumonyViewEngine()
        {
            ViewLocationFormats = new[]
              {
            "~/Views/{1}/{0}.htm",
            "~/Views/{1}/{0}.html",
            "~/Views/Shared/{0}.htm",
            "~/Views/Shared/{0}.html"
              };

              AreaViewLocationFormats = new[]
              {
            "~/Areas/{2}/Views/{1}/{0}.htm",
            "~/Areas/{2}/Views/{1}/{0}.html",
            "~/Areas/{2}/Views/Shared/{0}.htm",
            "~/Areas/{2}/Views/Shared/{0}.html",
              };

              PartialViewLocationFormats = ViewLocationFormats;
              AreaPartialViewLocationFormats = AreaViewLocationFormats;

              MasterLocationFormats = ViewLocationFormats;
              AreaMasterLocationFormats = AreaMasterLocationFormats;

              ViewLocationCache = new JumonyViewLocationCache();
        }
Пример #2
0
        /// <summary>
        /// 创建 JumonyViewEngine 对象
        /// </summary>
        public JumonyViewEngine()
        {
            ViewLocationFormats = new[]
            {
                "~/Views/{1}/{0}.htm",
                "~/Views/{1}/{0}.html",
                "~/Views/Shared/{0}.htm",
                "~/Views/Shared/{0}.html"
            };

            AreaViewLocationFormats = new[]
            {
                "~/Areas/{2}/Views/{1}/{0}.htm",
                "~/Areas/{2}/Views/{1}/{0}.html",
                "~/Areas/{2}/Views/Shared/{0}.htm",
                "~/Areas/{2}/Views/Shared/{0}.html",
            };

            PartialViewLocationFormats     = ViewLocationFormats;
            AreaPartialViewLocationFormats = AreaViewLocationFormats;

            MasterLocationFormats     = ViewLocationFormats;
            AreaMasterLocationFormats = AreaViewLocationFormats;

            ViewLocationCache = new JumonyViewLocationCache();
        }