public static void CacheCatalog(ICachedComposablePartCatalog catalog, AssemblyName assemblyName, string cacheStorageDirectory)
        {
            Requires.NotNull(catalog, "catalog");
            Requires.NotNull(assemblyName, "assemblyName");
            Requires.NotNull(cacheStorageDirectory, "cacheStorageDirectory");

            ComposablePartCatalogAssemblyCacheWriter writer = new ComposablePartCatalogAssemblyCacheWriter(assemblyName, cacheStorageDirectory);
            catalog.CacheCatalog(writer);
            writer.Dispose();
        }
        public static void CacheCatalog(ICachedComposablePartCatalog catalog, string assemblyPath)
        {
            Requires.NotNull(catalog, "catalog");
            Requires.NotNull(assemblyPath, "assemblyPath");

            assemblyPath = Path.GetFullPath(assemblyPath);

            AssemblyName assemblyName = new AssemblyName();
            assemblyName.Name = Path.GetFileNameWithoutExtension(assemblyPath);
            assemblyName.CodeBase = assemblyPath;

            CacheCatalog(catalog, assemblyName, Path.GetDirectoryName(assemblyPath));
        }
 public static bool IsCacheUpToDate(ICachedComposablePartCatalog catalog)
 {
     Requires.NotNull(catalog, "catalog");
     return catalog.IsCacheUpToDate;
 }