Пример #1
0
        /// <summary>
        /// Public constructor with required data
        /// </summary>
        /// <param name="name"></param>
        /// <param name="_movie0"></param>
        /// <param name="_episode1"></param>
        /// <param name="_track2"></param>
        /// <param name="_customitem3"></param>
        /// <param name="_book4"></param>
        /// <param name="_photo5"></param>
        public Release(string name, global::Jellyfin.Data.Entities.Movie _movie0, global::Jellyfin.Data.Entities.Episode _episode1, global::Jellyfin.Data.Entities.Track _track2, global::Jellyfin.Data.Entities.CustomItem _customitem3, global::Jellyfin.Data.Entities.Book _book4, global::Jellyfin.Data.Entities.Photo _photo5)
        {
            if (string.IsNullOrEmpty(name))
            {
                throw new ArgumentNullException(nameof(name));
            }
            this.Name = name;

            if (_movie0 == null)
            {
                throw new ArgumentNullException(nameof(_movie0));
            }
            _movie0.Releases.Add(this);

            if (_episode1 == null)
            {
                throw new ArgumentNullException(nameof(_episode1));
            }
            _episode1.Releases.Add(this);

            if (_track2 == null)
            {
                throw new ArgumentNullException(nameof(_track2));
            }
            _track2.Releases.Add(this);

            if (_customitem3 == null)
            {
                throw new ArgumentNullException(nameof(_customitem3));
            }
            _customitem3.Releases.Add(this);

            if (_book4 == null)
            {
                throw new ArgumentNullException(nameof(_book4));
            }
            _book4.Releases.Add(this);

            if (_photo5 == null)
            {
                throw new ArgumentNullException(nameof(_photo5));
            }
            _photo5.Releases.Add(this);

            this.MediaFiles = new System.Collections.Generic.HashSet <global::Jellyfin.Data.Entities.MediaFile>();
            this.Chapters   = new System.Collections.Generic.HashSet <global::Jellyfin.Data.Entities.Chapter>();

            Init();
        }
Пример #2
0
 /// <summary>
 /// Static create function (for use in LINQ queries, etc.)
 /// </summary>
 /// <param name="title">The title or name of the object</param>
 /// <param name="language">ISO-639-3 3-character language codes</param>
 /// <param name="_customitem0"></param>
 public static CustomItemMetadata Create(string title, string language, DateTime dateadded, DateTime datemodified, global::Jellyfin.Data.Entities.CustomItem _customitem0)
 {
     return(new CustomItemMetadata(title, language, dateadded, datemodified, _customitem0));
 }
Пример #3
0
 /// <summary>
 /// Static create function (for use in LINQ queries, etc.)
 /// </summary>
 /// <param name="name"></param>
 /// <param name="_movie0"></param>
 /// <param name="_episode1"></param>
 /// <param name="_track2"></param>
 /// <param name="_customitem3"></param>
 /// <param name="_book4"></param>
 /// <param name="_photo5"></param>
 public static Release Create(string name, global::Jellyfin.Data.Entities.Movie _movie0, global::Jellyfin.Data.Entities.Episode _episode1, global::Jellyfin.Data.Entities.Track _track2, global::Jellyfin.Data.Entities.CustomItem _customitem3, global::Jellyfin.Data.Entities.Book _book4, global::Jellyfin.Data.Entities.Photo _photo5)
 {
     return(new Release(name, _movie0, _episode1, _track2, _customitem3, _book4, _photo5));
 }
Пример #4
0
        /// <summary>
        /// Public constructor with required data
        /// </summary>
        /// <param name="title">The title or name of the object</param>
        /// <param name="language">ISO-639-3 3-character language codes</param>
        /// <param name="_customitem0"></param>
        public CustomItemMetadata(string title, string language, DateTime dateadded, DateTime datemodified, global::Jellyfin.Data.Entities.CustomItem _customitem0)
        {
            if (string.IsNullOrEmpty(title))
            {
                throw new ArgumentNullException(nameof(title));
            }
            this.Title = title;

            if (string.IsNullOrEmpty(language))
            {
                throw new ArgumentNullException(nameof(language));
            }
            this.Language = language;

            if (_customitem0 == null)
            {
                throw new ArgumentNullException(nameof(_customitem0));
            }
            _customitem0.CustomItemMetadata.Add(this);


            Init();
        }