private static bool CopyLogins(BrowserScanResult srcScanResult, BrowserScanResult destScanResult, IList <ILogins> srcLogins, out int skipped, out int copied, out int failed) { IBrowser srcBrowser = srcScanResult.browser; string srcEncryptedKey = srcScanResult.scan.encryptedKey; string destPath = destScanResult.scan.path; IBrowser destBrowser = destScanResult.browser; string destEncrpytedKey = destScanResult.scan.encryptedKey; IList <ILogins> logins = destBrowser.Get(destPath); if (logins == null) { skipped = 0; copied = 0; failed = 0; return(false); } IList <ILogins> loginsToAdd = new List <ILogins>(); skipped = 0; failed = 0; for (int i = 0; i < srcLogins.Count; ++i) { ILogins srcLogin = srcLogins[i]; if (CheckLoginsExists(logins, srcLogin)) { skipped++; continue; } else { ILogins destLogin = BrowserHelper.Copy <ILogins>(srcLogin, srcBrowser, srcEncryptedKey, destBrowser, destEncrpytedKey); if (destLogin == null) { failed++; continue; } loginsToAdd.Add(destLogin); } } if (loginsToAdd.Count == 0) { copied = 0; return(true); } copied = destBrowser.Insert(destPath, loginsToAdd, (cur, total) => { Console.WriteLine(string.Format("Copying {0} of {1} ", cur, total)); Console.SetCursorPosition(Console.CursorLeft, Console.CursorTop - 1); }); return(true); }