| 556 | } |
| 557 | |
| 558 | void |
| 559 | DirectRPCCommand::invoke_method() |
| 560 | { |
| 561 | shared::rpc::ClientRequest request; |
| 562 | if (auto method = get_parsed_arguments()->get(INVOKE_STR); method) { |
| 563 | request.method = method.value(); |
| 564 | // We build up the parameter content if passed. |
| 565 | if (auto params = get_parsed_arguments()->get(PARAMS_STR); params) { |
| 566 | std::ostringstream ss; |
| 567 | for (auto &¶m : params) { |
| 568 | ss << param; |
| 569 | ss << '\n'; |
| 570 | } |
| 571 | request.params = YAML::Load(ss.str()); // let if fail if this is bad. |
| 572 | } |
| 573 | _printer->write_output(invoke_rpc(request)); |
| 574 | } |
| 575 | } |
| 576 | |
| 577 | //------------------------------------------------------------------------------------------------------------------------------------ |
| 578 | ServerCommand::ServerCommand(ts::Arguments *args) : CtrlCommand(args) |
nothing calls this directly
no test coverage detected