Exemple #1
0
        public static void EnsureInitialized()
        {
            if (Instance != null)
            {
                return;
            }

            var instance = new MvxWindowsAssemblyCache();

            if (Instance != instance)
            {
                throw new MvxException("Error initialising MvxWindowsAssemblyCache");
            }
        }
Exemple #2
0
 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);
         });
     }
 }