Edytuj

Udostępnij za pośrednictwem


Tag Struct

Definition

A serialization tag, which is always exactly a single byte. This acts as a part of the field header for all serialized fields.

public struct Tag
type Tag = struct
Public Structure Tag
Inheritance
Tag

Remarks

The typical form for a tag byte is [W W W] [S S] [F F F], where each is a bit. W is a WireType, S is a SchemaType bit, and F is a field identifier bit.

Constructors

Tag(Byte)

Initializes a new instance of the Tag struct.

Fields

ExtendedWireTypeMask

The extended wire type mask.

FieldIdCompleteMask

The field identifier complete mask.

FieldIdMask

The field identifier mask.

MaxEmbeddedFieldIdDelta

The maximum embedded field identifier delta.

SchemaTypeMask

The schema type mask.

WireTypeMask

The wire type mask.

Properties

ExtendedWireType

Gets or sets the extended wire type of the data following this tag.

FieldIdDelta

Returns the FieldIdDelta of the field represented by this tag.

HasExtendedFieldId

Gets a value indicating whether the tag is followed by an extended field id.

HasExtendedWireType

Gets a value indicating whether this instance has an extended wire type.

IsFieldIdValid

Gets a value indicating whether the FieldIdDelta property is valid.

IsSchemaTypeValid

Gets a value indicating whether the SchemaType property is valid.

SchemaType

Gets or sets the schema type.

WireType

Gets or sets the wire type of the data following this tag.

Methods

SetFieldIdInvalid()

Invalidates FieldIdDelta.

Operators

Implicit(Byte to Tag)

Performs an implicit conversion from Byte to Tag.

Implicit(Tag to Byte)

Performs an implicit conversion from Tag to Byte.

Applies to