using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using QM.Exchange.Interface;
using QM.Exchange.Core.Services;
namespace QM.Exchange.Core
{
///
/// 数据交换上下文
///
public class ExChangeContext : IExChangeContext
{
///
/// 获取客户端列表
///
///
public List GetWokerList()
{
return RegisterCenter.GetWokerList();
}
///
/// 向客户端发送信息(异步)
///
///
public void SendMessageToClient(string sessionID, CommonMessage message)
{
new DuplexMessageService().SendMessageToClient(sessionID, message);
}
///
/// 向消息总线发送消息
///
/// 消息实体
public void EnqueueToBus(CommonMessage msg)
{
MessageQueueService.Enqueue(msg);
}
}
}