Ejemplo n.º 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ProductionFile"/> class.
        /// </summary>
        /// <param name="url">A fully qualified file URL.</param>
        /// <param name="contributorId">A contributor ID.</param>
        /// <param name="customName">A custom name for the track.</param>
        /// <exception cref="ArgumentException"><em>url</em> is empty or whitespace.</exception>
        /// <exception cref="ArgumentNullException"><em>url</em> is <strong>null</strong>.</exception>
        public ProductionFile(string url, int contributorId, string customName)
        {
            Precondition.IsNotNullOrWhiteSpace(url, nameof(url));

            Url           = url;
            ContributorId = contributorId;
            CustomName    = customName;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="SpeechRecognition"/> class.
        /// </summary>
        /// <param name="uuid">The speech recognition service UUID.</param>
        /// <param name="language">The language for the speech recognition.</param>
        /// <param name="keywords">Keywords for the speech recognition.</param>
        /// <exception cref="ArgumentException"><em>uuid</em> or <em>language</em> is an empty
        /// string or contains whitespace characters, or <em>keywords</em> is an empty array.</exception>
        /// <exception cref="ArgumentNullException"><em>uuid</em>, <em>language</em> or
        /// <em>keywords</em> is <strong>null</strong>.</exception>
        public SpeechRecognition(string uuid, string language, string[] keywords)
        {
            Precondition.IsNotNullOrWhiteSpace(uuid, nameof(uuid));
            Precondition.IsNotNullOrWhiteSpace(language, nameof(language));
            Precondition.IsNotNullOrEmpty(keywords, nameof(keywords));

            Uuid     = uuid;
            Language = language;
            Keywords = keywords;
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="MediaClip"/> class.
        /// </summary>
        /// <param name="episodeId">The episode ID.</param>
        /// <param name="fileFormat">The media clip file format.</param>
        /// <param name="url">The media clip URL.</param>
        /// <exception cref="ArgumentException"><em>url</em> is empty or whitespace.</exception>
        /// <exception cref="ArgumentNullException"><em>url</em> is <strong>null</strong>.</exception>
        /// <exception cref="ArgumentOutOfRangeException"><em>episodeId</em> is less then 1.</exception>
        /// <exception cref="System.ComponentModel.InvalidEnumArgumentException"><em>fileFormat</em>
        /// is invalid enumeration.</exception>
        public MediaClip(long episodeId, FileFormat fileFormat, string url)
        {
            Precondition.IsGreater(episodeId, (long)0, nameof(episodeId));
            Precondition.IsValidEnum(fileFormat, nameof(fileFormat));
            Precondition.IsNotNullOrWhiteSpace(url, nameof(url));

            EpisodeId  = episodeId;
            FileFormat = fileFormat;
            Url        = url;
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Chapter"/> class.
        /// </summary>
        /// <param name="start">Start time of the chapter as timestring (in HH:MM:SS.mmm, e.g.
        /// 00:02:35.500, 1:30, 3:25.5).</param>
        /// <param name="title">Title of the chapter.</param>
        /// <param name="url">URL with further information about the chapter.</param>
        /// <param name="image">Image with visual information about the chapter.</param>
        /// <exception cref="ArgumentException"><em>start</em> or <em>title</em> is empty or
        /// whitespace.</exception>
        /// <exception cref="ArgumentNullException"><em>start</em> or <em>title</em> is
        /// <strong>null</strong>.</exception>
        public Chapter(string start, string title, string url, string image)
        {
            Precondition.IsNotNullOrWhiteSpace(start, nameof(start));
            Precondition.IsNotNullOrWhiteSpace(title, nameof(title));

            Start = start;
            Title = title;
            Url   = url;
            Image = image;
        }
Ejemplo n.º 5
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;
        }
Ejemplo n.º 6
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Contributor"/> class.
        /// </summary>
        /// <param name="podcastId">The podcast ID.</param>
        /// <param name="name">The contributor name.</param>
        /// <param name="email">The contributor email address.</param>
        /// <param name="biography">The contributor biography.</param>
        /// <param name="avatarUrl">The contributor avatar URL.</param>
        /// <exception cref="ArgumentException"><em>name</em> is empty or whitespace.</exception>
        /// <exception cref="ArgumentNullException"><em>name</em> is <strong>null</strong>.</exception>
        /// <exception cref="ArgumentOutOfRangeException"><em>podcastId</em> is less then 1.</exception>
        public Contributor(long podcastId, string name, string email, string biography, string avatarUrl)
        {
            Precondition.IsGreater(podcastId, (long)0, nameof(podcastId));
            Precondition.IsNotNullOrWhiteSpace(name, nameof(name));

            PodcastId = podcastId;
            Name      = name;
            Email     = email;
            Biography = biography;
            AvatarUrl = avatarUrl;
        }
Ejemplo n.º 7
0
 public void IsNotNullOrWhiteSpace_Throws_ArgumentWhiteSpaceException(Culture culture, string value, string parameter, string message, string expectedParameter, string expectedMessage)
 {
     AssertThrowsException <ArgumentWhiteSpaceException>(culture, () => Precondition.IsNotNullOrWhiteSpace(value, parameter, null, message), expectedParameter, expectedMessage, null);
 }
Ejemplo n.º 8
0
 public void IsNotNullOrWhiteSpace_Throws_Nothing(string value, string parameter, string message)
 {
     Assert.That(() => Precondition.IsNotNullOrWhiteSpace(value, parameter, message, message), Throws.Nothing);
 }
Ejemplo n.º 9
0
 public void IsNotNullOrWhiteSpace_Throws_Nothing(string value)
 {
     Assert.That(() => Precondition.IsNotNullOrWhiteSpace(value), Throws.Nothing);
 }
Ejemplo n.º 10
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Production"/> class.
        /// </summary>
        /// <param name="presetUuid">The preset UUID.</param>
        /// <exception cref="ArgumentException"><em>presetUuid</em> is empty or whitespace.</exception>
        /// <exception cref="ArgumentNullException"><em>presetUuid</em> is <strong>null</strong>.</exception>
        public Production(string presetUuid)
        {
            Precondition.IsNotNullOrWhiteSpace(presetUuid, nameof(presetUuid));

            Preset = presetUuid;
        }
Ejemplo n.º 11
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Preset"/> class.
        /// </summary>
        /// <param name="presetName">The preset name.</param>
        /// <exception cref="ArgumentException"><em>presetName</em> is empty or whitespace.</exception>
        /// <exception cref="ArgumentNullException"><em>presetName</em> is <strong>null</strong>.</exception>
        public Preset(string presetName)
        {
            Precondition.IsNotNullOrWhiteSpace(presetName, nameof(presetName));

            PresetName = presetName;
        }
Ejemplo n.º 12
0
        /// <summary>
        /// Initializes a new instance of the <see cref="OutgoingService"/> class.
        /// </summary>
        /// <param name="uuid">The service UUID.</param>
        /// <exception cref="ArgumentException"><em>uuid</em> is empty or whitespace.</exception>
        /// <exception cref="ArgumentNullException"><em>uuid</em> is <strong>null</strong>.</exception>
        public OutgoingService(string uuid)
        {
            Precondition.IsNotNullOrWhiteSpace(uuid, nameof(uuid));

            Uuid = uuid;
        }