예제 #1
0
        private static SearchResult Search(string type, string key, string page, string size)
        {
            IMusic music;

            switch (type)
            {
            case "wy":
                music = new WyMusic();
                break;

            case "xm":
                music = new XmMusic();
                break;

            case "tt":
                music = new TtMusic();
                break;

            case "qq":
                music = new TxMusic();
                break;

            case "bd":
                music = new BdMusic();
                break;

            default:
                music = new AnyMusic();
                break;
            }
            return(music.SongSearch(key, Convert.ToInt32(page), Convert.ToInt32(size)));
        }
예제 #2
0
 private static SearchResult Search(string type, string key, string page, string size)
 {
     IMusic music;
     switch (type)
     {
         case "wy":
             music = new WyMusic();
             break;
         case "xm":
             music = new XmMusic();
             break;
         case "tt":
             music = new TtMusic();
             break;
         default:
             music = new AnyMusic();
             break;
     }
     return music.SongSearch(key, Convert.ToInt32(page), Convert.ToInt32(size));
 }