Google Cloud Datastore v1 API - Class ValueExtensions (4.13.0)

public static class ValueExtensions

Reference documentation and code samples for the Google Cloud Datastore v1 API 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
Name Description
value Value

A Value reference, which may be null.

Returns
Type Description
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.