EmbeddedDataConvertTResult(FuncByte, TResult, FuncString, TResult) Method

Converts the encapsulated value to TResult.

Definition

Namespace: FolkerKinzel.DataUrls
Assembly: FolkerKinzel.DataUrls (in FolkerKinzel.DataUrls.dll) Version: 1.0.0+b1c843815044ca6fd87a144c9ff16386002c6473
C#
public TResult Convert<TResult>(
	Func<byte[], TResult> bytesFunc,
	Func<string, TResult> textFunc
)

Parameters

bytesFunc  FuncByte, TResult
The FuncT, TResult to call if the encapsulated value is an array of Bytes.
textFunc  FuncString, TResult
The FuncT, TResult to call if the encapsulated value is a String.

Type Parameters

TResult
Generic type parameter for the return type of the delegates.

Return Value

TResult
An instance of TResult.

Exceptions

ArgumentNullException One of the arguments is null and the encapsulated value is of that Type.

See Also