c462ed4561
Added new event definitions for "Meet the Candidates", "Chapter Officer Meeting", "Voting Delegate Meeting", and "Social Gathering". Updated the EventOccurrenceParser to handle these new event types and modified related services and views to accommodate the changes. Improved test coverage for the new event definitions and ensured proper parsing and display in the calendar components.
39 lines
1.3 KiB
C#
39 lines
1.3 KiB
C#
using Core.Entities;
|
|
|
|
namespace Core.Models;
|
|
|
|
/// <summary>
|
|
/// Result of parsing event occurrence text data.
|
|
/// Contains parsed occurrences, errors, and warnings.
|
|
/// </summary>
|
|
public class EventOccurrenceParseResult
|
|
{
|
|
/// <summary>
|
|
/// Dictionary of parsed event occurrences, keyed by EventDefinition.
|
|
/// For special events (GeneralSchedule, MeetTheCandidates, ChapterOfficerMeeting, VotingDelegateMeeting, SocialGathering),
|
|
/// the EventDefinition key will be the static instance.
|
|
/// </summary>
|
|
public IDictionary<EventDefinition, List<EventOccurrence>> Occurrences { get; set; } = new Dictionary<EventDefinition, List<EventOccurrence>>();
|
|
|
|
/// <summary>
|
|
/// List of parsing errors (critical issues that prevented parsing).
|
|
/// </summary>
|
|
public List<string> Errors { get; set; } = new();
|
|
|
|
/// <summary>
|
|
/// List of parsing warnings (non-critical issues that occurred during parsing).
|
|
/// </summary>
|
|
public List<string> Warnings { get; set; } = new();
|
|
|
|
/// <summary>
|
|
/// Total number of event occurrences successfully parsed.
|
|
/// </summary>
|
|
public int TotalParsed => Occurrences.Values.Sum(list => list.Count);
|
|
|
|
/// <summary>
|
|
/// Indicates whether parsing was successful (no errors).
|
|
/// </summary>
|
|
public bool IsSuccess => Errors.Count == 0;
|
|
}
|
|
|