Example #1
0
        /// <summary>
        /// 生成 <see cref="Share"/> class 的新实例。
        /// </summary>
        /// <param name="song">歌曲</param>
        /// <param name="channel">频道</param>
        /// <param name="site">网站</param>
        public Share(Song song, Channel channel, Sites site)
        {
            if (song == null)
            {
                throw new ArgumentNullException("song");
            }
            if (channel == null)
            {
                throw new ArgumentNullException("channel");
            }
            Song    = song;
            Channel = channel;
            Site    = site;

            _songInfo         = ShareSongInfo.GetInfo(song, channel);
            Text              = GetShareText(_songInfo.SongName, _songInfo.ArtistName, _songInfo.ChannelName);
            TextWithoutSource = GetShareText(_songInfo.SongName, _songInfo.ArtistName, _songInfo.ChannelName, false);
        }
Example #2
0
        /// <summary>
        /// 生成 <see cref="Share"/> class 的新实例。
        /// </summary>
        /// <param name="song">歌曲</param>
        /// <param name="channel">频道</param>
        /// <param name="site">网站</param>
        public Share(Song song, Channel channel, Sites site)
        {
            if (song == null)
                throw new ArgumentNullException("song");
            if (channel == null)
                throw new ArgumentNullException("channel");
            Song = song;
            Channel = channel;
            Site = site;

            _songInfo = ShareSongInfo.GetInfo(song, channel);
            Text = GetShareText(_songInfo.SongName, _songInfo.ArtistName, _songInfo.ChannelName);
            TextWithoutSource = GetShareText(_songInfo.SongName, _songInfo.ArtistName, _songInfo.ChannelName, false);
        }