CmisSync.Lib.Sync.CmisRepo.SynchronizedFolder.CrawlSyncAndUpdateChangeLogToken C# (CSharp) Method

CrawlSyncAndUpdateChangeLogToken() private method

Perform a crawl sync (check all folders and file checksums). If successful, update the local ChangeLog token.
private CrawlSyncAndUpdateChangeLogToken ( IFolder remoteFolder, string remotePath, string localFolder ) : void
remoteFolder IFolder
remotePath string
localFolder string
return void
            private void CrawlSyncAndUpdateChangeLogToken(IFolder remoteFolder, string remotePath, string localFolder)
            {
                var sw = new System.Diagnostics.Stopwatch();
                Logger.Info("Remote Full Crawl Started");
                try
                {
                    // Get ChangeLog token.
                    string token = CmisUtils.GetChangeLogToken(session);

                    // Sync.
                    bool success = CrawlSync(remoteFolder, remotePath, localFolder);

                    // Update ChangeLog token if sync has been successful.
                    if (success)
                    {
                        database.SetChangeLogToken(token);
                    }
                    else
                    {
                        Logger.Info("ChangeLog token not updated as an error occurred during sync.");
                    }
                }
                finally
                {
                    Logger.InfoFormat("Remote Full Crawl Finished : {0} min", sw.Elapsed);
                }
            }