private void ExportWhiteListToCsv() { var list = Whitelist.Cast <object>().ToList(); var exportAction = new CsvImportAndExport(); exportAction.CsvExport <WhitelistMap>(list, "Whitelist.csv"); }
private async Task SaveWhiteListToCsv() { var list = Whitelist.Cast <object>().ToList(); var writeCsv = new ReadAndWriteCsv("Whitelist.csv"); await Task.Run(() => writeCsv.WriteRecordsToCsv <WhitelistMap>(list)); }