예제 #1
0
파일: PersonRole.cs 프로젝트: ypid/jellyfin
 /// <summary>
 /// Initializes a new instance of the <see cref="PersonRole"/> class.
 /// </summary>
 /// <param name="type">The role type.</param>
 /// <param name="person">The person.</param>
 public PersonRole(PersonRoleType type, Person person)
 {
     Type    = type;
     Person  = person;
     Artwork = new HashSet <Artwork>();
     Sources = new HashSet <MetadataProviderId>();
 }
예제 #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="PersonRole"/> class.
        /// </summary>
        /// <param name="type">The role type.</param>
        /// <param name="itemMetadata">The metadata.</param>
        public PersonRole(PersonRoleType type, ItemMetadata itemMetadata)
        {
            Type = type;

            if (itemMetadata == null)
            {
                throw new ArgumentNullException(nameof(itemMetadata));
            }

            itemMetadata.PersonRoles.Add(this);

            Sources = new HashSet <MetadataProviderId>();
        }