Esempio 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);
        }
Esempio 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);
            }
        }