mirror of
https://github.com/ckaczor/HomeMonitor.git
synced 2026-01-13 17:22:54 -05:00
Replace calendar service with new .NET version
This commit is contained in:
13
Calendar/Service/Models/CalendarEntry.cs
Normal file
13
Calendar/Service/Models/CalendarEntry.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using Ical.Net.CalendarComponents;
|
||||
using Ical.Net.DataTypes;
|
||||
using JetBrains.Annotations;
|
||||
|
||||
namespace ChrisKaczor.HomeMonitor.Calendar.Service.Models;
|
||||
|
||||
[PublicAPI]
|
||||
public class CalendarEntry(Occurrence occurrence)
|
||||
{
|
||||
public string Summary { get; set; } = ((CalendarEvent)occurrence.Source).Summary;
|
||||
public DateTimeOffset Start { get; set; } = occurrence.Period.StartTime.AsUtc;
|
||||
public DateTimeOffset End { get; set; } = occurrence.Period.EndTime.AsUtc;
|
||||
}
|
||||
Reference in New Issue
Block a user