Skip to main content

OpenAndGetAssembly Method

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

Definition​

Namespace: Avalonia.Platform
Assembly: Avalonia.Base (in Avalonia.Base.dll)

public (Stream stream, Assembly assembly) OpenAndGetAssembly(
Uri uri,
Uri? baseUri = null
)

Parameters​

  Uri
The URI.
  Uri  (Optional)
A base URI to use if uri is relative.

Return Value​

ValueTuple(Stream, Assembly)
The stream containing the resource contents together with the assembly.

Implements​

IAssetLoader.OpenAndGetAssembly(Uri, Uri)

Exceptions​

FileNotFoundExceptionThe asset could not be found.

See Also​

Reference​

StandardAssetLoader Class
Avalonia.Platform Namespace