天津投入产出系统后端
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.

38 lines
969 B

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using QM.Exchange.Interface;
namespace QM.Exchange.Custom.Commands.Samples
{
///<summary>
/// 功能描述:BroadcastCommand 广播命令
/// 作 者:董雪夫
/// 编写日期:2017.8.23
///</summary>
public class BroadcastCommand : DataCommand
{
public BroadcastCommand(CommonMessage message)
: base(message)
{
}
/// <summary>
/// 执行方法
/// </summary>
public override void Execute(IExChangeContext exChangeContext, CommonMessage message)
{
var lst = exChangeContext.GetWokerList();
if (lst != null && lst.Count > 0)
{
foreach (var item in lst)
{
exChangeContext.SendMessageToClient(item.SessionID, message);
}
}
}
}
}