天津投入产出系统后端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

42 lines
1.1 KiB

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
{
/// <summary>
/// 数据交换上下文
/// </summary>
public class ExChangeContext : IExChangeContext
{
/// <summary>
/// 获取客户端列表
/// </summary>
/// <returns></returns>
public List<Worker> GetWokerList()
{
return RegisterCenter.GetWokerList();
}
/// <summary>
/// 向客户端发送信息(异步)
/// </summary>
/// <param name="Message"></param>
public void SendMessageToClient(string sessionID, CommonMessage message)
{
new DuplexMessageService().SendMessageToClient(sessionID, message);
}
/// <summary>
/// 向消息总线发送消息
/// </summary>
/// <param name="msg">消息实体</param>
public void EnqueueToBus(CommonMessage msg)
{
MessageQueueService.Enqueue(msg);
}
}
}