void ManifestRetrieved(string remoteManifestString) { if (string.IsNullOrEmpty(remoteManifestString)) { return; } var remoteManifest = DataService.ReadFromDisk <BibaManifest>(BibaContentConstants.GetPersistedPath(BibaContentConstants.MANIFEST_FILENAME)); if (remoteManifest != null && remoteManifest.TimeStamp > _localManifest.TimeStamp) { foreach (var remoteLine in remoteManifest.Lines) { var localLine = _localManifest.Lines.Find(line => line.FileName == remoteLine.FileName); if ((localLine == null || localLine.TimeStamp < remoteLine.TimeStamp) && !remoteLine.OptionalDownload) { RetrieveAndWriteData(BibaContentConstants.GetRelativePath(remoteLine.FileName), BibaContentConstants.GetPersistedPath(remoteLine.FileName)); } } _localManifest = remoteManifest; } }
public void ReloadContent() { _localManifest = DataService.ReadFromDisk <BibaManifest>(ContentFilePath); }