MSA.Zmq.JsonRpc.JsonRpcResponse.CreateJsonErrorResponse C# (CSharp) Method

CreateJsonErrorResponse() public static method

public static CreateJsonErrorResponse ( int id, int code, string message, string data ) : JsonRpcResponse
id int
code int
message string
data string
return JsonRpcResponse
        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;
        }