public static void EnsureInitialized() { if (Instance != null) { return; } var instance = new MvxWindowsAssemblyCache(); if (Instance != instance) { throw new MvxException("Error initialising MvxWindowsAssemblyCache"); } }
private static void RegisterAssembly(Assembly assembly) { if (MvxSingleton <IMvxIoCProvider> .Instance == null) { MvxWindowsAssemblyCache.EnsureInitialized(); MvxWindowsAssemblyCache.Instance?.Assemblies.Add(assembly); } else { Mvx.CallbackWhenRegistered <IMvxValueConverterRegistry>( registry => { registry.AddOrOverwriteFrom(assembly); }); Mvx.CallbackWhenRegistered <IMvxValueCombinerRegistry>( registry => { registry.AddOrOverwriteFrom(assembly); }); } }