DataUrlTryGetData(ReadOnlyMemoryChar, EmbeddedData, String) Method

Tries to retrieve the embedded data as a union that contains either a String or an array of Bytes, and also an appropriate file type extension for this data.

Definition

Namespace: FolkerKinzel.DataUrls
Assembly: FolkerKinzel.DataUrls (in FolkerKinzel.DataUrls.dll) Version: 1.0.0+b1c843815044ca6fd87a144c9ff16386002c6473
C#
public static bool TryGetData(
	ReadOnlyMemory<char> dataUrl,
	out EmbeddedData data,
	out string?? fileTypeExtension
)

Parameters

dataUrl  ReadOnlyMemoryChar
A read-only memory that contains a "data" URL according to RFC 2397.
data  EmbeddedData
If the method returns true, the parameter contains the embedded data as an EmbeddedData union. The parameter is passed uninitialized.
fileTypeExtension  String
If the method returns true, the parameter contains an appropriate file type extension for data. The extension starts with the period ".". The parameter is passed uninitialized.

Return Value

Boolean
true if dataUrl is a valid "data" URL, otherwise false.

Remarks

Use this method if you want to use the data in the application.

See Also