NullableReadOnlySpanPairTFirst, TSecondMapTResultFirst, TResultSecond(NullableReadOnlySpanPairTFirst, TSecondMapReadOnlyFuncTResultFirst, TResultSecond) Method

Maps a NullableReadOnlySpanPairTFirst, TSecond to another value by applying a function to the contained value, or returns an empty value if there is no value.

Definition

Namespace: Ookii.Common
Assembly: Ookii.Common (in Ookii.Common.dll) Version: 1.0.0+7c2900b8a16cd8ae46bdd79d8f105034712c5fa3
C#
public NullableReadOnlySpanPair<TResultFirst, TResultSecond> Map<TResultFirst, TResultSecond>(
	NullableReadOnlySpanPairTFirst, TSecondMapReadOnlyFunc<TResultFirst, TResultSecond> mapFunc
)

Parameters

mapFunc  NullableReadOnlySpanPairTFirst, TSecondMapReadOnlyFuncTResultFirst, TResultSecond
The function to apply to the contained value.

Type Parameters

TResultFirst
The type of the items in the first value of the resulting NullableReadOnlySpanPairTFirst, TSecond.
TResultSecond
The type of the items in the second value of the resulting NullableReadOnlySpanPairTFirst, TSecond.

Return Value

NullableReadOnlySpanPairTResultFirst, TResultSecond
If the HasValue property is , the result of applying mapFunc to the Value property; otherwise, an empty NullableReadOnlySpanPairTFirst, TSecond.

Remarks

The function mapFunc is only called if the HasValue property is .

See Also