public IMegaRequest MoveNode(string nodeId, string targetNodeId, Action OnSuccess, Action <int> OnError) { if (string.IsNullOrEmpty(targetNodeId) || string.IsNullOrEmpty(nodeId)) { if (OnError != null) { OnError(MegaApiError.EWRONG); } return(new EmptyRequest()); } var req = new MRequestMoveNode <MResponseMoveNode>(User, nodeId, targetNodeId); req.Success += (s, e) => { if (OnSuccess != null) { OnSuccess(); } }; req.Error += (s, e) => { if (OnError != null) { OnError(e.Error); } }; transport.EnqueueRequest(req); return(req); }
public IMegaRequest MoveNode(string nodeId, string targetNodeId, Action OnSuccess, Action<int> OnError) { if (string.IsNullOrEmpty(targetNodeId) || string.IsNullOrEmpty(nodeId)) { if (OnError != null) { OnError(MegaApiError.EWRONG); } return new EmptyRequest(); } var req = new MRequestMoveNode<MResponseMoveNode>(User, nodeId, targetNodeId); req.Success += (s, e) => { if (OnSuccess != null) { OnSuccess(); } }; req.Error += (s, e) => { if (OnError != null) { OnError(e.Error); } }; transport.EnqueueRequest(req); return req; }