コード例 #1
0
 public static ModuleInstaller GetModuleInstaller(string discoveryPath, string probingPath, string authToken, IEnumerable <string> manifestUrls)
 {
     if (_moduleInstaller == null)
     {
         var fileManager           = new TransactionFileManager();
         var fileSystem            = new System.IO.Abstractions.FileSystem();
         var zipFileWrapper        = new ZipFileWrapper(fileSystem, fileManager);
         var localCatalogOptions   = LocalModuleCatalog.GetOptions(discoveryPath, probingPath);
         var extCatalogOptions     = ExtModuleCatalog.GetOptions(authToken, manifestUrls);
         var localModuleCatalog    = LocalModuleCatalog.GetCatalog(localCatalogOptions);
         var externalModuleCatalog = ExtModuleCatalog.GetCatalog(extCatalogOptions, localModuleCatalog);
         var modulesClient         = new ExternalModulesClient(extCatalogOptions);
         _moduleInstaller = new ModuleInstaller(externalModuleCatalog, modulesClient, fileManager, localCatalogOptions, fileSystem, zipFileWrapper);
     }
     return(_moduleInstaller);
 }
コード例 #2
0
        public ZipFileWrapperTests()
        {
            var localTemp = Path.Combine(Directory.GetCurrentDirectory(), Guid.NewGuid().ToString("N"));

            _target = new ZipFileWrapper(localTemp);
        }