Beispiel #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ChapterMark"/> class.
        /// </summary>
        /// <param name="episodeId">The episode ID.</param>
        /// <param name="title">The chapter mark title.</param>
        /// <param name="startTime">The chapter mark start time.</param>
        /// <param name="url">URL to an external resource related to the chapter mark.</param>
        /// <exception cref="ArgumentException"><em>title</em> is empty or whitespace.</exception>
        /// <exception cref="ArgumentNullException"><em>title</em> is <strong>null</strong>.</exception>
        /// <exception cref="ArgumentOutOfRangeException"><em>episodeId</em> is less then 1, or
        /// <em>startTime</em> is less then 00:00:00.</exception>
        public ChapterMark(long episodeId, string title, TimeSpan startTime, string url)
        {
            Precondition.IsGreater(episodeId, (long)0, nameof(episodeId));
            Precondition.IsNotNullOrWhiteSpace(title, nameof(title));
            Precondition.IsGreaterOrEqual(startTime, TimeSpan.Zero, nameof(startTime));

            EpisodeId = episodeId;
            Title     = title;
            StartTime = startTime;
            Url       = url;
        }