Files
TimetableDesigner/TimetableDesigner.Core/TimetableTemplate.cs

55 lines
1.0 KiB
C#
Raw Normal View History

2023-03-12 12:32:26 +01:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace TimetableDesigner.Core
{
[Serializable]
public class TimetableTemplate
{
#region FIELDS
private List<TimetableDay> _days;
2023-03-12 17:52:17 +01:00
private TimetableSpanCollection _slots;
2023-03-12 12:32:26 +01:00
#endregion
#region PROPERTIES
public IEnumerable<TimetableDay> Days => _days;
2023-03-12 17:52:17 +01:00
public IEnumerable<TimetableSpan> Slots => _slots;
2023-03-12 12:32:26 +01:00
#endregion
#region CONSTRUCTORS
public TimetableTemplate()
{
_days = new List<TimetableDay>();
2023-03-12 17:52:17 +01:00
_slots = new TimetableSpanCollection();
2023-03-12 12:32:26 +01:00
}
#endregion
#region PUBLIC METHODS
2023-03-12 17:52:17 +01:00
public void AddDay(TimetableDay name) => _days.Add(name);
2023-03-12 12:32:26 +01:00
2023-03-12 17:52:17 +01:00
public bool RemoveDay(TimetableDay day) => _days.Remove(day);
2023-03-12 12:32:26 +01:00
2023-03-12 17:52:17 +01:00
public void AddSlot(TimetableSpan slot) => _slots.Add(slot);
2023-03-12 12:32:26 +01:00
2023-03-12 17:52:17 +01:00
public bool RemoveSlot(TimetableSpan slot) => _slots.Remove(slot);
2023-03-12 12:32:26 +01:00
#endregion
}
}