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); }
public IEnumerable <Transaction> GetTransactions(string filePath) { var transactionDtos = TransactionFileManager.ReadTransactionDtos(filePath); var transactions = new List <Transaction>(); foreach (var transactionDto in transactionDtos) { Transaction transaction; if (transactionDto is IgnoredTransactionDto) { var textLine = (transactionDto as IgnoredTransactionDto).TextLine; transaction = new IgnoredTransaction(textLine); } else { transaction = Mapper.Map <Transaction>(transactionDto); } transactions.Add(transaction); } return(transactions); }
public FileManagerIntegrationTests() { _fileManager = new TransactionFileManager(); }