OakBot.Song.Song C# (CSharp) Method

Song() public method

public Song ( string link ) : System.ComponentModel
link string
return System.ComponentModel
        public Song(string link)
        {
            string tmpLink = link;
            if (Regex.IsMatch(link, "soundcloud", RegexOptions.IgnoreCase))
            {
                type = SongType.SOUNDCLOUD;
                songName = "Song from Soundcloud";
            }
            else if (Regex.IsMatch(link, @"^(https?\:\/\/)?(www\.)?(youtube\.com|youtu\.?be)\/.+$", RegexOptions.IgnoreCase))
            {
                type = SongType.YOUTUBE_LINK;
                Thread sn = new Thread(new ThreadStart(delegate ()
                {
                    songName = Utils.getTitleFromYouTube(link);
                    OnPropertyChanged(SongName);
                }));
                sn.Start();
            }
            else
            {
                type = SongType.INVALID;
            }
            Link = tmpLink;
        }