Пример #1
0
        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;
            }
        }
Пример #2
0
 public void ReloadContent()
 {
     _localManifest = DataService.ReadFromDisk <BibaManifest>(ContentFilePath);
 }