#include "Stdafx.h" namespace YaraSharp { YSReport::YSReport() { files = gcnew Dictionary^>(); } YSReport::~YSReport() { files->Clear(); delete files; files = nullptr; } void YSReport::AddReport(String^ file, String^ description) { if (!files->ContainsKey(file)) { files->Add(file, gcnew List()); } files[file]->Add(description); } void YSReport::MergeReports(YSReport^ report) { Dictionary^>^ reportFiles = report->Dump(); for each(KeyValuePair^> entry in reportFiles) { String^ file = entry.Key; for each(String^ description in entry.Value) { AddReport(file, description); } } } bool YSReport::IsEmpty() { return files->Keys->Count == 0 ? true : false; } List^ YSReport::GetFiles() { return gcnew List(files->Keys); } Dictionary^>^ YSReport::Dump() { return files; } }