public UncompressQueueManager CreateUncompressManager() { UncompressQueueManager uncompressManager = new UncompressQueueManager(new SharpCompressManager()); //uncompressManager.ArchiveCompressDirectory = XmlConfig.CurrentConfig.Get("DownloadAutomateManager/UncompressManager/ArchiveCompressDirectory"); uncompressManager.ArchiveCompressDirectory = _xeConfig.zXPathValue("UncompressManager/ArchiveCompressDirectory"); //uncompressManager.ArchiveErrorCompressDirectory = XmlConfig.CurrentConfig.Get("DownloadAutomateManager/UncompressManager/ArchiveErrorCompressDirectory"); uncompressManager.ArchiveErrorCompressDirectory = _xeConfig.zXPathValue("UncompressManager/ArchiveErrorCompressDirectory"); return(uncompressManager); }
public static PrintFileManager_v2 CreatePrintFileManager_v2(UncompressQueueManager uncompressManager = null, bool simulate = false, bool moveFiles = false, bool moveInfoFiles = false) { DownloadAutomateManagerCreator downloadAutomateManagerCreator = GetDownloadAutomateManagerCreator(); if (uncompressManager == null) uncompressManager = downloadAutomateManagerCreator.CreateUncompressManager(); RegexValuesList bonusDirectories = new RegexValuesList(XmlConfig.CurrentConfig.GetConfig("PrintList2Config").GetElements("BonusDirectories/Directory"), compileRegex: true); PrintFileManager_v2 printFileManager = new PrintFileManager_v2(); printFileManager.Simulate = simulate; printFileManager.MoveFiles = moveFiles; printFileManager.MoveInfoFiles = moveInfoFiles; printFileManager.UncompressManager = uncompressManager; printFileManager.BonusDirectories = bonusDirectories; return printFileManager; }
public static PrintFileManager_v2 CreatePrintFileManager_v2(UncompressQueueManager uncompressManager = null, bool simulate = false, bool moveFiles = false, bool moveInfoFiles = false) { DownloadAutomateManagerCreator downloadAutomateManagerCreator = GetDownloadAutomateManagerCreator(); if (uncompressManager == null) { uncompressManager = downloadAutomateManagerCreator.CreateUncompressManager(); } RegexValuesList bonusDirectories = new RegexValuesList(XmlConfig.CurrentConfig.GetConfig("PrintList2Config").GetElements("BonusDirectories/Directory"), compileRegex: true); PrintFileManager_v2 printFileManager = new PrintFileManager_v2(); printFileManager.Simulate = simulate; printFileManager.MoveFiles = moveFiles; printFileManager.MoveInfoFiles = moveInfoFiles; printFileManager.UncompressManager = uncompressManager; printFileManager.BonusDirectories = bonusDirectories; return(printFileManager); }
//public DownloadManager_v2 CreateDownloadManager_v2(bool useTestManager = false) public DownloadManager CreateDownloadManager() { MongoCollectionManager <DownloadedFile> mongoDownloadedFileManager = MongoCollectionManager <DownloadedFile> .Create(_xeConfig.zXPathElement("MongoDownloadedFile")); mongoDownloadedFileManager.IdGenerator = new MongoIdGeneratorInt(mongoDownloadedFileManager.GetCollection()); mongoDownloadedFileManager.KeyName = "Key"; // Key is the name of key field in DownloadedFile_v2 //MongoCollectionManager<QueueDownloadFile> mongoQueueDownloadFileManager = MongoCollectionManager<QueueDownloadFile>.Create(_xeConfig.zXPathElement("MongoQueueDownloadFile_new")); //mongoQueueDownloadFileManager.IdGenerator = new MongoIdGeneratorInt(mongoQueueDownloadFileManager.GetCollection()); //mongoDownloadedFileManager.KeyName = "Key"; // Key is the name of key field in QueueDownloadFile_v2 MongoCollectionManager <QueueDownloadFile> mongoQueueDownloadFileManager = CreateMongoQueueDownloadFileManager(_xeConfig); MongoCollectionManager <DownloadLinkRef> mongoCurrentDownloadFileManager = MongoCollectionManager <DownloadLinkRef> .Create(_xeConfig.zXPathElement("MongoCurrentDownloadFile")); mongoCurrentDownloadFileManager.IdGenerator = new MongoIdGeneratorInt(mongoCurrentDownloadFileManager.GetCollection()); ProtectLink protectLink = null; //Debrider debrider = null; //if (!_useTestManager) // debrider = CreateDebrider(); //else // debrider = new DebriderAlldebridTest(); Debrider debrider = CreateDebrider(); DownloadManagerClientBase downloadManagerClient = CreateDownloadManagerClient(); UncompressQueueManager uncompressManager = CreateUncompressManager(); DownloadManager downloadManager = new DownloadManager(); downloadManager.DownloadManagerClient = downloadManagerClient; downloadManager.MongoDownloadedFileManager = mongoDownloadedFileManager; downloadManager.MongoQueueDownloadFileManager = mongoQueueDownloadFileManager; downloadManager.MongoCurrentDownloadFileManager = mongoCurrentDownloadFileManager; downloadManager.ProtectLink = protectLink; downloadManager.Debrider = debrider; downloadManager.UncompressManager = uncompressManager; return(downloadManager); }
public PrintFileManager(UncompressQueueManager uncompressManager) { _uncompressManager = uncompressManager; }
public UncompressQueueManager CreateUncompressManager() { UncompressQueueManager uncompressManager = new UncompressQueueManager(new SharpCompressManager()); //uncompressManager.ArchiveCompressDirectory = XmlConfig.CurrentConfig.Get("DownloadAutomateManager/UncompressManager/ArchiveCompressDirectory"); uncompressManager.ArchiveCompressDirectory = _xeConfig.zXPathValue("UncompressManager/ArchiveCompressDirectory"); //uncompressManager.ArchiveErrorCompressDirectory = XmlConfig.CurrentConfig.Get("DownloadAutomateManager/UncompressManager/ArchiveErrorCompressDirectory"); uncompressManager.ArchiveErrorCompressDirectory = _xeConfig.zXPathValue("UncompressManager/ArchiveErrorCompressDirectory"); return uncompressManager; }
public PrintFileManager(UncompressQueueManager uncompressManager) { _uncompressManager = uncompressManager; }