add function to determine whether entry is relevant

This commit is contained in:
Florian Stinglmayr 2022-11-25 18:06:19 +01:00
parent 32e5898b02
commit 027f8a892d

View File

@ -747,6 +747,17 @@ public class TransactionParser {
{ Events.SupercruiseEntry, new SupercruiseEntryParser() }, { Events.SupercruiseEntry, new SupercruiseEntryParser() },
}; };
public bool IsRelevant(string entry) {
return ParserParts.ContainsKey(entry);
}
public bool IsRelevant(Entry e) {
if (e.Event == null) {
return false;
}
return IsRelevant(e.Event);
}
public List<Transaction>? Parse(IEnumerable<Entry> entries) { public List<Transaction>? Parse(IEnumerable<Entry> entries) {
TransactionList transactions = new(); TransactionList transactions = new();
TransactionParserContext context = new(); TransactionParserContext context = new();