Skip to content

MapFieldCodec<TKey, TValue> Methods

Serializer for Google.Protobuf.Collections.MapField.

ReadValue(Reader<TInput>, Field)

View source
public MapField<TKey, TValue> MapFieldCodec<TKey, ReadValue<TInput>(ref Reader<TInput> reader, Field field)
Reads a value.

Parameters

readerReader<TInput>
The reader.
fieldField
The field.

Returns

The value.

WriteField(Writer<TBufferWriter>, uint, Type, MapField<TKey, TValue>)

View source
public void MapFieldCodec<TKey, WriteField<TBufferWriter>(ref Writer<TBufferWriter> writer, uint fieldIdDelta, Type expectedType, MapField<TKey, TValue> value)
Writes a field.

Parameters

writerWriter<TBufferWriter>
The writer.
fieldIdDeltauint
The field identifier delta.
expectedTypeType
The expected type.
valueMapField<TKey, TValue>
The value.