private void trackHandler(APICmd cmd, Action <CmdId, object> handler) { var seqNr = (ushort)((handledMessageCount++ % 30000) + offset); actionTracker[seqNr] = handler; GameAPI.Game_Request(cmd.cmd, seqNr, cmd.data); }
public void ExecuteCommand <ResponseType>(APICmd cmd, Action <CmdId, ResponseType> handler) { Action <CmdId, object> outerHandler = (x, y) => handler(x, (ResponseType)y); trackHandler(cmd, outerHandler); }
public void ExecuteCommand(APICmd cmd) { this.ExecuteCommand <Object>(cmd, defaultHandler); }