private bool StartSync() {
try {
string lastTokenOnClient = this.storage.ChangeLogToken;
// Get last change log token on server side.
this.session.Binding.GetRepositoryService().GetRepositoryInfos(null); // refresh
string lastTokenOnServer = this.session.Binding.GetRepositoryService().GetRepositoryInfo(this.session.RepositoryInfo.Id, null).LatestChangeLogToken;
if (lastTokenOnClient != lastTokenOnServer) {
this.Sync();
}
return true;
} catch (CmisRuntimeException e) {
Logger.Warn("ContentChangeSync not successfull, fallback to CrawlSync");
Logger.Debug(e.Message);
Logger.Debug(e.StackTrace);
// Use fallback sync algorithm
return false;
}
}