コード例 #1
0
        public static void callback(AlertInformation ai)
        {
            Information info = new Information();

            NicoCommunity nc = new NicoCommunity();
            NicoCommunity.CommunityInfo ci = nc.GetCommunityInfo(ai.BroadcastId);

            StringBuilder sb = new StringBuilder();
            sb.Append(ai.BroadcastId).Append(",")
                .Append(ai.CasterId).Append(",")
                .Append(ai.ChannelId).Append("\t: ")
                .Append(ci.title);
            Console.WriteLine(sb);
            if (ci.title.IndexOf("雑談") != -1)
            {
                info.ci = ci;
                info.ai = ai;
                lock (obj)
                {
                    queue.Enqueue(info);
                }
            }
        }
コード例 #2
0
 /// <summary>
 /// プレスホルダー
 /// </summary>
 public static void OnAlertEventHandler(AlertInformation info)
 {
 }
コード例 #3
0
 /// <summary>
 /// アラートパーサー
 /// </summary>
 /// <param name="chat"></param>
 public static AlertInformation Parse(string chat)
 {
     AlertInformation info = new AlertInformation(
         XmlParse(chat, new AlertItems()));
     return info;
 }