/// <summary>
        /// Reloads the asset represented by this version structure.
        /// </summary>
        /// <param name="content">The content manager with which to reload the cache entry.</param>
        /// <param name="assetPath">The asset path that represents the asset.</param>
        /// <param name="assetWatchers">The asset watchers that are watching the asset.</param>
        /// <param name="assetType">The asset type.</param>
        public void Reload(ContentManager content, String assetPath, IAssetWatcherCollection assetWatchers, Type assetType)
        {
            var assetLKG = content.LoadImpl(assetPath, assetType, AssetDensityBucket, true, true, assetWatchers, null);

            content.PurgeCache(assetPath, false);
            content.LoadImpl(assetPath, assetType, AssetDensityBucket, true, true, assetWatchers, assetLKG);
        }
Esempio n. 2
0
 /// <summary>
 /// Reloads the asset represented by this cache entry.
 /// </summary>
 /// <param name="content">The content manager with which to reload the cache entry.</param>
 /// <param name="assetPath">The asset path that represents the asset.</param>
 /// <param name="assetWatchers">The asset watchers that are watching the asset.</param>
 public void Reload(ContentManager content, String assetPath, IAssetWatcherCollection assetWatchers)
 {
     if (obj is AssetCacheVersion acv)
     {
         acv.Reload(content, assetPath, assetWatchers, AssetType);
     }
     else
     {
         var dictionary = (Dictionary <Byte, AssetCacheVersion>)obj;
         foreach (var kvp in dictionary)
         {
             kvp.Value.Reload(content, assetPath, assetWatchers, AssetType);
         }
     }
 }