Пример #1
0
        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);
        }
Пример #2
0
        public static JsonRpcResult CreateErrorResult(int id, Exception ex)
        {
            var result = new JsonRpcResultError(id, ex);

            return(result);
        }