NullableReadOnlySpanT Structure

Represents a ReadOnlySpanT that may or may not have a value.

Definition

Namespace: Ookii.Common
Assembly: Ookii.Common (in Ookii.Common.dll) Version: 1.0.0+7c2900b8a16cd8ae46bdd79d8f105034712c5fa3
C#
public readonly ref struct NullableReadOnlySpan<T>
Inheritance
Object    ValueType    NullableReadOnlySpanT

Type Parameters

T
The type of the items in the ReadOnlySpanT.

Remarks

Because ReadOnlySpanT is a ref struct, it cannot be used with NullableT. This structure offers an alternative with similar functionality.

Constructors

NullableReadOnlySpanT Initializes a new instance of the NullableReadOnlySpanT structure.

Properties

HasValue Gets a value that indicates whether this instance contains a value.
Value Gets the contained value.

Methods

GetTypeGets the Type of the current instance.
(Inherited from Object)
GetValueOrDefault Returns the contained value, or the specified default value if there is no value.
GetValueOrElse Returns the contained value, or the value returned by the specified function if there is no value.
MapTResult(NullableReadOnlySpanTMapClassFuncTResult) Maps a NullableReadOnlySpanT to another value by applying a function to the contained value, or returns an empty value if there is no value.
MapTResult(NullableReadOnlySpanTMapReadOnlyFuncTResult) Maps a NullableReadOnlySpanT to another value by applying a function to the contained value, or returns an empty value if there is no value.
MapTResult(NullableReadOnlySpanTMapSpanFuncTResult) Maps a NullableReadOnlySpanT to another value by applying a function to the contained value, or returns an empty value if there is no value.
MapTResult(NullableReadOnlySpanTMapStructFuncTResult) Maps a NullableReadOnlySpanT to another value by applying a function to the contained value, or returns an empty value if there is no value.
ToString Returns a string that represents the current NullableReadOnlySpanT.
(Overrides ValueTypeToString)
TryGetValue Gets the contained value.

Operators

Equality(NullableReadOnlySpanT, NullableReadOnlySpanT) Compares two NullableReadOnlySpanT instances for equality.
(NullableReadOnlySpanT to ReadOnlySpanT) Explicitly converts a NullableReadOnlySpanT to a ReadOnlySpanT.
(NullableSpanT to NullableReadOnlySpanT) Implicitly converts a NullableSpanT to a NullableReadOnlySpanT.
(ReadOnlySpanT to NullableReadOnlySpanT) Implicitly converts a ReadOnlySpanT to a NullableReadOnlySpanT.
(SpanT to NullableReadOnlySpanT) Implicitly converts a SpanT to a NullableReadOnlySpanT.
Inequality(NullableReadOnlySpanT, NullableReadOnlySpanT) Compares two NullableReadOnlySpanT instances for inequality.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also