Exemple #1
0
 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));
     }
 }
Exemple #2
0
        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();
        }
Exemple #3
0
 public ServerInfoHandler(ISession client, byte[] recv) : base(null, client, recv)
 {
     _request = new AdHocRequest();
 }
Exemple #4
0
 public SendMessageHandler(ISession client, byte[] recv) : base(client, recv)
 {
     _request = new AdHocRequest();
 }