AssetLoader Class

Summary

Loads assets compiled into the application binary.
Namespace
Avalonia.Shared.PlatformSupport
Interfaces
Base Types
  • object
graph BT Type-->Base0["object"] Type-.->Interface0["IAssetLoader"] click Interface0 "/api/Avalonia.Platform/IAssetLoader" Type["AssetLoader"] class Type type-node

Syntax

public class AssetLoader : IAssetLoader

Constructors

Name Summary
AssetLoader(Assembly) Initializes a new instance of the AssetLoader class.

Methods

Name Value Summary
Exists(Uri, Uri) bool
Checks if an asset with the specified URI exists.
GetAssembly(Uri, Uri) Assembly
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.
RegisterResUriParsers() void
static
SetDefaultAssembly(Assembly) void
Sets the default assembly from which to load assets for which no assembly is specified.