Class ValueExtensions (3.3.0)

public static class ValueExtensions

Extension methods on Value.

Inheritance

Object > ValueExtensions

Namespace

Google.Cloud.Datastore.V1

Assembly

Google.Cloud.Datastore.V1.dll

Methods

OrNull(Value)

public static Value OrNull(this Value value)

Returns value if it has a kind other than NullValue, or null otherwise. If value is null, this method returns null.

Parameter
NameDescription
valueValue

A Value reference, which may be null.

Returns
TypeDescription
Value

value if it is a non-null reference to a value with a kind other than NullValue; null otherwise

Remarks

The reverse of this operation would simply be value ?? Value.ForNull() using the null-coalescing operator.