Esempio n. 1
0
        public bool Eval(SongViewModel song)
        {
            switch (EvalType)
            {
            case MemberEvalType.Playlist:
                PlaylistViewModel playlist = LibraryViewModel.Current.LookupPlaylistById(Target);
                if (playlist == null)
                {
                    return(false);
                }
                return(playlist.ContainsSong(song));

            case MemberEvalType.Mix:
                MixViewModel mix = LibraryViewModel.Current.LookupMixById(Target);
                if (mix == null)
                {
                    return(false);
                }
                return(mix.ContainsSong(song));

            default:
                DebugHelper.Alert(new CallerInfo(), "Unexpected MemberEvalType: {0}", EvalType);
                return(false);
            }
        }