コード例 #1
0
        /// <summary>
        /// Public constructor with required data
        /// </summary>
        /// <param name="type"></param>
        /// <param name="_metadata0"></param>
        public PersonRole(global::Jellyfin.Data.Enums.PersonRoleType type, global::Jellyfin.Data.Entities.Metadata _metadata0)
        {
            // NOTE: This class has one-to-one associations with PersonRole.
            // One-to-one associations are not validated in constructors since this causes a scenario where each one must be constructed before the other.

            this.Type = type;

            if (_metadata0 == null)
            {
                throw new ArgumentNullException(nameof(_metadata0));
            }
            _metadata0.PersonRoles.Add(this);

            this.Sources = new System.Collections.Generic.HashSet <global::Jellyfin.Data.Entities.MetadataProviderId>();

            Init();
        }
コード例 #2
0
 /// <summary>
 /// Static create function (for use in LINQ queries, etc.)
 /// </summary>
 /// <param name="type"></param>
 /// <param name="_metadata0"></param>
 public static PersonRole Create(global::Jellyfin.Data.Enums.PersonRoleType type, global::Jellyfin.Data.Entities.Metadata _metadata0)
 {
     return(new PersonRole(type, _metadata0));
 }
コード例 #3
0
 /// <summary>
 /// When provided in a partial class, allows value of Type to be changed before returning.
 /// </summary>
 partial void GetType(ref global::Jellyfin.Data.Enums.PersonRoleType result);
コード例 #4
0
 /// <summary>
 /// When provided in a partial class, allows value of Type to be changed before setting.
 /// </summary>
 partial void SetType(global::Jellyfin.Data.Enums.PersonRoleType oldValue, ref global::Jellyfin.Data.Enums.PersonRoleType newValue);