Table of Contents

Struct Option<T>

Namespace
Apache.Ignite
Assembly
Apache.Ignite.dll

A wrapper that may or may not contain a value of type T.

public readonly record struct Option<T> : IEquatable<Option<T>>

Type Parameters

T

Value type.

Implements
Inherited Members

Properties

HasValue

Gets a value indicating whether the value is present.

public bool HasValue { get; }

Property Value

bool

Value

Gets the value.

public T Value { get; }

Property Value

T

Methods

Deconstruct(out T, out bool)

Deconstructs this instance.

public void Deconstruct(out T value, out bool hasValue)

Parameters

value T

Value.

hasValue bool

Whether the value is present.

Select<TRes>(Func<T, TRes>)

Maps this instance to another type.

public Option<TRes> Select<TRes>(Func<T, TRes> selector)

Parameters

selector Func<T, TRes>

Selector.

Returns

Option<TRes>

Resulting option.

Type Parameters

TRes

Result type.