Skip to content

KeyValuePairCodec<TKey, TValue> Methods

Serializer for System.Collections.Generic.KeyValuePair.

ReadValue(Reader<TInput>, Field)

View source
public KeyValuePair<TKey, TValue> KeyValuePairCodec<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, KeyValuePair<TKey, TValue>)

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

Parameters

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