コード例 #1
0
        public void Read(int id,
                         OnGetSuccessAction <GroundJsonObject> onReadSuccessAction,
                         OnFailedAction onReadFailedAction)
        {
            var filter = new Dictionary <string, string>();

            filter.Add("id", id.ToString());

            Read(onReadSuccessAction, onReadFailedAction, filter);
        }
コード例 #2
0
        public void Read(int layerId,
                         OnGetSuccessAction <ChunkDataJsonObject> onReadSuccessAction,
                         OnFailedAction onReadFailedAction)
        {
            var filter = new Dictionary <string, string>();

            filter.Add("world_layer_id", layerId.ToString());

            Read(onReadSuccessAction, onReadFailedAction, filter);
        }
コード例 #3
0
 public void Read(OnGetSuccessAction <T> onReadSuccessAction,
                  OnFailedAction onReadFailedAction, Dictionary <string, string> filter = null)
 {
     MakerWOWApi.DoGetRequest(CrudType.Read.ToString().ToLower() + "&"
                              + ((filter != null) ? filter.FormSerialize() : string.Empty) + "&table=" + _tableName,
                              (IWebRequest result) => {
         var apiResult = new ApiResult <T>(result.Json);
         if (apiResult.IsError)
         {
             onReadFailedAction(apiResult);
         }
         else
         {
             _models.Combine(apiResult.Records);
             onReadSuccessAction(apiResult.Records, apiResult);
         }
     },
                              (WebContextException error) => {
         MakerWOWApi.FireOnError(new ApiException(1, "Could not read models.", error));
     });
 }