public IHttpActionResult PostAdhoc(AdHocRequest request) { try { var listrak = new ListrakRepository(); return(Ok(listrak.UpdateLists(request.FieldItems, request.ListsToUpdate, request.PageName))); } catch (Exception e) { if (e.InnerException != null) { return(Ok(e.InnerException.Message)); } return(Ok(e.Message)); } }
protected override void CheckRequest() { base.CheckRequest(); if (_session.ServerMessageList.Count == 0) { _errorCode = SBErrorCode.Parse; return; } _request = _session.ServerMessageList[0]; _session.ServerMessageList.Remove(_request); var result = GameServer.GetServers(_request.TargetServerIP) .Where(s => s.ServerData.KeyValue.ContainsKey("hostport")) .Where(s => s.ServerData.KeyValue["hostport"] == _request.TargetServerHostPort); if (result.Count() != 1) { _errorCode = SBErrorCode.NoServersFound; return; } _gameServer = result.FirstOrDefault(); }
public ServerInfoHandler(ISession client, byte[] recv) : base(null, client, recv) { _request = new AdHocRequest(); }
public SendMessageHandler(ISession client, byte[] recv) : base(client, recv) { _request = new AdHocRequest(); }