DateAndOrTimeConvertTResult(FuncDateOnly, TResult, FuncDateTimeOffset, TResult, FuncTimeOnly, TResult, FuncString, TResult) Method

Converts the encapsulated value to TResult.

Definition

Namespace: FolkerKinzel.VCards.Models
Assembly: FolkerKinzel.VCards (in FolkerKinzel.VCards.dll) Version: 8.0.1+a91cc3f0fd39aeb548e16006a60ca9dd10a304a2
C#
public abstract TResult Convert<TResult>(
	Func<DateOnly, TResult> dateFunc,
	Func<DateTimeOffset, TResult> dtoFunc,
	Func<TimeOnly, TResult> timeFunc,
	Func<string, TResult> stringFunc
)

Parameters

dateFunc  FuncDateOnly, TResult
The FuncT, TResult to call if the encapsulated value is a DateOnly value.
dtoFunc  FuncDateTimeOffset, TResult
The FuncT, TResult to call if the encapsulated value is a DateTimeOffset value.
timeFunc  FuncTimeOnly, TResult
The FuncT, TResult to call if the encapsulated value is a TimeOnly value.
stringFunc  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
A TResult.

Exceptions

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

See Also