Table of Contents

Class FieldValue

Namespace
Typhon.Protocol
Assembly
Typhon.Protocol.dll

A value to encode. Numbers carry the components of a numeric field, or the flattened elements of a list; Text and Bytes carry the rest.

public sealed class FieldValue
Inheritance
FieldValue
Inherited Members

Constructors

FieldValue()

public FieldValue()

Properties

Bytes

Bytes, for a bytes or blob field.

public byte[] Bytes { get; init; }

Property Value

byte[]

Numbers

Numeric components, or a list's flattened element components.

public double[] Numbers { get; init; }

Property Value

double[]

Text

Text, for a str field.

public string Text { get; init; }

Property Value

string

Methods

Of(byte[])

Raw bytes.

public static FieldValue Of(byte[] bytes)

Parameters

bytes byte[]

The bytes.

Returns

FieldValue

The field value.

Of(double)

A scalar.

public static FieldValue Of(double value)

Parameters

value double

The value.

Returns

FieldValue

The field value.

Of(params double[])

A vector or quaternion.

public static FieldValue Of(params double[] components)

Parameters

components double[]

The components.

Returns

FieldValue

The field value.

Of(string)

A string.

public static FieldValue Of(string text)

Parameters

text string

The text.

Returns

FieldValue

The field value.