Google Cloud Datastore v1 API - Class Value (4.9.0)

public sealed class Value : IMessage<Value>, IEquatable<Value>, IDeepCloneable<Value>, IBufferMessage, IMessage

Reference documentation and code samples for the Google Cloud Datastore v1 API class Value.

A message that can hold any of the supported value types and associated metadata.

Inheritance

object > Value

Namespace

Google.Cloud.Datastore.V1

Assembly

Google.Cloud.Datastore.V1.dll

Constructors

Value()

public Value()

Value(Value)

public Value(Value other)
Parameter
NameDescription
otherValue

Properties

ArrayValue

public ArrayValue ArrayValue { get; set; }

An array value. Cannot contain another array value. A Value instance that sets field array_value must not set fields meaning or exclude_from_indexes.

Property Value
TypeDescription
ArrayValue

BlobValue

public ByteString BlobValue { get; set; }

A blob value. May have at most 1,000,000 bytes. When exclude_from_indexes is false, may have at most 1500 bytes. In JSON requests, must be base64-encoded.

Property Value
TypeDescription
ByteString

BooleanValue

public bool BooleanValue { get; set; }

A boolean value.

Property Value
TypeDescription
bool

DoubleValue

public double DoubleValue { get; set; }

A double value.

Property Value
TypeDescription
double

EntityValue

public Entity EntityValue { get; set; }

An entity value.

  • May have no key.
  • May have a key with an incomplete key path.
  • May have a reserved/read-only key.
Property Value
TypeDescription
Entity

ExcludeFromIndexes

public bool ExcludeFromIndexes { get; set; }

If the value should be excluded from all indexes including those defined explicitly.

Property Value
TypeDescription
bool

GeoPointValue

public LatLng GeoPointValue { get; set; }

A geo point value representing a point on the surface of Earth.

Property Value
TypeDescription
LatLng

HasBlobValue

public bool HasBlobValue { get; }

Gets whether the "blob_value" field is set

Property Value
TypeDescription
bool

HasBooleanValue

public bool HasBooleanValue { get; }

Gets whether the "boolean_value" field is set

Property Value
TypeDescription
bool

HasDoubleValue

public bool HasDoubleValue { get; }

Gets whether the "double_value" field is set

Property Value
TypeDescription
bool

HasIntegerValue

public bool HasIntegerValue { get; }

Gets whether the "integer_value" field is set

Property Value
TypeDescription
bool

HasNullValue

public bool HasNullValue { get; }

Gets whether the "null_value" field is set

Property Value
TypeDescription
bool

HasStringValue

public bool HasStringValue { get; }

Gets whether the "string_value" field is set

Property Value
TypeDescription
bool

IntegerValue

public long IntegerValue { get; set; }

An integer value.

Property Value
TypeDescription
long

IsNull

public bool IsNull { get; }

Convenience property to determine whether this value has a type of NullValue.

Property Value
TypeDescription
bool

true if the type is NullValue; false otherwise.

KeyValue

public Key KeyValue { get; set; }

A key value.

Property Value
TypeDescription
Key

Meaning

public int Meaning { get; set; }

The meaning field should only be populated for backwards compatibility.

Property Value
TypeDescription
int

NullValue

public NullValue NullValue { get; set; }

A null value.

Property Value
TypeDescription
NullValue

StringValue

public string StringValue { get; set; }

A UTF-8 encoded string value. When exclude_from_indexes is false (it is indexed) , may have at most 1500 bytes. Otherwise, may be set to at most 1,000,000 bytes.

Property Value
TypeDescription
string

TimestampValue

public Timestamp TimestampValue { get; set; }

A timestamp value. When stored in the Datastore, precise only to microseconds; any additional precision is rounded down.

Property Value
TypeDescription
Timestamp

ValueTypeCase

public Value.ValueTypeOneofCase ValueTypeCase { get; }
Property Value
TypeDescription
ValueValueTypeOneofCase

Methods

ForNull()

public static Value ForNull()

Creates a new Value with a type of NullValue.

Returns
TypeDescription
Value

A value with a type of NullValue.

ToDateTimeFromProjection()

public DateTime ToDateTimeFromProjection()

Converts this value to a DateTime, if it's either a timestamp value or a 64-bit integer value. This method is intended to be used if the value may have been returned from a projection, where timestamps are converted into integers in the form of a number of microseconds since the Unix epoch.

Returns
TypeDescription
DateTime

The converted value.

ToDateTimeOffsetFromProjection()

public DateTimeOffset ToDateTimeOffsetFromProjection()

Converts this value to a DateTimeOffset, if it's either a timestamp value or a 64-bit integer value. This method is intended to be used if the value may have been returned from a projection, where timestamps are converted into integers in the form of a number of microseconds since the Unix epoch.

Returns
TypeDescription
DateTimeOffset

The converted value.

Operators

explicit operator ArrayValue(Value)

public static explicit operator ArrayValue(Value value)

Extracts the array value from a Value.

Parameter
NameDescription
valueValue

The value to convert.

Returns
TypeDescription
ArrayValue

The embedded ArrayValue, or null if value is null or has a kind of NullValue.

Exceptions
TypeDescription
InvalidOperationException

The value does not have the expected kind.

explicit operator ArrayValue[](Value)

public static explicit operator ArrayValue[](Value value)

Converts a Value to an array using first the conversion to ArrayValue and then the conversion to the array type.

Parameter
NameDescription
valueValue

The value to convert.

Returns
TypeDescription
ArrayValue

The converted array, or null if value is null.

Exceptions
TypeDescription
InvalidOperationException

The value does not represent an array, or any value within it does not have the expected kind.

explicit operator Entity(Value)

public static explicit operator Entity(Value value)

Extracts the array value from a Value.

Parameter
NameDescription
valueValue

The value to convert.

Returns
TypeDescription
Entity

The embedded EntityValue, or null if value is null.

Exceptions
TypeDescription
InvalidOperationException

The value does not have the expected kind.

explicit operator Entity[](Value)

public static explicit operator Entity[](Value value)

Converts a Value to an array using first the conversion to ArrayValue and then the conversion to the array type.

Parameter
NameDescription
valueValue

The value to convert.

Returns
TypeDescription
Entity

The converted array, or null if value is null.

Exceptions
TypeDescription
InvalidOperationException

The value does not represent an array, or any value within it does not have the expected kind.

explicit operator Key(Value)

public static explicit operator Key(Value value)

Extracts the key value from a Value.

Parameter
NameDescription
valueValue

The value to convert.

Returns
TypeDescription
Key

The embedded KeyValue, or null if value is null or has a kind of NullValue.

Exceptions
TypeDescription
InvalidOperationException

The value does not have the expected kind.

explicit operator Key[](Value)

public static explicit operator Key[](Value value)

Converts a Value to an array using first the conversion to ArrayValue and then the conversion to the array type.

Parameter
NameDescription
valueValue

The value to convert.

Returns
TypeDescription
Key

The converted array, or null if value is null.

Exceptions
TypeDescription
InvalidOperationException

The value does not represent an array, or any value within it does not have the expected kind.

explicit operator Value[](Value)

public static explicit operator Value[](Value value)

Converts a Value to an array using first the conversion to ArrayValue and then the conversion to the array type.

Parameter
NameDescription
valueValue

The value to convert.

Returns
TypeDescription
Value

The converted array, or null if value is null.

Exceptions
TypeDescription
InvalidOperationException

The value does not represent an array.

explicit operator ByteString(Value)

public static explicit operator ByteString(Value value)

Extracts the blob value from a Value as a ByteString.

Parameter
NameDescription
valueValue

The value to convert.

Returns
TypeDescription
ByteString

The embedded BlobValue, or null if value is null or has a kind of NullValue.

Exceptions
TypeDescription
InvalidOperationException

The value does not have the expected kind.

explicit operator ByteString[](Value)

public static explicit operator ByteString[](Value value)

Converts a Value to an array using first the conversion to ArrayValue and then the conversion to the array type.

Parameter
NameDescription
valueValue

The value to convert.

Returns
TypeDescription
ByteString

The converted array, or null if value is null.

Exceptions
TypeDescription
InvalidOperationException

The value does not represent an array, or any value within it does not have the expected kind.

explicit operator Timestamp(Value)

public static explicit operator Timestamp(Value value)

Extracts the timestamp value from a Value as a Timestamp.

Parameter
NameDescription
valueValue

The value to convert.

Returns
TypeDescription
Timestamp

The embedded TimestampValue, or null if value is null or has a kind of NullValue.

Exceptions
TypeDescription
InvalidOperationException

The value does not have the expected kind.

explicit operator Timestamp[](Value)

public static explicit operator Timestamp[](Value value)

Converts a Value to an array using first the conversion to ArrayValue and then the conversion to the array type.

Parameter
NameDescription
valueValue

The value to convert.

Returns
TypeDescription
Timestamp

The converted array, or null if value is null.

Exceptions
TypeDescription
InvalidOperationException

The value does not represent an array, or any value within it does not have the expected kind.

explicit operator LatLng(Value)

public static explicit operator LatLng(Value value)

Extracts the geolocation value from a Value.

Parameter
NameDescription
valueValue

The value to convert.

Returns
TypeDescription
LatLng

The embedded GeoPointValue, or null if value is null or has a kind of NullValue.

Exceptions
TypeDescription
InvalidOperationException

The value does not have the expected kind.

explicit operator LatLng[](Value)

public static explicit operator LatLng[](Value value)

Converts a Value to an array using first the conversion to ArrayValue and then the conversion to the array type.

Parameter
NameDescription
valueValue

The value to convert.

Returns
TypeDescription
LatLng

The converted array, or null if value is null.

Exceptions
TypeDescription
InvalidOperationException

The value does not represent an array, or any value within it does not have the expected kind.

explicit operator bool(Value)

public static explicit operator bool(Value value)

Extracts the Boolean value from a Value.

Parameter
NameDescription
valueValue

The value to convert.

Returns
TypeDescription
bool

The embedded BooleanValue.

Exceptions
TypeDescription
InvalidOperationException

The value does not have the expected kind.

ArgumentNullException

value is null.

explicit operator bool[](Value)

public static explicit operator bool[](Value value)

Converts a Value to an array using first the conversion to ArrayValue and then the conversion to the array type.

Parameter
NameDescription
valueValue

The value to convert.

Returns
TypeDescription
bool

The converted array, or null if value is null.

Exceptions
TypeDescription
InvalidOperationException

The value does not represent an array, or any value within it does not have the expected kind.

explicit operator byte[](Value)

public static explicit operator byte[](Value value)

Extracts the blob value from a Value as a byte array

Parameter
NameDescription
valueValue

The value to convert.

Returns
TypeDescription
byte

The embedded BlobValue, or null if value is null or has a kind of NullValue.

Exceptions
TypeDescription
InvalidOperationException

The value does not have the expected kind.

explicit operator byte[][](Value)

public static explicit operator byte[][](Value value)

Converts a Value to an array using first the conversion to ArrayValue and then the conversion to the array type.

Parameter
NameDescription
valueValue

The value to convert.

Returns
TypeDescription
byte

The converted array, or null if value is null.

Exceptions
TypeDescription
InvalidOperationException

The value does not represent an array, or any value within it does not have the expected kind.

explicit operator DateTime(Value)

public static explicit operator DateTime(Value value)

Extracts the timestamp value from a Value as a DateTime.

Parameter
NameDescription
valueValue

The value to convert.

Returns
TypeDescription
DateTime

The embedded TimestampValue as a DateTime with a DateTimeKind of Utc.

Exceptions
TypeDescription
InvalidOperationException

The value does not have the expected kind.

ArgumentNullException

value is null.

explicit operator DateTimeOffset(Value)

public static explicit operator DateTimeOffset(Value value)

Extracts the timestamp value from a Value as a DateTimeOffset.

Parameter
NameDescription
valueValue

The value to convert.

Returns
TypeDescription
DateTimeOffset

The embedded TimestampValue as a DateTimeOffset with an offset of zero.

Exceptions
TypeDescription
InvalidOperationException

The value does not have the expected kind.

ArgumentNullException

value is null.

explicit operator DateTimeOffset[](Value)

public static explicit operator DateTimeOffset[](Value value)

Converts a Value to an array using first the conversion to ArrayValue and then the conversion to the array type.

Parameter
NameDescription
valueValue

The value to convert.

Returns
TypeDescription
DateTimeOffset

The converted array, or null if value is null.

Exceptions
TypeDescription
InvalidOperationException

The value does not represent an array, or any value within it does not have the expected kind.

explicit operator DateTime[](Value)

public static explicit operator DateTime[](Value value)

Converts a Value to an array using first the conversion to ArrayValue and then the conversion to the array type.

Parameter
NameDescription
valueValue

The value to convert.

Returns
TypeDescription
DateTime

The converted array, or null if value is null.

Exceptions
TypeDescription
InvalidOperationException

The value does not represent an array, or any value within it does not have the expected kind.

explicit operator double(Value)

public static explicit operator double(Value value)

Extracts the floating point value from a Value.

Parameter
NameDescription
valueValue

The value to convert.

Returns
TypeDescription
double

The embedded DoubleValue.

Exceptions
TypeDescription
InvalidOperationException

The value does not have the expected kind.

ArgumentNullException

value is null.

explicit operator double[](Value)

public static explicit operator double[](Value value)

Converts a Value to an array using first the conversion to ArrayValue and then the conversion to the array type.

Parameter
NameDescription
valueValue

The value to convert.

Returns
TypeDescription
double

The converted array, or null if value is null.

Exceptions
TypeDescription
InvalidOperationException

The value does not represent an array, or any value within it does not have the expected kind.

explicit operator long(Value)

public static explicit operator long(Value value)

Extracts the integer value from a Value.

Parameter
NameDescription
valueValue

The value to convert.

Returns
TypeDescription
long

The embedded IntegerValue.

Exceptions
TypeDescription
InvalidOperationException

The value does not have the expected kind.

ArgumentNullException

value is null.

explicit operator long[](Value)

public static explicit operator long[](Value value)

Converts a Value to an array using first the conversion to ArrayValue and then the conversion to the array type.

Parameter
NameDescription
valueValue

The value to convert.

Returns
TypeDescription
long

The converted array, or null if value is null.

Exceptions
TypeDescription
InvalidOperationException

The value does not represent an array, or any value within it does not have the expected kind.

explicit operator bool?(Value)

public static explicit operator bool?(Value value)

Extracts the Boolean value from a Value.

Parameter
NameDescription
valueValue

The value to convert.

Returns
TypeDescription
bool

The embedded BooleanValue, or null if value is null or has a kind of NullValue.

Exceptions
TypeDescription
InvalidOperationException

The value does not have the expected kind.

explicit operator bool?[](Value)

public static explicit operator bool?[](Value value)

Converts a Value to an array using first the conversion to ArrayValue and then the conversion to the array type.

Parameter
NameDescription
valueValue

The value to convert.

Returns
TypeDescription
bool

The converted array, or null if value is null.

Exceptions
TypeDescription
InvalidOperationException

The value does not represent an array, or any value within it does not have the expected kind.

explicit operator DateTimeOffset?(Value)

public static explicit operator DateTimeOffset?(Value value)

Extracts the timestamp value from a Value as a nullable DateTimeOffset.

Parameter
NameDescription
valueValue

The value to convert.

Returns
TypeDescription
DateTimeOffset

The embedded TimestampValue as a DateTimeOffset with an offset of zero, or null if value is null or has a kind of NullValue.

Exceptions
TypeDescription
InvalidOperationException

The value does not have the expected kind.

explicit operator DateTimeOffset?[](Value)

public static explicit operator DateTimeOffset?[](Value value)

Converts a Value to an array using first the conversion to ArrayValue and then the conversion to the array type.

Parameter
NameDescription
valueValue

The value to convert.

Returns
TypeDescription
DateTimeOffset

The converted array, or null if value is null.

Exceptions
TypeDescription
InvalidOperationException

The value does not represent an array, or any value within it does not have the expected kind.

explicit operator DateTime?(Value)

public static explicit operator DateTime?(Value value)

Extracts the timestamp value from a Value as a nullable DateTime.

Parameter
NameDescription
valueValue

The value to convert.

Returns
TypeDescription
DateTime

The embedded TimestampValue as a DateTime with a DateTimeKind of Utc, or null if value is null or has a kind of NullValue.

Exceptions
TypeDescription
InvalidOperationException

The value does not have the expected kind.

explicit operator DateTime?[](Value)

public static explicit operator DateTime?[](Value value)

Converts a Value to an array using first the conversion to ArrayValue and then the conversion to the array type.

Parameter
NameDescription
valueValue

The value to convert.

Returns
TypeDescription
DateTime

The converted array, or null if value is null.

Exceptions
TypeDescription
InvalidOperationException

The value does not represent an array, or any value within it does not have the expected kind.

explicit operator double?(Value)

public static explicit operator double?(Value value)

Extracts the floating point value from a Value.

Parameter
NameDescription
valueValue

The value to convert.

Returns
TypeDescription
double

The embedded DoubleValue, or null if value is null or has a kind of NullValue.

Exceptions
TypeDescription
InvalidOperationException

The value does not have the expected kind.

explicit operator double?[](Value)

public static explicit operator double?[](Value value)

Converts a Value to an array using first the conversion to ArrayValue and then the conversion to the array type.

Parameter
NameDescription
valueValue

The value to convert.

Returns
TypeDescription
double

The converted array, or null if value is null.

Exceptions
TypeDescription
InvalidOperationException

The value does not represent an array, or any value within it does not have the expected kind.

explicit operator long?(Value)

public static explicit operator long?(Value value)

Extracts the integer value from a Value.

Parameter
NameDescription
valueValue

The value to convert.

Returns
TypeDescription
long

The embedded IntegerValue, or null if value is null or has a kind of NullValue.

Exceptions
TypeDescription
InvalidOperationException

The value does not have the expected kind.

explicit operator long?[](Value)

public static explicit operator long?[](Value value)

Converts a Value to an array using first the conversion to ArrayValue and then the conversion to the array type.

Parameter
NameDescription
valueValue

The value to convert.

Returns
TypeDescription
long

The converted array, or null if value is null.

Exceptions
TypeDescription
InvalidOperationException

The value does not represent an array, or any value within it does not have the expected kind.

explicit operator string(Value)

public static explicit operator string(Value value)

Extracts the string value from a Value.

Parameter
NameDescription
valueValue

The value to convert.

Returns
TypeDescription
string

The embedded StringValue, or null if value is null or has a kind of NullValue.

Exceptions
TypeDescription
InvalidOperationException

The value does not have the expected kind.

explicit operator string[](Value)

public static explicit operator string[](Value value)

Converts a Value to an array using first the conversion to ArrayValue and then the conversion to the array type.

Parameter
NameDescription
valueValue

The value to convert.

Returns
TypeDescription
string

The converted array, or null if value is null.

Exceptions
TypeDescription
InvalidOperationException

The value does not represent an array, or any value within it does not have the expected kind.

implicit operator Value(ArrayValue)

public static implicit operator Value(ArrayValue value)

Returns a Value with a kind of ArrayValue and the given data, or a null reference of value is null.

Parameter
NameDescription
valueArrayValue

The value to convert.

Returns
TypeDescription
Value

A Value corresponding to value.

implicit operator Value(ArrayValue[])

public static implicit operator Value(ArrayValue[] values)

Converts an array to a Value, by first converting to an ArrayValue and then converting the result to a Value.

Parameter
NameDescription
valuesArrayValue

The array to convert.

Returns
TypeDescription
Value

The converted array as a Value, or null if values is null.

implicit operator Value(Entity)

public static implicit operator Value(Entity value)

Returns a Value with a kind of EntityValue and the given data, or a null reference of value is null.

Parameter
NameDescription
valueEntity

The value to convert.

Returns
TypeDescription
Value

A Value corresponding to value.

implicit operator Value(Entity[])

public static implicit operator Value(Entity[] values)

Converts an array to a Value, by first converting to an ArrayValue and then converting the result to a Value.

Parameter
NameDescription
valuesEntity

The array to convert.

Returns
TypeDescription
Value

The converted array as a Value, or null if values is null.

implicit operator Value(Key)

public static implicit operator Value(Key value)

Returns a Value with a kind of KeyValue and the given data, or a null reference of value is null.

Parameter
NameDescription
valueKey

The value to convert.

Returns
TypeDescription
Value

A Value corresponding to value.

implicit operator Value(Key[])

public static implicit operator Value(Key[] values)

Converts an array to a Value, by first converting to an ArrayValue and then converting the result to a Value.

Parameter
NameDescription
valuesKey

The array to convert.

Returns
TypeDescription
Value

The converted array as a Value, or null if values is null.

implicit operator Value(Value[])

public static implicit operator Value(Value[] values)

Converts an array to a Value, by first converting to an ArrayValue and then converting the result to a Value.

Parameter
NameDescription
valuesValue

The array to convert.

Returns
TypeDescription
Value

The converted array as a Value, or null if values is null.

implicit operator Value(ByteString)

public static implicit operator Value(ByteString value)

Returns a Value with a kind of BlobValue and the given data, or a null reference of value is null.

Parameter
NameDescription
valueByteString

The value to convert.

Returns
TypeDescription
Value

A Value corresponding to value.

implicit operator Value(ByteString[])

public static implicit operator Value(ByteString[] values)

Converts an array to a Value, by first converting to an ArrayValue and then converting the result to a Value.

Parameter
NameDescription
valuesByteString

The array to convert.

Returns
TypeDescription
Value

The converted array as a Value, or null if values is null.

implicit operator Value(Timestamp)

public static implicit operator Value(Timestamp value)

Returns a Value with a kind of TimestampValue and the given data, or a null reference of value is null.

Parameter
NameDescription
valueTimestamp

The value to convert.

Returns
TypeDescription
Value

A Value corresponding to value.

implicit operator Value(Timestamp[])

public static implicit operator Value(Timestamp[] values)

Converts an array to a Value, by first converting to an ArrayValue and then converting the result to a Value.

Parameter
NameDescription
valuesTimestamp

The array to convert.

Returns
TypeDescription
Value

The converted array as a Value, or null if values is null.

implicit operator Value(LatLng)

public static implicit operator Value(LatLng value)

Returns a Value with a kind of GeoPointValue and the given data, or a null reference of value is null.

Parameter
NameDescription
valueLatLng

The value to convert.

Returns
TypeDescription
Value

A Value corresponding to value.

implicit operator Value(LatLng[])

public static implicit operator Value(LatLng[] values)

Converts an array to a Value, by first converting to an ArrayValue and then converting the result to a Value.

Parameter
NameDescription
valuesLatLng

The array to convert.

Returns
TypeDescription
Value

The converted array as a Value, or null if values is null.

implicit operator Value(bool)

public static implicit operator Value(bool value)

Returns a Value with a kind of BooleanValue and the given data.

Parameter
NameDescription
valuebool

The value to convert.

Returns
TypeDescription
Value

A Value corresponding to value.

implicit operator Value(bool[])

public static implicit operator Value(bool[] values)

Converts an array to a Value, by first converting to an ArrayValue and then converting the result to a Value.

Parameter
NameDescription
valuesbool

The array to convert.

Returns
TypeDescription
Value

The converted array as a Value, or null if values is null.

implicit operator Value(byte[])

public static implicit operator Value(byte[] value)

Returns a Value with a kind of BlobValue and the given data, or a null reference of value is null.

Parameter
NameDescription
valuebyte

The value to convert.

Returns
TypeDescription
Value

A Value corresponding to value.

implicit operator Value(byte[][])

public static implicit operator Value(byte[][] values)

Converts an array to a Value, by first converting to an ArrayValue and then converting the result to a Value.

Parameter
NameDescription
valuesbyte

The array to convert.

Returns
TypeDescription
Value

The converted array as a Value, or null if values is null.

implicit operator Value(DateTime)

public static implicit operator Value(DateTime value)

Returns a Value with a kind of TimestampValue and the given data.

Parameter
NameDescription
valueDateTime

The value to convert.

Returns
TypeDescription
Value

A Value corresponding to value.

implicit operator Value(DateTimeOffset)

public static implicit operator Value(DateTimeOffset value)

Returns a Value with a kind of TimestampValue and the given data.

Parameter
NameDescription
valueDateTimeOffset

The value to convert.

Returns
TypeDescription
Value

A Value corresponding to value.

implicit operator Value(DateTimeOffset[])

public static implicit operator Value(DateTimeOffset[] values)

Converts an array to a Value, by first converting to an ArrayValue and then converting the result to a Value.

Parameter
NameDescription
valuesDateTimeOffset

The array to convert.

Returns
TypeDescription
Value

The converted array as a Value, or null if values is null.

implicit operator Value(DateTime[])

public static implicit operator Value(DateTime[] values)

Converts an array to a Value, by first converting to an ArrayValue and then converting the result to a Value.

Parameter
NameDescription
valuesDateTime

The array to convert.

Returns
TypeDescription
Value

The converted array as a Value, or null if values is null.

implicit operator Value(double)

public static implicit operator Value(double value)

Returns a Value with a kind of DoubleValue and the given data.

Parameter
NameDescription
valuedouble

The value to convert.

Returns
TypeDescription
Value

A Value corresponding to value.

implicit operator Value(double[])

public static implicit operator Value(double[] values)

Converts an array to a Value, by first converting to an ArrayValue and then converting the result to a Value.

Parameter
NameDescription
valuesdouble

The array to convert.

Returns
TypeDescription
Value

The converted array as a Value, or null if values is null.

implicit operator Value(long)

public static implicit operator Value(long value)

Returns a Value with a kind of IntegerValue and the given data.

Parameter
NameDescription
valuelong

The value to convert.

Returns
TypeDescription
Value

A Value corresponding to value.

implicit operator Value(long[])

public static implicit operator Value(long[] values)

Converts an array to a Value, by first converting to an ArrayValue and then converting the result to a Value.

Parameter
NameDescription
valueslong

The array to convert.

Returns
TypeDescription
Value

The converted array as a Value, or null if values is null.

implicit operator Value(bool?)

public static implicit operator Value(bool? value)

Returns a Value with a kind of BooleanValue and the given data, or a null reference of value is null.

Parameter
NameDescription
valuebool

The value to convert.

Returns
TypeDescription
Value

A Value corresponding to value.

implicit operator Value(bool?[])

public static implicit operator Value(bool?[] values)

Converts an array to a Value, by first converting to an ArrayValue and then converting the result to a Value.

Parameter
NameDescription
valuesbool

The array to convert.

Returns
TypeDescription
Value

The converted array as a Value, or null if values is null.

implicit operator Value(DateTimeOffset?)

public static implicit operator Value(DateTimeOffset? value)

Returns a Value with a kind of TimestampValue and the given data, or a null reference of value is null.

Parameter
NameDescription
valueDateTimeOffset

The value to convert.

Returns
TypeDescription
Value

A Value corresponding to value.

implicit operator Value(DateTimeOffset?[])

public static implicit operator Value(DateTimeOffset?[] values)

Converts an array to a Value, by first converting to an ArrayValue and then converting the result to a Value.

Parameter
NameDescription
valuesDateTimeOffset

The array to convert.

Returns
TypeDescription
Value

The converted array as a Value, or null if values is null.

implicit operator Value(DateTime?)

public static implicit operator Value(DateTime? value)

Returns a Value with a kind of TimestampValue and the given data, or a null reference of value is null.

Parameter
NameDescription
valueDateTime

The value to convert.

Returns
TypeDescription
Value

A Value corresponding to value.

implicit operator Value(DateTime?[])

public static implicit operator Value(DateTime?[] values)

Converts an array to a Value, by first converting to an ArrayValue and then converting the result to a Value.

Parameter
NameDescription
valuesDateTime

The array to convert.

Returns
TypeDescription
Value

The converted array as a Value, or null if values is null.

implicit operator Value(double?)

public static implicit operator Value(double? value)

Returns a Value with a kind of DoubleValue and the given data, or a null reference of value is null.

Parameter
NameDescription
valuedouble

The value to convert.

Returns
TypeDescription
Value

A Value corresponding to value.

implicit operator Value(double?[])

public static implicit operator Value(double?[] values)

Converts an array to a Value, by first converting to an ArrayValue and then converting the result to a Value.

Parameter
NameDescription
valuesdouble

The array to convert.

Returns
TypeDescription
Value

The converted array as a Value, or null if values is null.

implicit operator Value(long?)

public static implicit operator Value(long? value)

Returns a Value with a kind of IntegerValue and the given data, or a null reference of value is null.

Parameter
NameDescription
valuelong

The value to convert.

Returns
TypeDescription
Value

A Value corresponding to value.

implicit operator Value(long?[])

public static implicit operator Value(long?[] values)

Converts an array to a Value, by first converting to an ArrayValue and then converting the result to a Value.

Parameter
NameDescription
valueslong

The array to convert.

Returns
TypeDescription
Value

The converted array as a Value, or null if values is null.

implicit operator Value(string)

public static implicit operator Value(string value)

Returns a Value with a kind of StringValue and the given data, or a null reference of value is null.

Parameter
NameDescription
valuestring

The value to convert.

Returns
TypeDescription
Value

A Value corresponding to value.

implicit operator Value(string[])

public static implicit operator Value(string[] values)

Converts an array to a Value, by first converting to an ArrayValue and then converting the result to a Value.

Parameter
NameDescription
valuesstring

The array to convert.

Returns
TypeDescription
Value

The converted array as a Value, or null if values is null.

Extension Method