Record

Description

struct Tinman.Core.IO.Serialization.Record

Helper class for using the Protocol Buffers wire format for serialization.

Public / Constants

None


public static readonly attribute None → (Record)

Special Record value that indicates a non-existent record.

Public / Constructors

Read


public static method Read → (1)

wire in : IByteReader

[not-null]
The input stream.

returns → Record

The Record to use for reading the payload.

Begins to read a record from the given Protocol Buffers wire format stream.

IOException

If an I/O error has occurred.

Write


public static method Write → (3)

wire in : IByteWriter

[not-null]
The output stream.

field in : int32

The field number.

type in : Wire

The wire type.

returns → Record

The Record to use for writing the payload.

Begins to write a record to the given Protocol Buffers wire format stream.

IOException

If an I/O error has occurred.

Public / Methods

Read_bool_1


public method Read_bool_1 → (1)

current opt : bool = false

The current value.

returns → bool

The read value.

Reads a single bool field value (Wire.VARINT) or the last one of a packed repeated field (Wire.LEN).

IOException

If an I/O error has occurred.

Read_bool_​N

2 overloads


public method Read_bool_N1 → (1)

output in : ICollector<bool>

[not-null]
The value output.

Reads a single bool field value (Wire.VARINT) or all packed repeated field values (Wire.LEN).

IOException

If an I/O error has occurred.


public method Read_bool_N2 → (1)

output in : ArrayVector<bool>

The value output or null.

returns → ArrayVector<bool>

The value output.

Reads a single bool field value (Wire.VARINT) or all packed repeated field values (Wire.LEN).

IOException

If an I/O error has occurred.

Read_bytes


public method Read_bytes → ()

returns → int8 [ ]

The read value.

Reads a single bytes field value (Wire.LEN).

IOException

If an I/O error has occurred.

Read_double_1


public method Read_double_1 → (1)

current opt : float64 = 0

The current value.

returns → float64

The read value.

Reads a single double field value (Wire.I64) or the last one of a packed repeated field (Wire.LEN).

IOException

If an I/O error has occurred.

Read_double_​N

2 overloads


public method Read_double_N1 → (1)

output in : ICollector<float64>

[not-null]
The value output.

Reads a single double field value (Wire.I64) or all packed repeated field values (Wire.LEN).

IOException

If an I/O error has occurred.


public method Read_double_N2 → (1)

output in : ArrayVector<float64>

The value output or null.

returns → ArrayVector<float64>

The value output.

Reads a single double field value (Wire.I64) or all packed repeated field values (Wire.LEN).

IOException

If an I/O error has occurred.

Read_enum_1


public method Read_enum_1 → (1)
<T val : Enum>

current in : T

The current value.

returns → T

The read value.

Reads a single enum field value (Wire.VARINT) or the last one of a packed repeated field (Wire.LEN).

IOException

If an I/O error has occurred.

Read_enum_​N

2 overloads


public method Read_enum_N1 → (1)
<T val : Enum>

output in : ICollector<T>

[not-null]
The value output.

Reads a single enum field value (Wire.VARINT) or all packed repeated field values (Wire.LEN).

IOException

If an I/O error has occurred.


public method Read_enum_N2 → (1)
<T val : Enum>

output in : ArrayVector<T>

The value output or null.

returns → ArrayVector<T>

The value output.

Reads a single enum field value (Wire.VARINT) or all packed repeated field values (Wire.LEN).

IOException

If an I/O error has occurred.

Read_fixed32_1


public method Read_fixed32_1 → (1)

current opt : int32 = 0

The current value.

returns → int32

The read value.

Reads a single fixed32, sfixed32 field value (Wire.I32) or the last one of a packed repeated field (Wire.LEN).

IOException

If an I/O error has occurred.

Read_fixed32_​N

2 overloads


public method Read_fixed32_N1 → (1)

output in : ICollector<int32>

[not-null]
The value output.

Reads a single fixed32, sfixed32 field value (Wire.I32) or all packed repeated field values (Wire.LEN).

IOException

If an I/O error has occurred.


public method Read_fixed32_N2 → (1)

output in : ArrayVector<int32>

The value output or null.

returns → ArrayVector<int32>

The value output.

Reads a single fixed32, sfixed32 field value (Wire.I32) or all packed repeated field values (Wire.LEN).

IOException

If an I/O error has occurred.

Read_fixed64_1


public method Read_fixed64_1 → (1)

current opt : int64 = 0

The current value.

returns → int64

The read value.

Reads a single fixed64, sfixed64 field value (Wire.I64) or the last one of a packed repeated field (Wire.LEN).

IOException

If an I/O error has occurred.

Read_fixed64_​N

2 overloads


public method Read_fixed64_N1 → (1)

output in : ICollector<int64>

[not-null]
The value output.

Reads a single fixed64, sfixed64 field value (Wire.I64) or all packed repeated field values (Wire.LEN).

IOException

If an I/O error has occurred.


public method Read_fixed64_N2 → (1)

output in : ArrayVector<int64>

The value output or null.

returns → ArrayVector<int64>

The value output.

Reads a single fixed64, sfixed64 field value (Wire.I64) or all packed repeated field values (Wire.LEN).

IOException

If an I/O error has occurred.

Read_float_1


public method Read_float_1 → (1)

current opt : float32 = 0

The current value.

returns → float32

The read value.

Reads a single float field value (Wire.I32) or the last one of a packed repeated field (Wire.LEN).

IOException

If an I/O error has occurred.

Read_float_​N

2 overloads


public method Read_float_N1 → (1)

output in : ICollector<float32>

[not-null]
The value output.

Reads a single float field value (Wire.I32) or all packed repeated field values (Wire.LEN).

IOException

If an I/O error has occurred.


public method Read_float_N2 → (1)

output in : ArrayVector<float32>

The value output or null.

returns → ArrayVector<float32>

The value output.

Reads a single float field value (Wire.I32) or all packed repeated field values (Wire.LEN).

IOException

If an I/O error has occurred.

Read_length


public method Read_length → ()

returns → int32

The read value.

Reads a length value (Wire.LEN).

IOException

If an I/O error has occurred.

Read_object

3 overloads


public method Read_object1 → (2)
<T ref : IProtonizable>

wire in : IProtonizer

[not-null]
The wire format stream.

current in : T

The output object or null to create a new one.

returns → T

The read value.

Reads a single embedded message field value (Wire.LEN).

IOException

If an I/O error has occurred.


public method Read_object2 → (3)
<T ref : IProtonizable>

wire in : IProtonizer

[not-null]
The wire format stream.

output in : ICollector<T>

[not-null]
The value output.

current opt : IProtonizable = null

The output object or null to create a new one.

Reads a single embedded message field value (Wire.LEN).

IOException

If an I/O error has occurred.


public method Read_object3 → (3)
<T ref : IProtonizable>

wire in : IProtonizer

[not-null]
The wire format stream.

output in : ArrayVector<T>

The value output or null.

current opt : IProtonizable = null

The output object or null to create a new one.

returns → ArrayVector<T>

The value output.

Reads a single embedded message field value (Wire.LEN).

IOException

If an I/O error has occurred.

Read_object2


public method Read_object2 → (3)
<T ref : IProtonizable>

wire in : IProtonizer

[not-null]
The wire format stream.

output in : ConsumerDelegate<T>

[not-null]
The value output.

current in : T

[not-null]
The output object.

Reads a single embedded message field value (Wire.LEN).

This method calls IProtonizable.ProtoDefault on current in, then delegates to Read_object1 and finally invokes the given output in callback, passing current in.

IOException

If an I/O error has occurred.

Read_sint32_1


public method Read_sint32_1 → (1)

current opt : int32 = 0

The current value.

returns → int32

The read value.

Reads a single sint32 field value (Wire.VARINT) or the last one of a packed repeated field (Wire.LEN).

IOException

If an I/O error has occurred.

Read_sint32_​N

2 overloads


public method Read_sint32_N1 → (1)

output in : ICollector<int32>

[not-null]
The value output.

Reads a single sint32 field value (Wire.VARINT) or all packed repeated field values (Wire.LEN).

IOException

If an I/O error has occurred.


public method Read_sint32_N2 → (1)

output in : ArrayVector<int32>

The value output or null.

returns → ArrayVector<int32>

The value output.

Reads a single sint32 field value (Wire.VARINT) or all packed repeated field values (Wire.LEN).

IOException

If an I/O error has occurred.

Read_sint64_1


public method Read_sint64_1 → (1)

current opt : int64 = 0

The current value.

returns → int64

The read value.

Reads a single sint64 field value (Wire.VARINT) or the last one of a packed repeated field (Wire.LEN).

IOException

If an I/O error has occurred.

Read_sint64_​N

2 overloads


public method Read_sint64_N1 → (1)

output in : ICollector<int64>

[not-null]
The value output.

Reads a single sint64 field value (Wire.VARINT) or all packed repeated field values (Wire.LEN).

IOException

If an I/O error has occurred.


public method Read_sint64_N2 → (1)

output in : ArrayVector<int64>

The value output or null.

returns → ArrayVector<int64>

The value output.

Reads a single sint64 field value (Wire.VARINT) or all packed repeated field values (Wire.LEN).

IOException

If an I/O error has occurred.

Read_string

3 overloads


public method Read_string1 → ()

returns → string

The read value.

Reads a single string field value (Wire.LEN).

IOException

If an I/O error has occurred.


public method Read_string2 → (1)

output in : ICollector<string>

[not-null]
The value output.

Reads a single string field value (Wire.LEN).

IOException

If an I/O error has occurred.


public method Read_string3 → (1)

output in : ArrayVector<string>

The value output or null.

returns → ArrayVector<string>

The value output.

Reads a single string field value (Wire.LEN).

IOException

If an I/O error has occurred.

Read_uint32_1


public method Read_uint32_1 → (1)

current opt : int32 = 0

The current value.

returns → int32

The read value.

Reads a single int32, uint32, enum field value ( Wire.VARINT) or the last one of a packed repeated field ( Wire.LEN).

IOException

If an I/O error has occurred.

Read_uint32_​N

2 overloads


public method Read_uint32_N1 → (1)

output in : ICollector<int32>

[not-null]
The value output.

Reads a single int32, uint32, enum field value ( Wire.VARINT) or all packed repeated field values (Wire.LEN).

IOException

If an I/O error has occurred.


public method Read_uint32_N2 → (1)

output in : ArrayVector<int32>

The value output or null.

returns → ArrayVector<int32>

The value output.

Reads a single int32, uint32, enum field value ( Wire.VARINT) or all packed repeated field values (Wire.LEN).

IOException

If an I/O error has occurred.

Read_uint64_1


public method Read_uint64_1 → (1)

current opt : int64 = 0

The current value.

returns → int64

The read value.

Reads a single int64, uint64 field value (Wire.VARINT) or the last one of a packed repeated field (Wire.LEN).

IOException

If an I/O error has occurred.

Read_uint64_​N

2 overloads


public method Read_uint64_N1 → (1)

output in : ICollector<int64>

[not-null]
The value output.

Reads a single int64, uint64 field value (Wire.VARINT) or all packed repeated field values (Wire.LEN).

IOException

If an I/O error has occurred.


public method Read_uint64_N2 → (1)

output in : ArrayVector<int64>

The value output or null.

returns → ArrayVector<int64>

The value output.

Reads a single int64, uint64 field value (Wire.VARINT) or all packed repeated field values (Wire.LEN).

IOException

If an I/O error has occurred.

Skip


public method Skip → ()

Skips the payload of this record.

IOException

If an I/O error has occurred.

Write_bool_1


public method Write_bool_1 → (1)

value in : bool

The value to write.

Writes a single bool field value (Wire.VARINT).

IOException

If an I/O error has occurred.

Write_bool_​N

2 overloads


public method Write_bool_N1 → (1)

values in : IArrayVector<bool>

[not-null]
The values to write.

Writes packed repeated bool field values (Wire.LEN).

IOException

If an I/O error has occurred.


public method Write_bool_N2 → (3)

values in : bool [ ]

[not-null]
The values to write.

first in : int32

[0..values.Length]
Index of first value to write.

count in : int32

[0..values.Length-first]
The number of values to write.

Writes packed repeated bool field values (Wire.LEN).

IOException

If an I/O error has occurred.

Write_bytes


public method Write_bytes → (1)

value in : int8 [ ]

[not-null]
The array that holds the values to write.

Writes a single bytes field value (Wire.LEN).

IOException

If an I/O error has occurred.

Write_double_1


public method Write_double_1 → (1)

value in : float64

The value to write.

Writes a single double field value (Wire.I64).

IOException

If an I/O error has occurred.

Write_double_​N

2 overloads


public method Write_double_N1 → (1)

values in : IArrayVector<float64>

[not-null]
The values to write.

Writes packed repeated double field values (Wire.LEN).

IOException

If an I/O error has occurred.


public method Write_double_N2 → (3)

values in : float64 [ ]

[not-null]
The values to write.

first in : int32

[0..values.Length]
Index of first value to write.

count in : int32

[0..values.Length-first]
The number of values to write.

Writes packed repeated double field values (Wire.LEN).

IOException

If an I/O error has occurred.

Write_enum_1


public method Write_enum_1 → (1)
<T val : Enum>

value in : T

The value to write.

Writes a single enum field value (Wire.VARINT).

IOException

If an I/O error has occurred.

Write_enum_​N

2 overloads


public method Write_enum_N1 → (1)
<T val : Enum>

values in : IArrayVector<T>

[not-null]
The values to write.

Writes packed repeated enum field values (Wire.LEN).

IOException

If an I/O error has occurred.


public method Write_enum_N2 → (3)
<T val : Enum>

values in : T [ ]

[not-null]
The values to write.

first in : int32

[0..values.Length]
Index of first value to write.

count in : int32

[0..values.Length-first]
The number of values to write.

Writes packed repeated enum field values (Wire.LEN).

IOException

If an I/O error has occurred.

Write_fixed32_1


public method Write_fixed32_1 → (1)

value in : int32

The value to write.

Writes a single fixed32, sfixed32 field value (Wire.I32).

IOException

If an I/O error has occurred.

Write_fixed32_​N

2 overloads


public method Write_fixed32_N1 → (1)

values in : IArrayVector<int32>

[not-null]
The values to write.

Writes packed repeated fixed32, sfixed32 field values ( Wire.LEN).

IOException

If an I/O error has occurred.


public method Write_fixed32_N2 → (3)

values in : int32 [ ]

[not-null]
The values to write.

first in : int32

[0..values.Length]
Index of first value to write.

count in : int32

[0..values.Length-first]
The number of values to write.

Writes packed repeated fixed32, sfixed32 field values ( Wire.LEN).

IOException

If an I/O error has occurred.

Write_fixed64_1


public method Write_fixed64_1 → (1)

value in : int64

The value to write.

Writes a single fixed64, sfixed64 field value (Wire.I64).

IOException

If an I/O error has occurred.

Write_fixed64_​N

2 overloads


public method Write_fixed64_N1 → (1)

values in : IArrayVector<int64>

[not-null]
The values to write.

Writes packed repeated fixed64, sfixed64 field values ( Wire.LEN).

IOException

If an I/O error has occurred.


public method Write_fixed64_N2 → (3)

values in : int64 [ ]

[not-null]
The values to write.

first in : int32

[0..values.Length]
Index of first value to write.

count in : int32

[0..values.Length-first]
The number of values to write.

Writes packed repeated fixed64, sfixed64 field values ( Wire.LEN).

IOException

If an I/O error has occurred.

Write_float_1


public method Write_float_1 → (1)

value in : float32

The value to write.

Writes a single float field value (Wire.I32)

IOException

If an I/O error has occurred.

Write_float_​N

2 overloads


public method Write_float_N1 → (1)

values in : IArrayVector<float32>

[not-null]
The values to write.

Writes packed repeated float field values (Wire.LEN).

IOException

If an I/O error has occurred.


public method Write_float_N2 → (3)

values in : float32 [ ]

[not-null]
The values to write.

first in : int32

[0..values.Length]
Index of first value to write.

count in : int32

[0..values.Length-first]
The number of values to write.

Writes packed repeated float field values (Wire.LEN).

IOException

If an I/O error has occurred.

Write_length


public method Write_length → (1)

length in : int32

[>=0]
The value to write.

Writes a length value (Wire.LEN).

IOException

If an I/O error has occurred.

Write_object


public method Write_object → (2)

wire in : IProtonizer

[not-null]
The wire format stream.

value in : IProtonizable

[not-null]
The value to write.

Writes a single embedded message field value (Wire.LEN).

IOException

If an I/O error has occurred.

Write_sint32_1


public method Write_sint32_1 → (1)

value in : int32

The value to write.

Writes a single sint32 field value.

IOException

If an I/O error has occurred.

See also

Wire.VARINT

Write_sint32_​N

2 overloads


public method Write_sint32_N1 → (1)

values in : IArrayVector<int32>

[not-null]
The values to write.

Writes packed repeated sint32 field values (Wire.LEN).

IOException

If an I/O error has occurred.


public method Write_sint32_N2 → (3)

values in : int32 [ ]

[not-null]
The values to write.

first in : int32

[0..values.Length]
Index of first value to write.

count in : int32

[0..values.Length-first]
The number of values to write.

Writes packed repeated sint32 field values (Wire.LEN).

IOException

If an I/O error has occurred.

Write_sint64_1


public method Write_sint64_1 → (1)

value in : int64

The value to write.

Writes a single sint64 field value.

IOException

If an I/O error has occurred.

See also

Wire.VARINT

Write_sint64_​N

2 overloads


public method Write_sint64_N1 → (1)

values in : IArrayVector<int64>

[not-null]
The values to write.

Writes packed repeated sint32 field values (Wire.LEN).

IOException

If an I/O error has occurred.


public method Write_sint64_N2 → (3)

values in : int64 [ ]

[not-null]
The values to write.

first in : int32

[0..values.Length]
Index of first value to write.

count in : int32

[0..values.Length-first]
The number of values to write.

Writes packed repeated sint32 field values (Wire.LEN).

IOException

If an I/O error has occurred.

Write_string


public method Write_string → (1)

value in : string

The value to write (null is interpreted as the empty string).

Writes a single string field value (Wire.LEN).

IOException

If an I/O error has occurred.

Write_uint32_1


public method Write_uint32_1 → (1)

value in : int32

The value to write.

Writes a single int32, uint32, enum field value ( Wire.VARINT)

IOException

If an I/O error has occurred.

Write_uint32_​N

2 overloads


public method Write_uint32_N1 → (1)

values in : IArrayVector<int32>

[not-null]
The values to write.

Writes packed repeated int32, uint32, enum field values ( Wire.LEN).

IOException

If an I/O error has occurred.


public method Write_uint32_N2 → (3)

values in : int32 [ ]

[not-null]
The values to write.

first in : int32

[0..values.Length]
Index of first value to write.

count in : int32

[0..values.Length-first]
The number of values to write.

Writes packed repeated int32, uint32, enum field values ( Wire.LEN).

IOException

If an I/O error has occurred.

Write_uint64_1


public method Write_uint64_1 → (1)

value in : int64

The value to write.

Writes a single int64, uint64 field value (Wire.VARINT).

IOException

If an I/O error has occurred.

Write_uint64_​N

2 overloads


public method Write_uint64_N1 → (1)

values in : IArrayVector<int64>

[not-null]
The values to write.

Writes packed repeated int64, uint64 field values (Wire.LEN).

IOException

If an I/O error has occurred.


public method Write_uint64_N2 → (3)

values in : int64 [ ]

[not-null]
The values to write.

first in : int32

[0..values.Length]
Index of first value to write.

count in : int32

[0..values.Length-first]
The number of values to write.

Writes packed repeated int64, uint64 field values (Wire.LEN).

IOException

If an I/O error has occurred.

Public / Attributes

Field


public readonly attribute Field → (int32)

The message field number or 0 for None.

Is​None


public attribute IsNone → (get)

value : bool

true if this is the None value,
false if not.

Is this the special None value?

Tag


public attribute Tag → (get)

value : int64

The record tag.

The tag value of this record, composed of the field number and wire type.

Type


public readonly attribute Type → (Wire)

The wire type.