IntelligenceX

API Reference

Struct

OptionalValue`1

Namespace IntelligenceX.Utils
Assembly IntelligenceX
Base ValueType
Modifiers sealed

Represents an optional value with explicit "specified" state.

Inheritance

  • ValueType
  • OptionalValue`1

Usage

Explore 6 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Accepted by parameters 2

Type Parameters

T

Constructors

public OptionalValue<T>(Boolean isSpecified, T? value) #

Initializes a new optional value.

Parameters

isSpecified System.Boolean requiredposition: 0
Whether the value is specified.
value T? requiredposition: 1
The value when specified.

Methods

public static OptionalValue<T?> FromValue(T? value) #
Returns: OptionalValue<T?>

Returns a specified optional value with the provided payload.

Parameters

value T? requiredposition: 0

Properties

public Boolean IsSpecified { get; } #

Gets a value indicating whether the value is specified.

public T? Value { get; } #

Gets the underlying value when specified.

public static OptionalValue<T?> Unspecified { get; } #

Returns an unspecified optional value.