Table of Contents

Method StreamFromUrlOrDefault

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

StreamFromUrlOrDefault(string, Func<Stream?>?)

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

public static Stream? StreamFromUrlOrDefault(string url, Func<Stream?>? func = null)

Parameters

url string

Url used to load the data. By default "file" and "embres" protocols are supported but you can extend it with CustomStreamFromUrl event.

func Func<Stream>

Function used to get stream from url in case if StreamFromUrl(string, Uri?) returns null.

Returns

Stream