Table of Contents

Class ResourceLoader

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

Loads resources compiled into the application binary.

public class ResourceLoader
Inheritance
ResourceLoader

Constructors

ResourceLoader(Assembly?)

Initializes a new instance of the ResourceLoader class.

Properties

Default

Gets or sets default ResourceLoader.

Methods

DefaultStreamFromUri(Uri, Uri?)

Default implementation of the open stream from the Uri. Used in DefaultStreamFromUrl(string, Uri?).

DefaultStreamFromUrl(string, Uri?)

Default implementation of StreamFromUrl(string, Uri?). See StreamFromUrl(string, Uri?) for details.

Exists(Uri, Uri?)

Checks if an asset with the specified URI exists.

GetAssets(Uri, Uri?)

Gets all assets of a folder and subfolders that match specified uri.

Open(Uri, Uri?)

Opens the asset with the requested URI.

OpenAndGetAssembly(Uri, Uri?)

Opens the asset with the requested URI and returns the asset stream and the assembly containing the asset.

SetDefaultAssembly(Assembly)

Sets the default assembly from which to load assets for which no assembly is specified.

StreamFromUrl(string, Uri?)

Loads Stream from the specified url.

StreamFromUrlOrDefault(string, Func<Stream?>?)

Calls StreamFromUrlOrDefault(string, Func<Stream?>?) and if it returns null, calls func.

Events

CustomStreamFromUrl

Occurs when StreamFromUrl(string, Uri?) is called. You can implement CustomStreamFromUrl event handler in order to perform custom url processing.