Table of Contents

Interface IAssetResolver

Namespace
Icy.Assets
Assembly
IcyUI.dll

Represents a service that performs assets loading.

public interface IAssetResolver : IDisposable
Inherited Members
Extension Methods

Methods

CreateScope(IAssetContext)

Creates a caching scope for the specified asset context.

IAssetScope CreateScope(IAssetContext context)

Parameters

context IAssetContext

An instance of the IAssetScope that refers to the cached section.

Returns

IAssetScope

A disposable scope for caching assets related to the specified asset context.

LoadAssetAsync<T>(IAssetContext, string)

Loads the asset asynchronously if it's available. See more: LoadAsset<T>(IAssetContext, string).

ValueTask<T> LoadAssetAsync<T>(IAssetContext context, string path) where T : class

Parameters

context IAssetContext

Context to load asset from.

path string

Path to load asset from.

Returns

ValueTask<T>

An instance of the loaded asset.

Type Parameters

T

Type of the loaded asset.

LoadAsset<T>(IAssetContext, string)

Loads an asset from the specified location.

T LoadAsset<T>(IAssetContext context, string path) where T : class

Parameters

context IAssetContext

Context to load asset from.

path string

Path to load asset from.

Returns

T

An instance of the loaded asset.

Type Parameters

T

Type of the loaded asset.

RegisterImporter<T>(IAssetImporter<T>)

Registers an instance of the IAssetImporter<T> to use when loading assets of type T.

void RegisterImporter<T>(IAssetImporter<T> importer)

Parameters

importer IAssetImporter<T>

An instance of the IAssetImporter<T> to register.

Type Parameters

T

Type of the assets supported by specified asset loader.

RegisterParser(IAssetParser)

Registers an instance of the IAssetParser to use when loading assets.

void RegisterParser(IAssetParser parser)

Parameters

parser IAssetParser

An instance of the IAssetParser to load assets.