-
Notifications
You must be signed in to change notification settings - Fork 2
Plugins
Dominic Hock edited this page Apr 12, 2022
·
4 revisions
The IReportCollector
interface provides a single function public IEnumerable<Report> GatherReports()
which should return all reports gathered by the plugin.
public class SampleCollector : IReportCollector
{
public IEnumerable<Report> GatherReports()
{
var reports = new List<Report>();
reports.Add(new Report(){
SourceIpAddress = "127.0.0.1",
});
return reports;
}
}
The IReportProcessor
interface provides a single function public bool ProcessReport(Report report)
to process a single report.
public class SampleProcessor : IReportProcessor
{
public bool ProcessReport(Report report)
{
File.WriteAllText($"report_{report.SourceIpAddress}.txt", report.ToString());
return true;
}
}
Copyright © 2022 IT-Hock