/// <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>(); }
/// <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>(); }