using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Sog; using Google.Protobuf.WellKnownTypes; namespace SMConsole { public class MsgHandler { public void HandlerMsg(RequestPacket packet) { switch (packet.MsgID) { case (int)SMMsgID.ConsoleCommandRes: OnConsoleCommandRes(packet); break; default: TraceLog.Error("MsgHandler.HandlerMsg unknow msgId {0}", packet.MsgID); break; } } private void OnConsoleCommandRes(RequestPacket packet) { SMConsoleCommandRes res = (SMConsoleCommandRes)packet.Message; SMConsoleInput.Instance.AckCommand(res); } } }