public override void onRequestFinish(MegaSDK api, MRequest request, MError e) { base.onRequestFinish(api, request, e); if (Tcs.Task.IsFaulted) { return; } if (request.getType() == MRequestType.TYPE_RENAME) { switch (e.getErrorCode()) { case MErrorType.API_OK: // Successfull rename node process Tcs?.TrySetResult(request.getName()); break; default: // Default error processing Tcs?.TrySetResult(null); break; } } }
protected override void OnSuccesAction(MegaSDK api, MRequest request) { Deployment.Current.Dispatcher.BeginInvoke(() => _nodeViewModel.Name = request.getName()); }