IAssetLoader Interface


Loads assets compiled into the application binary.
Implementing Types
graph BT Type["IAssetLoader"] class Type type-node Implementing0["AssetLoader"]-.->Type click Implementing0 "/api/Avalonia.Shared.PlatformSupport/AssetLoader"


public interface IAssetLoader


Name Value Summary
Exists(Uri, Uri) bool
Checks if an asset with the specified URI exists.
GetAssembly(Uri, Uri) Assembly
Extracts assembly information from URI
GetAssets(Uri, Uri) IEnumerable<Uri>
Gets all assets of a folder and subfolders that match specified uri.
Open(Uri, Uri) Stream
Opens the asset with the requested URI.
OpenAndGetAssembly(Uri, Uri) (Stream stream, Assembly assembly)
Opens the asset with the requested URI and returns the asset stream and the assembly containing the asset.
SetDefaultAssembly(Assembly) void
We need a way to override the default assembly selected by the host platform because right now it is selecting the wrong one for PCL based Apps. The AssetLoader needs a refactor cause right now it lives in 3+ platforms which can all be loaded on Windows.