MCPcopy Create free account
hub / github.com/M2Team/NanaBox / ComputeSystemAddComPort

Method ComputeSystemAddComPort

NanaBox/ConfigurationManager.cpp:727–741  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

725}
726
727void NanaBox::ComputeSystemAddComPort(
728 winrt::com_ptr<NanaBox::ComputeSystem> const& Instance,
729 std::uint32_t const& PortID,
730 std::string const& NamedPipe)
731{
732 nlohmann::json Result;
733
734 Result["ResourcePath"] = Mile::FormatString(
735 "VirtualMachine/Devices/ComPorts/%d",
736 PortID);
737 Result["RequestType"] = "Add";
738 Result["Settings"] = NanaBox::MakeHcsComPortConfiguration(NamedPipe);
739
740 Instance->Modify(winrt::to_hstring(Result.dump()));
741}
742
743void NanaBox::ComputeSystemRemoveComPort(
744 winrt::com_ptr<NanaBox::ComputeSystem> const& Instance,

Callers

nothing calls this directly

Calls 1

ModifyMethod · 0.80

Tested by

no test coverage detected