Table of Contents

Interface IReplicatedMessage

Namespace
Typhon.Protocol
Assembly
Typhon.Protocol.dll

Implemented by the generator on every ReplicatedMessageAttribute type: its attributed fields. The engine's command and event builders read it once, at declaration — a field declared in the builder call still wins, and one with no attribute takes its type's default.

public interface IReplicatedMessage

Methods

FieldLayout()

Every public instance field — attributed or not — with the wire name it travels under by default and its CLR type: what a client binds against the negotiated catalog to send the struct itself (MessageBinding<T>).

MessageFieldLayout[] FieldLayout()

Returns

MessageFieldLayout[]

The layout, in field declaration order; the same array on every call.

ReadField(int)

One field's value, by its index in FieldLayout(), widened without loss.

MessageFieldValue ReadField(int index)

Parameters

index int

The field's index in FieldLayout().

Returns

MessageFieldValue

The value.

ReplicatedFields()

The fields whose codec the attributes declare.

MessageFieldDeclaration[] ReplicatedFields()

Returns

MessageFieldDeclaration[]

The declarations, in field order.