Пример #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Episode"/> class.
        /// </summary>
        /// <param name="podcastId">The podcast ID.</param>
        /// <param name="guid">The episode guid.</param>
        /// <param name="title">The episode title.</param>
        /// <param name="subtitle">The episode subtitle.</param>
        /// <param name="description">The episode description.</param>
        /// <param name="externalUrl">The episode external URL.</param>
        /// <param name="number">The episode number.</param>
        /// <param name="season">The episode season.</param>
        /// <param name="showNotes">The episode show notes.</param>
        /// <param name="authors">The episode authors.</param>
        /// <param name="explicit">A value that indicates whether the episode content is explicit.</param>
        /// <param name="coverImage">The episode cover image.</param>
        /// <param name="facebookImage">The episode Facebook image.</param>
        /// <param name="publicationType">The episode publication type.</param>
        /// <exception cref="ArgumentOutOfRangeException"><em>podcastId</em>, <em>number</em> or
        /// <em>season</em> is less then 1.</exception>
        /// <exception cref="System.ComponentModel.InvalidEnumArgumentException"><em>publicationType</em>
        /// is invalid enumeration.</exception>
        public Episode(long podcastId,
                       string guid,
                       string title,
                       string subtitle,
                       string description,
                       string externalUrl,
                       long number,
                       long season,
                       string showNotes,
                       string authors,
                       bool @explicit,
                       string coverImage,
                       string facebookImage,
                       EpisodePublicationType publicationType)
        {
            Precondition.IsGreater(podcastId, (long)0, nameof(podcastId));
            Precondition.IsGreater(number, (long)0, nameof(number));
            Precondition.IsGreater(season, (long)0, nameof(season));
            Precondition.IsValidEnum(publicationType, nameof(publicationType));

            PodcastId       = podcastId;
            Guid            = guid;
            Title           = title;
            Subtitle        = subtitle;
            Description     = description;
            ExternalUrl     = externalUrl;
            Number          = number;
            Season          = season;
            ShowNotes       = showNotes;
            Authors         = authors;
            Explicit        = @explicit;
            CoverImage      = coverImage;
            FacebookImage   = facebookImage;
            PublicationType = publicationType;
        }
Пример #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Podcast"/> class.
        /// </summary>
        /// <param name="category">The podcast category.</param>
        /// <param name="quality">The podcast quality.</param>
        /// <exception cref="System.ComponentModel.InvalidEnumArgumentException"><em>category</em>
        /// or <em>quality</em> is invalid enumeration.</exception>
        public Podcast(PodcastCategory category, PodcastQuality quality)
        {
            Precondition.IsValidEnum(category, nameof(category));
            Precondition.IsValidEnum(quality, nameof(quality));

            Category = category;
            Quality  = quality;
        }
Пример #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;
        }
Пример #4
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Podcast"/> class.
        /// </summary>
        /// <param name="category">The podcast category.</param>
        /// <param name="quality">The podcast quality.</param>
        /// <param name="subdomain">The podcast subdomain.</param>
        /// <param name="title">The podcast title.</param>
        /// <param name="subtitle">The podcast subtitle.</param>
        /// <param name="description">The podcast description.</param>
        /// <param name="introOutroFiles">The podcast intro/outro files.</param>
        /// <param name="language">The podcast language.</param>
        /// <param name="authors">The podcast authors.</param>
        /// <param name="coverImage">The podcast cover image.</param>
        /// <param name="websiteUrl">The podcast website URL.</param>
        /// <param name="ownerEmail">The owner email.</param>
        /// <param name="publicationType">The podcast publication type.</param>
        /// <param name="explicit">A value that indicates whether the podcast content is explicit.</param>
        /// <param name="flattrId">The Flatter ID.</param>
        /// <param name="twitter">The Twitter name.</param>
        /// <param name="facebook">The Facebook name.</param>
        /// <param name="copyrightText">The podcast copyright text.</param>
        /// <param name="feedItems">The number of feed items.</param>
        /// <param name="transcriptionsEnabled">A value that indicates whether the podcast transcription is enabled.</param>
        /// <param name="transcriptionLanguage">The podcast transcription language.</param>
        /// <param name="externalSiteUrl">The podcast external site URL.</param>
        /// <param name="domain">The podcast domain.</param>
        /// <exception cref="ArgumentOutOfRangeException"><em>feedItems</em></exception> is less
        /// then 1 or greater then 999999.
        /// <exception cref="System.ComponentModel.InvalidEnumArgumentException"><em>category</em>
        /// or <em>quality</em> is invalid enumeration.</exception>
        public Podcast(
            PodcastCategory category,
            PodcastQuality quality,
            string subdomain,
            string title,
            string subtitle,
            string description,
            List <ProductionFile> introOutroFiles,
            PodcastLanguage?language,
            string authors,
            string coverImage,
            string websiteUrl,
            string ownerEmail,
            PodcastPublicationType publicationType,
            bool @explicit,
            string flattrId,
            string twitter,
            string facebook,
            string copyrightText,
            int feedItems,
            bool transcriptionsEnabled,
            TranscriptionLanguage?transcriptionLanguage,
            string externalSiteUrl,
            string domain)
        {
            Precondition.IsValidEnum(category, nameof(category));
            Precondition.IsValidEnum(quality, nameof(quality));
            Precondition.IsBetween(feedItems, 1, 999999, nameof(feedItems));

            Category              = category;
            Quality               = quality;
            Subdomain             = subdomain;
            Title                 = title;
            Subtitle              = subtitle;
            Description           = description;
            IntroOutroFiles       = introOutroFiles;
            Language              = language;
            Authors               = authors;
            CoverImage            = coverImage;
            WebsiteUrl            = websiteUrl;
            OwnerEmail            = ownerEmail;
            PublicationType       = publicationType;
            Explicit              = @explicit;
            FlattrId              = flattrId;
            Twitter               = twitter;
            Facebook              = facebook;
            CopyrightText         = copyrightText;
            FeedItems             = feedItems;
            TranscriptionsEnabled = transcriptionsEnabled;
            TranscriptionLanguage = transcriptionLanguage;
            ExternalSiteUrl       = externalSiteUrl;
            Domain                = domain;
        }