Interface IAssetScope
- Namespace
- Icy.Assets
- Assembly
- IcyUI.dll
Represents a scope for caching all the assets related to the specified context.
public interface IAssetScope : IDisposable
- Inherited Members
- Extension Methods
Properties
AssetResolver
Gets an instance of the assets resolver that owes this scope.
IAssetResolver AssetResolver { get; }
Property Value
RootContext
Gets the root context to cache all the assets inside it.
IAssetContext RootContext { get; }
Property Value
Methods
GetAsset<T>(string)
Gets an asset for the specified path if it is cached.
T GetAsset<T>(string path) where T : class
Parameters
pathstringRelative path to the cached asset.
Returns
- T
An instance of the cached asset.
Type Parameters
TType of the requested asset.
Exceptions
- AssetNotFoundException
Occurs when the asset hasn't been loaded to the cache.
IsCached(string)
Checks if the specified asset is stored in cache of this scope.
bool IsCached(string path)
Parameters
pathstringRelative path to the asset.