Version 0.5 hAPI result. For more info, see Hubiquitus reference
Inheritance: Newtonsoft.Json.Linq.JObject
Beispiel #1
0
 public void SetPayload(HResult payload)
 {
     try
     {
         if (payload == null)
         {
             this.Remove("payload");
         }
         else
         {
             this["payload"] = payload;
         }
     }
     catch (Exception e)
     {
         Debug.WriteLine("{0} : Can not update the payload attribute", e.ToString());
     }
 }
Beispiel #2
0
 /// <summary>
 /// If payload type is HResult.
 /// </summary>
 /// <returns>The payload of HResult type.</returns>
 public HResult GetPayloadAsHResult()
 {
     HResult payload = null;
     try
     {
         payload = new HResult(JObject.Parse(this["payload"].ToString()));
     }
     catch (Exception e)
     {
         Debug.WriteLine("{0} : Can not fetch the payload attribute", e.ToString());
     }
     return payload;
 }