Beispiel #1
0
 public ChannelHistory(YP yp, string[] data)
 {
     int i = 0;
     //date = data[i++];
     //time_from = data[i++];
     //time_to = data[i++];
     //channel_id = data[i++];
     yp_id = yp.yp_id;
     channel_name = data[i++];
     stream_id = data[i++];
     tip = data[i++];
     contact_url = data[i++];
     genre = data[i++];
     detail = data[i++];
     listener = data[i++];
     relay = data[i++];
     bitrate = data[i++];
     stream_type = data[i++];
     artist = data[i++];
     album = data[i++];
     title = data[i++];
     url = data[i++];
     encoded_name = data[i++];
     time = data[i++];
     alt = data[i++];
     comment = data[i++];
     direct = data[i++];
     //update_time = data[i++];
 }
Beispiel #2
0
        /// <summary>
        /// YP情報を解析する
        /// </summary>
        private List<ChannelHistory> analyzeYPText(YP yp, string html)
        {
            string[] indexText = html.Split(new String[] { "\n" }, StringSplitOptions.None);
            List<ChannelHistory> channelList = new List<ChannelHistory>();

            foreach (string line in indexText)
            {
                string[] element = line.Split(new String[] { "<>" }, StringSplitOptions.None);
                if (element.Length != 19)
                {
                    continue;
                }
                ChannelHistory channel = new ChannelHistory(yp, element);
                channelList.Add(channel);
            }

            return channelList;
        }