IProtonizer

Description

interface Tinman.Core.IO.Serialization.IProtonizer

Derived from

IPathInfo

Extended by

ISerializer
Protonizer sealed

Base interface for classes that read and write data during conversion of IProtonizable objects to binary Protocol Buffers wire format streams.

Public / Methods

Read​Record


public method ReadRecord → (1)

limit in : int64

The byte position (exclusive) that marks the end of the record sequence, see Position.

returns → Record

The Record to use for reading the payload. Will be Record.None if there are no more records because the limit in has been reached.

Reads the tag of a record in a Protocol Buffers wire format stream.

IOException

If an I/O error has occurred.

Write​Begin


public method WriteBegin → ()

returns → IProtonizer

The IProtonizer to use for deferred writing.

Returns a IProtonizer object that can be used to write records in a Protocol Buffers wire format stream to a separate buffer, until WriteEnd is called.

IOException

If an I/O error has occurred.

Write​End


public method WriteEnd → ()

Fetches the content of the separate buffer that has been set up by the last call to WriteBegin and writes it to the wire format stream.

Calls to WriteBegin and WriteEnd must be balanced and may be nested.

IOException

If an I/O error has occurred.

Write​Record


public method WriteRecord → (2)

field in : int32

The field number.

type in : Wire

The wire type.

returns → Record

The Record to use for writing the payload.

Writes the tag of a record in a Protocol Buffers wire format stream.

IOException

If an I/O error has occurred.

Public / Attributes

Position


public attribute Position → (get)

value : int64

[>=0]
The stream position.

Returns the byte position of the stream.

The returned value gives the number of bytes that have been written to the stream (after encoding) or the number of bytes that have been read from the stream (before decoding).

IOException

If an I/O error has occurred.