public static JsonRpcResult CreateResult(JsonRpcParamsResponse values) { JsonRpcResult result; if (values.Error != null) { result = new JsonRpcResultError((int)values.Id, values.Error); } else { result = new JsonRpcResultSucceeded((int)values.Id, values.Result); } return(result); }
public static JsonRpcResult CreateErrorResult(int id, Exception ex) { var result = new JsonRpcResultError(id, ex); return(result); }