mirror of
https://github.com/ckaczor/HomeMonitor.git
synced 2026-06-15 09:45:07 -04:00
Add another national day source since DOTY is broken
This commit is contained in:
31
Calendar/Service/Models/NationalDay.cs
Normal file
31
Calendar/Service/Models/NationalDay.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
using JetBrains.Annotations;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
namespace ChrisKaczor.HomeMonitor.Calendar.Service.Models;
|
||||
|
||||
[PublicAPI]
|
||||
public class NationalDay
|
||||
{
|
||||
public required string Name { get; set; }
|
||||
public required string Url { get; set; }
|
||||
public required string Excerpt { get; set; }
|
||||
public required string Type { get; set; }
|
||||
|
||||
[SetsRequiredMembers]
|
||||
public NationalDay(HolidayCalendar.Item item)
|
||||
{
|
||||
Name = item.Name;
|
||||
Url = item.Url;
|
||||
Excerpt = item.Excerpt;
|
||||
Type = item.Type;
|
||||
}
|
||||
|
||||
[SetsRequiredMembers]
|
||||
public NationalDay(DaysOfTheYear.Entry entry)
|
||||
{
|
||||
Name = entry.Name;
|
||||
Url = entry.Url;
|
||||
Excerpt = entry.Excerpt;
|
||||
Type = entry.Type;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user