mirror of
https://github.com/ckaczor/HomeMonitor.git
synced 2026-01-14 09:59:13 -05:00
15 lines
644 B
C#
15 lines
644 B
C#
using Ical.Net.CalendarComponents;
|
|
using Ical.Net.DataTypes;
|
|
using JetBrains.Annotations;
|
|
|
|
namespace ChrisKaczor.HomeMonitor.Calendar.Service.Models;
|
|
|
|
[PublicAPI]
|
|
public class CalendarEntry(Occurrence occurrence, bool isHoliday)
|
|
{
|
|
public string Summary { get; set; } = ((CalendarEvent)occurrence.Source).Summary;
|
|
public bool IsAllDay { get; set; } = ((CalendarEvent)occurrence.Source).IsAllDay;
|
|
public DateTimeOffset Start { get; set; } = occurrence.Period.StartTime.AsDateTimeOffset;
|
|
public DateTimeOffset End { get; set; } = occurrence.Period.EndTime.AsDateTimeOffset;
|
|
public bool IsHoliday { get; set; } = isHoliday;
|
|
} |