// warning: 参数安排是否合理 public async Task <Types.Org> AddNote(string orgId, AddNodeParam addNodeParam, CancellationToken cancellationToken = default) { var param = new AddNodeParam(orgId, addNodeParam.Name) { ParentNodeId = addNodeParam.ParentNodeId, Code = addNodeParam.Code, Order = addNodeParam.Order, NameI18n = addNodeParam.NameI18n, Description = addNodeParam.Description, DescriptionI18n = addNodeParam.DescriptionI18n }; var res = await client.Request <AddNodeResponse>(param.CreateRequest(), cancellationToken); return(res.Result); }
/// <summary> /// Manually adds or removes a peer-to-peer connection (peers are also discovered and added automatically). /// The ip can be a hostname, IPv4 address, IPv4-as-IPv6 address or IPv6 address. For the entire ip:port you can also use the part after the @ symbol of the other node’s /// nodeaddress, as given by the getinfo command. The command parameter should be one of add (to manually queue a node for the next available slot), /// remove (to remove a node), or onetry (to immediately connect to a node even if a slot is not available). /// </summary> /// <param name="address"></param> /// <param name="command"></param> /// <returns></returns> public JsonRpcResponse <string> AddNodec(string address, AddNodeParam command) { return(_Client.Execute <string>("addnode", 0, address, command.ToString().ToLower())); }