public ScanWorker(List <FileScan> scans, DatabaseManager database, VirustotalClient client, BlockingCollection <string> queue, CancellationTokenSource token) { this.scans = scans; this.database = database; this.client = client; this.queue = queue; this.token = token; }
public ScanManager(VirustotalClient client, DatabaseManager database, Quarantine quarantine, List <FileScan> scans) { this.client = client; this.database = database; this.quarantine = quarantine; this.Scans = scans; this.quarantine.OnScanUpdated += scan => this.OnScanUpdated?.Invoke(scan); }
public App() { this.config = this.ParseConfig("config.json"); this.client = new VirustotalClient(this.config.ApiUrl, this.config.ApiKey); this.database = new DatabaseManager(this.config.DatabaseFile); this.quarantine = new Quarantine(this.config.QuarantinePath, this.config.QuarantineKey); this.scanManager = new ScanManager(this.client, this.database, this.quarantine, this.database.GetScans()); this.Exit += this.HandleExit; this.SetupDatabasePersist(); }
public MainWindow(ScanManager scanManager, DatabaseManager database, VirustotalClient client) { this.scanManager = scanManager; this.database = database; this.client = client; this.DataContext = this; this.InitializeComponent(); this.UpdateScans(this.scanManager.Scans); this.scanManager.OnScanCreated += this.OnScanCreated; this.scanManager.OnScanUpdated += this.OnScanUpdated; this.client.OnStatus += this.OnRequestStatus; }