Beispiel #1
0
 public virtual void UnloadAll()
 {
     foreach (var resource in LoadedResources)
     {
         resource.ProvisionSource.Provider.UnloadResource(resource.FullPath);
         OnResourceUnloaded?.Invoke(resource.LocalPath);
     }
     LoadedResources.Clear();
 }
Beispiel #2
0
        public virtual void Unload(string path)
        {
            var resource = GetLoadedResource(path);

            resource?.ProvisionSource.Provider.UnloadResource(resource.FullPath);

            LoadedResources.RemoveAll(r => !r.Valid || r.LocalPath.EqualsFast(path));

            OnResourceUnloaded?.Invoke(path);
        }