Exemplo n.º 1
0
 /// <summary>
 /// Create Properties Json.
 /// </summary>
 /// <param name="fileName">File name of the current media content </param>
 /// <param name="title">Media title </param>
 /// <param name="genre">Media genre </param>
 /// <param name="language">Media language </param>
 /// <param name="year">Media year </param>
 /// <param name="cast">Media cast. Separate each name with commas </param>
 /// <param name="director">Media director or directors. Separate each value with commas </param>
 /// <param name="owner">Media's content owner </param>
 /// <param name="duration">Length of the media in seconds </param>
 /// <param name="parental">Recommended viewing age (All,+13,+18,Adult) </param>
 /// <param name="price">Purchase price on the website </param>
 /// <param name="rating">Average value on your user's perception on the content quality, performance... </param>
 /// <param name="audioType">Media file type of audio (Mono, Stereo, Dolby,…) </param>
 /// <param name="audioChannels">Number of media file channels (1, 5.1, …) </param>
 /// <param name="contentId">Internal ID for the media </param>
 /// <param name="transactionType">Rent: Media for rental Subscription: Media which has been acquired as part of a subscription EST (Electronic Sell Through): Media purchased Free: Media which has no economical transaction </param>
 /// <param name="quality">HD or SD </param>
 /// <param name="contentType">Trailer, Episode, Movie </param>
 /// <param name="manufacturer">Manufacturer of the device</param>
 /// <param name="deviceType">TV, Blu-Ray, Set-Top Box </param>
 /// <param name="deviceYear">Fabrication year </param>
 /// <param name="firmware">Firmware version</param>
 /// <returns>Json</returns>
 public static string CreateJsonProperties(
     string fileName,
     string title,
     string genre,
     string language,
     string year,
     string cast,
     string director,
     string owner,
     long duration,
     Parental parental,
     double price,
     string rating,
     AudioType audioType,
     double audioChannels,
     string contentId,
     TransactionType transactionType,
     Quality quality,
     ContentType contentType,
     string manufacturer,
     string deviceType,
     string deviceYear,
     string firmware)
 {
     return(String.Format(
                @"{{""filename"":""{0}"",""content_metadata"":{{""title"":""{1}"",""genre"":""{2}"",""language"":""{3}"",""year"":""{4}"",""cast"":""{5}"",""director"":""{6}"",""owner"":""{7}"",""duration"":""{8}"",""parental"":""{9}"",""price"":""{10}"",""rating"":""{11}"",""audioType"":""{12}"",""audioChannels"":""{13}"",""duration"":""{14}""}},""quality"":""{15}"",""content_type"":""{16}"",""transaction_type"":""{17}"",""device"":{{""manufacturer"":""{18}"",""type"":""{19}"",""year"":""{20}"",""firmware"":""{21}""}},}}",
                fileName, title, genre, language, year, cast, director, owner, duration, parental, price, rating, audioType, audioChannels, duration, quality, contentType, transactionType, manufacturer, deviceType, deviceYear, firmware));
 }
Exemplo n.º 2
0
 public Name(string description, string ptDescription, WordType wordType, Number number, string example, Genre genre,
             Article article, Parental parental, string imagePath) :
     base(description, ptDescription, wordType, number, example, genre)
 {
     _article    = article;
     _parental   = parental;
     _imagePath  = imagePath;
     _otherForms = new List <OtherForms>();
 }
Exemplo n.º 3
0
 public Name(string description, string ptDescription, WordType wordType,
             List <Word> relatedWords, Number number, string example, Genre genre,
             Article article, Parental parental, List <OtherForms> otherForms, string imagePath) :
     base(description, ptDescription, wordType, relatedWords, number, example, genre)
 {
     _article    = article;
     _parental   = parental;
     _otherForms = otherForms;
     _imagePath  = imagePath;
 }
Exemplo n.º 4
0
 public Name(string description, string ptDescription, WordType wordType, Number number, string example, Genre genre,
             Article article, Parental parental, List <OtherForms> otherForms, Name father,
             Name mother, Name child, string imagePath) :
     base(description, ptDescription, wordType, number, example, genre)
 {
     _article    = article;
     _parental   = parental;
     _otherForms = otherForms;
     _fatherName = father.Description;
     _motherName = mother.Description;
     _childName  = child.Description;
     _imagePath  = imagePath;
 }
Exemplo n.º 5
0
 /// <summary>
 /// Create Properties Json.
 /// </summary>
 /// <param name="fileName">File name of the current media content </param>
 /// <param name="title">Media title </param>
 /// <param name="genre">Media genre </param>
 /// <param name="language">Media language </param>
 /// <param name="year">Media year </param>
 /// <param name="cast">Media cast. Separate each name with commas </param>
 /// <param name="director">Media director or directors. Separate each value with commas </param>
 /// <param name="owner">Media's content owner </param>
 /// <param name="duration">Length of the media in seconds </param>
 /// <param name="parental">Recommended viewing age (All,+13,+18,Adult) </param>
 /// <param name="price">Purchase price on the website </param>
 /// <param name="rating">Average value on your user's perception on the content quality, performance... </param>
 /// <param name="audioType">Media file type of audio (Mono, Stereo, Dolby,…) </param>
 /// <param name="audioChannels">Number of media file channels (1, 5.1, …) </param>
 /// <param name="contentId">Internal ID for the media </param>
 /// <param name="transactionType">Rent: Media for rental Subscription: Media which has been acquired as part of a subscription EST (Electronic Sell Through): Media purchased Free: Media which has no economical transaction </param>
 /// <param name="quality">HD or SD </param>
 /// <param name="contentType">Trailer, Episode, Movie </param>
 /// <param name="manufacturer">Manufacturer of the device</param>
 /// <param name="deviceType">TV, Blu-Ray, Set-Top Box </param>
 /// <param name="deviceYear">Fabrication year </param>
 /// <param name="firmware">Firmware version</param>
 /// <returns>Json</returns>
 public static string CreateProperties(
     string fileName,
     string title,
     string genre,
     string language,
     string year,
     string cast,
     string director,
     string owner,
     long duration,
     Parental parental,
     double price,
     string rating,
     AudioType audioType,
     double audioChannels,
     string contentId,
     TransactionType transactionType,
     Quality quality,
     ContentType contentType,
     string manufacturer,
     string deviceType,
     string deviceYear,
     string firmware)
 {
     return(StartApi.CreateJsonProperties(
                fileName,
                title,
                genre,
                language,
                year,
                cast,
                director,
                owner,
                duration,
                parental,
                price,
                rating,
                audioType,
                audioChannels,
                contentId,
                transactionType,
                quality,
                contentType,
                manufacturer,
                deviceType,
                deviceYear,
                firmware));
 }
Exemplo n.º 6
0
 /// <summary>
 /// Create Properties Json.
 /// </summary>
 /// <param name="fileName">File name of the current media content </param>
 /// <param name="title">Media title </param>
 /// <param name="genre">Media genre </param>
 /// <param name="language">Media language </param>
 /// <param name="year">Media year </param>
 /// <param name="cast">Media cast. Separate each name with commas </param>
 /// <param name="director">Media director or directors. Separate each value with commas </param>
 /// <param name="owner">Media's content owner </param>
 /// <param name="duration">Length of the media in seconds </param>
 /// <param name="parental">Recommended viewing age (All,+13,+18,Adult) </param>
 /// <param name="price">Purchase price on the website </param>
 /// <param name="rating">Average value on your user's perception on the content quality, performance... </param>
 /// <param name="audioType">Media file type of audio (Mono, Stereo, Dolby,…) </param>
 /// <param name="audioChannels">Number of media file channels (1, 5.1, …) </param>
 /// <param name="contentId">Internal ID for the media </param>
 /// <param name="transactionType">Rent: Media for rental Subscription: Media which has been acquired as part of a subscription EST (Electronic Sell Through): Media purchased Free: Media which has no economical transaction </param>
 /// <param name="quality">HD or SD </param>
 /// <param name="contentType">Trailer, Episode, Movie </param>
 /// <param name="manufacturer">Manufacturer of the device</param>
 /// <param name="deviceType">TV, Blu-Ray, Set-Top Box </param>
 /// <param name="deviceYear">Fabrication year </param>
 /// <param name="firmware">Firmware version</param>
 /// <returns>Json</returns>
 public static string CreateJsonProperties(
     string fileName,
     string title,
     string genre,
     string language,
     string year,
     string cast,
     string director,
     string owner,
     long duration,
     Parental parental,
     double price,
     string rating,
     AudioType audioType,
     double audioChannels,
     string contentId,
     TransactionType transactionType,
     Quality quality,
     ContentType contentType,
     string manufacturer,
     string deviceType,
     string deviceYear,
     string firmware)
 {
     return String.Format(
         @"{{""filename"":""{0}"",""content_metadata"":{{""title"":""{1}"",""genre"":""{2}"",""language"":""{3}"",""year"":""{4}"",""cast"":""{5}"",""director"":""{6}"",""owner"":""{7}"",""duration"":""{8}"",""parental"":""{9}"",""price"":""{10}"",""rating"":""{11}"",""audioType"":""{12}"",""audioChannels"":""{13}"",""duration"":""{14}""}},""quality"":""{15}"",""content_type"":""{16}"",""transaction_type"":""{17}"",""device"":{{""manufacturer"":""{18}"",""type"":""{19}"",""year"":""{20}"",""firmware"":""{21}""}},}}",
                fileName, title, genre, language, year, cast, director, owner, duration, parental, price, rating, audioType, audioChannels, duration, quality, contentType, transactionType, manufacturer, deviceType, deviceYear, firmware);
 }
Exemplo n.º 7
0
        public object Convert(object value, Type targetType, object parameter, string language)
        {
            switch ((string)parameter.ToString())
            {
            case "wordtype":

                WordType wordType = (WordType)value;

                switch (wordType)
                {
                case WordType.Article:
                    return("Artikel");

                case WordType.Name:
                    return("Name");

                case WordType.Verb:
                    return("Verb");
                }

                break;

            case "genre":

                Genre genre = (Genre)value;

                switch (genre)
                {
                case Genre.Female:
                    return("Weiblich");

                case Genre.Male:
                    return("Männlich");

                case Genre.Neuter:
                    return("Neutrum");
                }

                break;

            case "number":

                Number number = (Number)value;

                switch (number.ToString())
                {
                case "Singular":
                    return("Einzahl");

                case "Plural":
                    return("Mehrzahl");
                }

                break;

            case "parental":

                Parental parental = (Parental)value;

                switch (parental)
                {
                case Parental.Mother:
                    return("Mutter");

                case Parental.Father:
                    return("Vater");

                case Parental.Child:
                    return("Kind");

                default: return("");
                }

            case "articletype":

                Case articletype = (Case)value;

                switch (articletype)
                {
                case Case.Nominative:
                    return("Nominativ (Active) Wer? Was?");

                case Case.Accusative:
                    return("Akkusativ (Passive) Wen? Was?");

                case Case.Dative:
                    return("Dativ (2nd Active) Wem?");

                case Case.Genitive:
                    return("Genitiv (Wessen?)");

                default: return("");
                }
            }

            return(null);
        }
Exemplo n.º 8
0
 /// <summary>
 /// Create Properties Json.
 /// </summary>
 /// <param name="fileName">File name of the current media content </param>
 /// <param name="title">Media title </param>
 /// <param name="genre">Media genre </param>
 /// <param name="language">Media language </param>
 /// <param name="year">Media year </param>
 /// <param name="cast">Media cast. Separate each name with commas </param>
 /// <param name="director">Media director or directors. Separate each value with commas </param>
 /// <param name="owner">Media's content owner </param>
 /// <param name="duration">Length of the media in seconds </param>
 /// <param name="parental">Recommended viewing age (All,+13,+18,Adult) </param>
 /// <param name="price">Purchase price on the website </param>
 /// <param name="rating">Average value on your user's perception on the content quality, performance... </param>
 /// <param name="audioType">Media file type of audio (Mono, Stereo, Dolby,…) </param>
 /// <param name="audioChannels">Number of media file channels (1, 5.1, …) </param>
 /// <param name="contentId">Internal ID for the media </param>
 /// <param name="transactionType">Rent: Media for rental Subscription: Media which has been acquired as part of a subscription EST (Electronic Sell Through): Media purchased Free: Media which has no economical transaction </param>
 /// <param name="quality">HD or SD </param>
 /// <param name="contentType">Trailer, Episode, Movie </param>
 /// <param name="manufacturer">Manufacturer of the device</param>
 /// <param name="deviceType">TV, Blu-Ray, Set-Top Box </param>
 /// <param name="deviceYear">Fabrication year </param>
 /// <param name="firmware">Firmware version</param>
 /// <returns>Json</returns>
 public static string CreateProperties(
     string fileName,
     string title,
     string genre,
     string language,
     string year,
     string cast,
     string director,
     string owner,
     long duration,
     Parental parental,
     double price,
     string rating,
     AudioType audioType,
     double audioChannels,
     string contentId,
     TransactionType transactionType,
     Quality quality,
     ContentType contentType,
     string manufacturer,
     string deviceType,
     string deviceYear,
     string firmware)
 {
     return StartApi.CreateJsonProperties(
         fileName,
         title,
         genre,
         language,
         year,
         cast,
         director,
         owner,
         duration,
         parental,
         price,
         rating,
         audioType,
         audioChannels,
         contentId,
         transactionType,
         quality,
         contentType,
         manufacturer,
         deviceType,
         deviceYear,
         firmware);
 }