Example #1
0
 /**
  * Helper for success callbacks that just returns the Status.OK by default
  *
  * @param message The message to add to the success result.
  */
 public void success(JArray message)
 {
     try
     {
         Object[] writableArray = ReactJsonConverter.jsonToReact(message);
         successCallback.Invoke(writableArray);
     }
     catch (Exception ex)
     {
         errorCallback.Invoke("Internal error converting results:" + ex.Message);
     }
 }
Example #2
0
 /**
  * Helper for error callbacks that just returns the Status.ERROR by default
  *
  * @param message The message to add to the error result.
  */
 public void error(JObject message)
 {
     try
     {
         Dictionary <String, Object> writableMap = ReactJsonConverter.jsonToReact(message);
         errorCallback.Invoke(writableMap);
     }
     catch (Exception ex)
     {
         errorCallback.Invoke("Internal error converting results:" + ex.Message);
     }
 }
Example #3
0
 /**
  * Helper for success callbacks that just returns the Status.OK by default
  *
  * @param message The message to add to the success result.
  */
 public void success(JObject message)
 {
     try
     {
         System.Collections.Generic.IReadOnlyDictionary <String, Object> writableMap = ReactJsonConverter.jsonToReact(message);
         successCallback.Invoke(writableMap);
     }
     catch (Exception ex)
     {
         errorCallback.Invoke("Internal error converting results:" + ex.Message);
     }
 }