Example #1
0
 /// <summary>
 /// Static create function (for use in LINQ queries, etc.)
 /// </summary>
 /// <param name="_collection0"></param>
 /// <param name="_collectionitem1"></param>
 /// <param name="_collectionitem2"></param>
 public static CollectionItem Create(global::Jellyfin.Data.Entities.Collection _collection0, global::Jellyfin.Data.Entities.CollectionItem _collectionitem1, global::Jellyfin.Data.Entities.CollectionItem _collectionitem2)
 {
     return(new CollectionItem(_collection0, _collectionitem1, _collectionitem2));
 }
Example #2
0
        /// <summary>
        /// Public constructor with required data
        /// </summary>
        /// <param name="_collection0"></param>
        /// <param name="_collectionitem1"></param>
        /// <param name="_collectionitem2"></param>
        public CollectionItem(global::Jellyfin.Data.Entities.Collection _collection0, global::Jellyfin.Data.Entities.CollectionItem _collectionitem1, global::Jellyfin.Data.Entities.CollectionItem _collectionitem2)
        {
            // NOTE: This class has one-to-one associations with CollectionItem.
            // One-to-one associations are not validated in constructors since this causes a scenario where each one must be constructed before the other.

            if (_collection0 == null)
            {
                throw new ArgumentNullException(nameof(_collection0));
            }
            _collection0.CollectionItem.Add(this);

            if (_collectionitem1 == null)
            {
                throw new ArgumentNullException(nameof(_collectionitem1));
            }
            _collectionitem1.Next = this;

            if (_collectionitem2 == null)
            {
                throw new ArgumentNullException(nameof(_collectionitem2));
            }
            _collectionitem2.Previous = this;


            Init();
        }