コード例 #1
0
 public Dictionary<string, object> getDict(DAPIResponse d)
 {
     Dictionary<string, object> result = null;
     string val = getString(d);
     if (val == null)
     {
         result = new Dictionary<string, object>();
     }
     else
     {
         result = Json.Deserialize(val) as Dictionary<string,object>;;
     }
     return result;
 }
コード例 #2
0
 public string getString(DAPIResponse d)
 {
     string result = null;
     if (d.Error != null)
     {
         Console.WriteLine("ERROR in DAPI request, dapiResponse.error: " + d.Error.Message + "\n");
     }
     else
     {
         CallResult c = d.Calls[0];
         if (c.Error != null)
         {
             Console.WriteLine("ERROR in DAPI request, dapiResponse.calls.error: " + c.Error.Message + "\n");
         }
         else
         {
             string data = c.Data;
             Console.WriteLine("  " + data + "\n");
             result = data;
         }
     }
     return result;
 }