This commit refactors the EventOccurrence parsing logic to utilize the EventOccurrenceParseGroup class, enhancing the organization of parsed occurrences by grouping them based on event definitions and optional section levels. The changes include updates to the EventOccurrenceParseResult, EventOccurrenceParser, and EventOccurrenceParserService to accommodate the new grouping structure. Additionally, tests are modified to reflect these changes, ensuring that the parsing functionality remains intact and accurate. This refactor improves data handling and aligns with the overall architecture of the application.
15 lines
378 B
C#
15 lines
378 B
C#
using Core.Entities;
|
|
using Core.Models;
|
|
using Core.Services;
|
|
|
|
namespace GoogleSheetsScheduleImport;
|
|
|
|
public static class ParserRoundTripValidator
|
|
{
|
|
public static EventOccurrenceParseResult Validate(string text, ICollection<EventDefinition> events)
|
|
{
|
|
var parser = new EventOccurrenceParserService(null);
|
|
return parser.ParseFromText(text, events);
|
|
}
|
|
}
|