/// <summary>
        /// Initializes the <see cref="MvcSiteMapProviderViewEngine"/> class.
        /// </summary>
        static MvcSiteMapProviderViewEngine()
        {
            ViewEngines.Engines.Insert(ViewEngines.Engines.Count, new MvcSiteMapProviderViewEngine());

            try
            {
                var pathProvider = new MvcSiteMapProviderViewEngineVirtualPathProvider();
                HostingEnvironment.RegisterVirtualPathProvider(pathProvider);
            }
            catch (SecurityException)
            {
                // Partial trust... No support for this!
            }
        }
예제 #2
0
        /// <summary>
        /// Initializes the <see cref="MvcSiteMapProviderViewEngine"/> class.
        /// </summary>
        static MvcSiteMapProviderViewEngine()
        {
            ViewEngines.Engines.Insert(ViewEngines.Engines.Count, new MvcSiteMapProviderViewEngine());

            try
            {
                var pathProvider = new MvcSiteMapProviderViewEngineVirtualPathProvider();
                HostingEnvironment.RegisterVirtualPathProvider(pathProvider);
            }
            catch (SecurityException)
            {
                // Partial trust... No support for this!
            }
        }