Beispiel #1
0
        static HotCompiler()
        {
            try
            {
                Current = new RealHotCompiler();
            }
            catch
            {
                Current = new StubHotCompiler();
            }
            AppDomain.CurrentDomain.AssemblyLoad += (_, e) => Current.TryLoadAssembly(e.LoadedAssembly);
            foreach (var a in AppDomain.CurrentDomain.GetAssemblies())
            {
                Current.TryLoadAssembly(a);
            }

            Current.TryLoadAssembly(HotReloader.Current.App.GetType().Assembly);
        }
        static HotCompiler()
        {
            try
            {
                Current = new RealHotCompiler();
            }
            catch
            {
                Current = new StubHotCompiler();
            }

            AppDomain.CurrentDomain.AssemblyLoad += (_, e) => Current.TryLoadAssembly(e.LoadedAssembly);
            foreach (var a in AppDomain.CurrentDomain.GetAssemblies())
            {
                Current.TryLoadAssembly(a);
            }
            if (Device.RuntimePlatform == Device.Android)
            {
                Current.TryLoadAssembly("mscorlib");
                Current.TryLoadAssembly("netstandard");
                Current.TryLoadAssembly("System");
            }
        }