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); } } }
/// <summary> /// プレスホルダー /// </summary> public static void OnAlertEventHandler(AlertInformation info) { }
/// <summary> /// アラートパーサー /// </summary> /// <param name="chat"></param> public static AlertInformation Parse(string chat) { AlertInformation info = new AlertInformation( XmlParse(chat, new AlertItems())); return info; }