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 = Device.RuntimePlatform == Device.Android ? new MonoHotCompiler() as IHotCompiler : new MicrosoftHotCompiler(); } catch { Current = new StubHotCompiler(); } AppDomain.CurrentDomain.AssemblyLoad += (_, e) => Current.TryLoadAssembly(e.LoadedAssembly); foreach (var a in AppDomain.CurrentDomain.GetAssemblies()) { Current.TryLoadAssembly(a); } if (!(Current is MonoHotCompiler)) { 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"); } }