Table of Contents

Method MapOrNull

Namespace
DisCatSharp.Entities
Assembly
DisCatSharp.dll

MapOrNull<TOut>(Func<T, TOut>)

Maps to None for None, to

default
for
null
and to the mapped value otherwise./>
public Optional<TOut> MapOrNull<TOut>(Func<T, TOut> mapper)

Parameters

mapper Func<T, TOut>

The function that does the mapping of the non-null T.

Returns

Optional<TOut>

The mapped value.

Type Parameters

TOut

The type to map to.