示例#1
0
        public virtual IEnumerable <Artist> ArtistLinksOfType(ArtistLinkType linkType, LinkDirection direction, bool allowInheritance = false)
        {
            if (!ArtistHelper.CanHaveRelatedArtists(ArtistType, linkType, direction))
            {
                return(Enumerable.Empty <Artist>());
            }

            var result = (direction == LinkDirection.ManyToOne ? Groups : Members)
                         .Where(g => g.LinkType == linkType)
                         .Select(g => g.GetArtist(direction));

            // ReSharper disable PossibleMultipleEnumeration
            return(allowInheritance && BaseVoicebank != null && !result.Any()
                                ? BaseVoicebank.ArtistLinksOfType(linkType, direction, true)
                                : result);
            // ReSharper restore PossibleMultipleEnumeration
        }
示例#2
0
 /// <summary>
 /// Tests whether this artist has a specific artist as base voicebank.
 /// </summary>
 /// <param name="artist">Artist to be checked. Cannot be null.</param>
 /// <returns>True if <paramref name="artist"/> is a base voicebank of this artist. Otherwise false.</returns>
 public virtual bool HasBaseVoicebank(Artist artist)
 {
     return(BaseVoicebank != null && (BaseVoicebank.Equals(artist) || BaseVoicebank.HasBaseVoicebank(artist)));
 }