protected override void OnSuccesAction(MegaSDK api, MRequest request)
 {
     Deployment.Current.Dispatcher.BeginInvoke(() =>
     {
         _node.OriginalMNode = api.getNodeByHandle(request.getNodeHandle());
         DialogService.ShowShareLink(_node);
     });
 }
        protected override void OnSuccesAction(MegaSDK api, MRequest request)
        {
            if (_isImportFolderProcess)
            {
                MNode parentNode    = api.getNodeByHandle(request.getParentHandle());
                MNode newFolderNode = api.getNodeByHandle(request.getNodeHandle());

                if (!App.LinkInformation.FoldersToImport.ContainsKey(parentNode.getBase64Handle()))
                {
                    return;
                }

                // Get from the corresponding dictionary all the folders parent folder and explore them.
                var megaNodes = App.LinkInformation.FoldersToImport[parentNode.getBase64Handle()];
                foreach (var node in megaNodes)
                {
                    if (App.LinkInformation.FolderPaths.ContainsKey(node.getBase64Handle()))
                    {
                        String nodePath = App.LinkInformation.FolderPaths[node.getBase64Handle()];

                        // If the name of the new folder matches with the last part of the node path
                        // obtained from the dictionary, then this is the current imported folder.
                        if (String.Compare(newFolderNode.getName(), nodePath.Split('/').Last()) == 0)
                        {
                            // Import the content of a recently created node folder.
                            ImportNodeContents(node, newFolderNode);

                            // Remove the node from the list and update the dictionaries.
                            megaNodes.Remove(node);
                            if (App.LinkInformation.FoldersToImport.ContainsKey(parentNode.getBase64Handle()))
                            {
                                App.LinkInformation.FoldersToImport.Remove(parentNode.getBase64Handle());
                            }

                            if (megaNodes.Count > 0)
                            {
                                if (!App.LinkInformation.FoldersToImport.ContainsKey(parentNode.getBase64Handle()))
                                {
                                    App.LinkInformation.FoldersToImport.Add(parentNode.getBase64Handle(), megaNodes);
                                }
                            }

                            if (App.LinkInformation.FolderPaths.ContainsKey(node.getBase64Handle()))
                            {
                                App.LinkInformation.FolderPaths.Remove(node.getBase64Handle());
                            }
                            break;
                        }
                    }
                }
            }
        }