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 static (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 asset contents together with the assembly.

Exceptions

FileNotFoundExceptionThe asset could not be found.

See Also

Reference

AssetLoader Class
Avalonia.Platform Namespace