本文整理汇总了C#中Album.GetSongByTrackNum方法的典型用法代码示例。如果您正苦于以下问题:C# Album.GetSongByTrackNum方法的具体用法?C# Album.GetSongByTrackNum怎么用?C# Album.GetSongByTrackNum使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Album
的用法示例。
在下文中一共展示了Album.GetSongByTrackNum方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: NewTrack
private bool NewTrack(InspectedTrack inspectedTrack, int[] selectedSongIds, Album album) {
if (inspectedTrack.ExistingSong == null)
return true;
var albumTrack = album.GetSongByTrackNum(inspectedTrack.ImportedTrack.DiscNum, inspectedTrack.ImportedTrack.TrackNum);
if (albumTrack != null)
return false;
return !selectedSongIds.Contains(inspectedTrack.ExistingSong.Id);
}
示例2: InspectTrack
private InspectedTrack InspectTrack(ISession session, ImportedAlbumTrack importedTrack, IEnumerable<Artist> artists, Album album) {
var inspected = new InspectedTrack(importedTrack);
var existingTrack = album != null ? album.GetSongByTrackNum(importedTrack.DiscNum, importedTrack.TrackNum) : null;
var existingSong = existingTrack != null && existingTrack.Song != null ? existingTrack.Song
: FindSong(session, importedTrack.Title, artists);
if (existingSong != null)
inspected.ExistingSong = new SongContract(existingSong, PermissionContext.LanguagePreference);
inspected.Selected = existingTrack != null;
return inspected;
}