From 6cd7e11c1020c40f223dee70a7dd7b2c66296918 Mon Sep 17 00:00:00 2001 From: danvolchek Date: Sat, 9 Mar 2019 18:20:02 -0600 Subject: add log sections implementation --- src/SMAPI.Web/Framework/LogParsing/Models/LogMessage.cs | 6 ++++++ src/SMAPI.Web/Framework/LogParsing/Models/LogSection.cs | 15 +++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 src/SMAPI.Web/Framework/LogParsing/Models/LogSection.cs (limited to 'src/SMAPI.Web/Framework/LogParsing/Models') diff --git a/src/SMAPI.Web/Framework/LogParsing/Models/LogMessage.cs b/src/SMAPI.Web/Framework/LogParsing/Models/LogMessage.cs index baeac83c..ecca0b5b 100644 --- a/src/SMAPI.Web/Framework/LogParsing/Models/LogMessage.cs +++ b/src/SMAPI.Web/Framework/LogParsing/Models/LogMessage.cs @@ -20,5 +20,11 @@ namespace StardewModdingAPI.Web.Framework.LogParsing.Models /// The number of times this message was repeated consecutively. public int Repeated { get; set; } + + /// The section that this log message belongs too. + public LogSection? Section { get; set; } + + /// Whether this message is the first one of it's section. + public bool IsStartOfSection { get; set; } } } diff --git a/src/SMAPI.Web/Framework/LogParsing/Models/LogSection.cs b/src/SMAPI.Web/Framework/LogParsing/Models/LogSection.cs new file mode 100644 index 00000000..218d546c --- /dev/null +++ b/src/SMAPI.Web/Framework/LogParsing/Models/LogSection.cs @@ -0,0 +1,15 @@ +namespace StardewModdingAPI.Web.Framework.LogParsing.Models +{ + /// The different sections of a log. + public enum LogSection + { + /// The list of mods the user has. + ModsList, + + /// The list of content packs the user has. + ContentPackList, + + /// The list of mod updates SMAPI has found. + ModUpdateList + } +} -- cgit