Table of Contents

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

IAssetResolver

RootContext

Gets the root context to cache all the assets inside it.

IAssetContext RootContext { get; }

Property Value

IAssetContext

Methods

GetAsset<T>(string)

Gets an asset for the specified path if it is cached.

T GetAsset<T>(string path) where T : class

Parameters

path string

Relative path to the cached asset.

Returns

T

An instance of the cached asset.

Type Parameters

T

Type 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

path string

Relative path to the asset.

Returns

bool

true if the asset is stored in cache; otherwise false.