public static CreateJsonErrorResponse ( int id, int code, string message, string data ) : |
||
id | int | |
code | int | |
message | string | |
data | string | |
Результат |
public static JsonRpcResponse CreateJsonErrorResponse(int id, int code, string message, string data)
{
var error = new JsonRpcError();
error.Code = code;
error.Data = data;
error.Message = message;
var resp = new JsonRpcResponse();
resp.JsonRpc = "2.0";
resp.Id = id;
resp.Error = error;
resp.Result = null;
return resp;
}