Table of Contents

Struct ScalarValue

Namespace
Shard.Codecs
Assembly
Shard.Codecs.dll

Holds one string, boolean, double, Int32, or Int64 without widening BSON integers.

public readonly struct ScalarValue : IEquatable<ScalarValue>
Implements
Inherited Members

Properties

BooleanValue

public bool BooleanValue { get; }

Property Value

bool

DoubleValue

public double DoubleValue { get; }

Property Value

double

Int32Value

public int Int32Value { get; }

Property Value

int

Int64Value

public long Int64Value { get; }

Property Value

long

Kind

public ScalarValueKind Kind { get; }

Property Value

ScalarValueKind

StringValue

public string StringValue { get; }

Property Value

string

Methods

Equals(ScalarValue)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(ScalarValue other)

Parameters

other ScalarValue

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

Equals(object?)

Indicates whether this instance and a specified object are equal.

public override bool Equals(object? obj)

Parameters

obj object

The object to compare with the current instance.

Returns

bool

true if obj and this instance are the same type and represent the same value; otherwise, false.

From(bool)

public static ScalarValue From(bool value)

Parameters

value bool

Returns

ScalarValue

From(double)

public static ScalarValue From(double value)

Parameters

value double

Returns

ScalarValue

From(int)

public static ScalarValue From(int value)

Parameters

value int

Returns

ScalarValue

From(long)

public static ScalarValue From(long value)

Parameters

value long

Returns

ScalarValue

From(string)

public static ScalarValue From(string value)

Parameters

value string

Returns

ScalarValue

GetHashCode()

Returns the hash code for this instance.

public override int GetHashCode()

Returns

int

A 32-bit signed integer that is the hash code for this instance.

Operators

operator ==(ScalarValue, ScalarValue)

public static bool operator ==(ScalarValue left, ScalarValue right)

Parameters

left ScalarValue
right ScalarValue

Returns

bool

operator !=(ScalarValue, ScalarValue)

public static bool operator !=(ScalarValue left, ScalarValue right)

Parameters

left ScalarValue
right ScalarValue

Returns

bool