Method StreamFromUrlOr
StreamFromUrlOr(string?, Uri?, Func<Stream?>?)
Attempts to load a Stream from the specified URL or uses a fallback function if provided.
public static Stream? StreamFromUrlOr(string? url, Uri? baseUri, Func<Stream?>? func = null)
Parameters
urlstringThe URL used to load the data. By default, "file" and "embres" protocols are supported, but this can be extended using the CustomStreamFromUrl event.
baseUriUriSpecifies the base URL if
urlis not absolute.funcFunc<Stream>A fallback function to invoke if the default loading mechanism fails.