예제 #1
0
 private void step2FindStorables()
 {
     NuggetaQuery nuggetaQuery = new NuggetaQuery();
     nuggetaQuery.setDomain(nameSpace);
     nuggetaQuery.setQuery("$WHERE content $LIKE '%RawMessage%' ");
     sampleIO.log("Step 2 : Find Storables ");
     gameApi.findStorablesRequest(nuggetaQuery, (FindStorablesResponse response)=>
     {
         if (response.getFindStorablesStatus() == FindStorablesStatus.SUCCESS)
         {
             List<Storable> storables = response.getStorables();
             if (storables.Count != 0)
             {
                 sampleIO.log("Step 2 : Find Storables successfull : found " + storables.Count + " storables\r\n");
                 storable = ((NRawMessage) storables[0]);
                 step3SaveStorable();
             } else
             {
                 sampleIO.log("Step 2 :Error Find Storables return no result \r\n");
                 onExit();
             }
         } else
         {
             sampleIO.log("Step 2 : Fail to Find Storables\r\n");
             onExit();
         }
     });
 }
예제 #2
0
 private void step5FindStorables()
 {
     NuggetaQuery nuggetaQuery = new NuggetaQuery();
     nuggetaQuery.setDomain(nameSpace);
     sampleIO.log("Step 5 : Get Storables ");
     gameApi.findStorablesRequest(nuggetaQuery, (FindStorablesResponse response)=>
     {
         if (response.getFindStorablesStatus() == FindStorablesStatus.SUCCESS)
         {
             List<Storable> storables = response.getStorables();
             if (storables.Count == 0)
             {
                 sampleIO.log("Step 5 : Get Storables successfull : there is no elements\r\n");
             } else
             {
                 sampleIO.log("Step 5 : Error Get Storables should have return 0 elements\r\n");
             }
             onExit();
         } else
         {
             sampleIO.log("Step 5 : Fail to Get Storables\r\n");
             onExit();
         }
     });
 }