ZeroInstall.BootstrapProcess.ImportArchives C# (CSharp) Method

ImportArchives() private method

Imports implementation archives into the IStore.
private ImportArchives ( ) : void
return void
        private void ImportArchives()
        {
            foreach (string path in Directory.GetFiles(_contentDir))
            {
                Debug.Assert(path != null);
                var digest = new ManifestDigest();
                digest.ParseID(Path.GetFileNameWithoutExtension(path));
                if (digest.Best != null && !Store.Contains(digest))
                {
                    try
                    {
                        Store.AddArchives(new[]
                        {
                            new ArchiveFileInfo
                            {
                                Path = path,
                                MimeType = Archive.GuessMimeType(path)
                            }
                        }, digest, Handler);
                    }
                        #region Error handling
                    catch (ImplementationAlreadyInStoreException)
                    {}
                    #endregion
                }
            }
        }