ChapterData.Duration as computed property

This commit is contained in:
Malte Rosenbjerg 2023-04-12 16:30:46 +02:00
parent 38789162eb
commit ba78512cb9

View file

@ -6,15 +6,13 @@ public class ChapterData
public TimeSpan Start { get; private set; }
public TimeSpan End { get; private set; }
public TimeSpan Duration { get; private set; }
public TimeSpan Duration => End - Start;
public ChapterData(string title, TimeSpan start, TimeSpan end)
{
Title = title;
Start = start;
End = end;
Duration = end - start;
}
}
}