示例#1
0
        /// <summary>
        /// 组合返回数据
        /// </summary>
        /// <param name="status"></param>
        public void SendStatusRN(Status.Command command, SmartWeb.Models.Ship ship, int status = 0)
        {
            MSG msg = new MSG()
            {
                type      = MSG.Type.STATUS,
                sequence  = 3,
                timestamp = ProtoBufHelp.TimeSpan(),
                status    = new Status()
                {
                    command        = command,
                    statusresponse = new StatusResponse()
                    {
                        flag   = ship == null ? false : ship.Flag,
                        name   = ship == null ? "" : ship.Name + "|" + (int)ship.type,
                        result = status
                    }
                }
            };

            dealer.Send(msg, ManagerHelp.UpToId, "response");
        }
示例#2
0
 public async Task <ActionResult <Unit> > Status(Guid id, Status.Command Command)
 {
     Command.Id = id;
     return(await _mediator.Send(Command));
 }