Esempio n. 1
0
        public void Refresh(bool forceRefresh = false)
        {
            List <AssetVersion> localVersions = FindLocalVersions();

            if (forceRefresh || VersionListsAreEqual(localVersions, _localVersions) == false)
            {
                _localVersions = localVersions;

                _downloader = new AssetVersionDownloader();
                _downloader.remoteVersionDownloadFinished += RemoteVersionDownloaderFinished;
                _downloader.remoteVersionDownloadFailed   += RemoteVersionDownloaderFailed;

                foreach (AssetVersion local in _localVersions)
                {
                    _downloader.Add(local);
                }
            }
        }
Esempio n. 2
0
		public void Refresh( bool forceRefresh = false)
		{
			List<AssetVersion> localVersions = FindLocalVersions();
			if( forceRefresh || VersionListsAreEqual( localVersions, _localVersions) == false)
			{
				if( _downloader != null) {
					_downloader.CancelAll();
					_downloader.remoteVersionDownloadFinished -= RemoteVersionDownloaderFinished;
					_downloader.remoteVersionDownloadFailed -= RemoteVersionDownloaderFailed;
				}

				_downloader = new AssetVersionDownloader();
				_downloader.remoteVersionDownloadFinished += RemoteVersionDownloaderFinished;
				_downloader.remoteVersionDownloadFailed += RemoteVersionDownloaderFailed;

				_localVersions = localVersions;
				foreach( AssetVersion local in _localVersions) {
					_downloader.Add( local);
				}
			}
		}