Ejemplo n.º 1
0
        public static void PostApp(Assembly asm)
        {
            var binDir = ConfigurationManager.AppSettings.Get("Dir.WebBin");

            if (string.IsNullOrWhiteSpace(binDir))
            {
                MvcResolve.Init(binDir);
            }

            // RazorGenearator.Mvc https://github.com/RazorGenerator/RazorGenerator
            PrecompiledMvcEngine.MvcEngine(asm);
        }
Ejemplo n.º 2
0
        public static void ReflectCheck(string ddl, string typeName)
        {
            if (StartMvc.WebBin == null || !System.IO.Directory.Exists(StartMvc.WebBin))
            {
                StartMvc.WebBin = ConfigurationManager.AppSettings.Get("dir.WebBin");
                MvcResolve.Init(StartMvc.WebBin);
            }
            string path = StartMvc.WebBin + @"\" + ddl;

            // WRN: Native image will not be probed in LoadFrom context. Native image will only be probed in default load context,
            // like with Assembly.Load().
            try
            {
                AiLib.Web.LogMvc.Write("ReflectCheck " + path);
                var asmNpoi = Assembly.LoadFile(path); // .UnsafeLoadFrom(path);
                var utils   = AppDomain.CurrentDomain.CreateInstanceFrom(path, typeName);
            }
            catch (Exception)
            {
                // StartMvc.Error(ex);
            }
        }
Ejemplo n.º 3
0
 public static void ReflectCheck()
 {
     MvcResolve.ReflectCheck("WebGrease.dll", "WebGrease.Css.CssParser");
     MvcResolve.ReflectCheck("System.Web.Optimization.dll", "System.Web.Optimization.CssMinify");
     MvcResolve.ReflectCheck("Microsoft.Web.Infrastructure.dll", "Microsoft.Web.Infrastructure.DynamicValidationHelper");
 }