Method StreamFromUrlOrDefault
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
stringUrl 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
.