日期:2014-05-17 浏览次数:20898 次
DoServerHandler doServer = new DoServerHandler(new MainClass().Do);
int i = 0;
while (que.GetAllMessages().Length != 0)
{
i++;
try
{
var messageDic = Message.GetMessageGroupByNoticeId();
IAsyncResult asyncResult = doServer.BeginInvoke(messageDic, null, null);
}
catch (Exception ex)
{
DataLogHelper.E(ex.Message, ex);
}
}
public class MainClass
{
int noticeId = 0;
public void Do(Dictionary<string, string> parameters)
{
KeyValuePair<bool, string> kvp = new KeyValuePair<bool, string>();
if (int.TryParse(parameters["NoticeId"], out noticeId))
{
SendEventBase baseItem = SendFactory.SendNotice(parameters);
if (baseItem != null)