Struct OptionalNullable<T>
- Namespace
- Rinku
- Assembly
- Rinku.dll
Reads one reference value while accepting a missing row or a NULL value.
Both cases set HasValue to false.
public readonly struct OptionalNullable<T> : IWrapping<OptionalNullable<T>, T> where T : class
Type Parameters
T
- Implements
-
IWrapping<OptionalNullable<T>, T>
- Inherited Members
- Extension Methods
Constructors
OptionalNullable(T)
Reads one reference value while accepting a missing row or a NULL value.
Both cases set HasValue to false.
public OptionalNullable(T value)
Parameters
valueT
Fields
Value
The value, or null when the row was missing or its value was null.
[MaybeNull]
public readonly T? Value
Field Value
- T
Properties
HasValue
Whether a non-null value was read.
public bool HasValue { get; }
Property Value
Methods
Make(T)
Creates the wrapper from a value returned by a query.
public static OptionalNullable<T> Make(T val)
Parameters
valT
Returns
Operators
implicit operator T?(OptionalNullable<T>)
public static implicit operator T?(OptionalNullable<T> val)
Parameters
valOptionalNullable<T>
Returns
- T
implicit operator OptionalNullable<T>(T?)
public static implicit operator OptionalNullable<T>(T? val)
Parameters
valT