# Codec_ConcurrentDictionarySurrogate&lt;TKey, TValue&gt; Methods

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.serialization/orleanscodegen.orleans.serialization.codecs.codec-concurrentdictionarysurrogate-2/)

## Deserialize(Reader&lt;TReaderInput&gt;, ConcurrentDictionarySurrogate&lt;TKey, TValue&gt;) {#deserialize-1-ref-orleans-serialization-buffers-reader-treaderinput-ref-orleans-53e0ab00}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.serialization/orleanscodegen.orleans.serialization.codecs.codec-concurrentdictionarysurrogate-2/methods/deserialize-1-ref-orleans-serialization-buffers-reader-treaderinput-ref-orleans-53e0ab00/)

```csharp
public void Codec_ConcurrentDictionarySurrogate<TKey, Deserialize<TReaderInput>(ref Reader<TReaderInput> reader, scoped ref ConcurrentDictionarySurrogate<TKey, TValue> instance)
```

Deserializes the specified type.

### Parameters

- `reader` (`Reader<TReaderInput>`): The reader.
- `instance` (`ConcurrentDictionarySurrogate<TKey, TValue>`): The value.

## ReadValue(Reader&lt;TReaderInput&gt;, Field) {#readvalue-1-ref-orleans-serialization-buffers-reader-treaderinput-orleans-serial-fdaa0810}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.serialization/orleanscodegen.orleans.serialization.codecs.codec-concurrentdictionarysurrogate-2/methods/readvalue-1-ref-orleans-serialization-buffers-reader-treaderinput-orleans-serial-fdaa0810/)

```csharp
public ConcurrentDictionarySurrogate<TKey, TValue> Codec_ConcurrentDictionarySurrogate<TKey, ReadValue<TReaderInput>(ref Reader<TReaderInput> reader, Field field)
```

Reads a value.

### Parameters

- `reader` (`Reader<TReaderInput>`): The reader.
- `field` (`Field`): The field.

### Returns

The value.

## Serialize(Writer&lt;TBufferWriter&gt;, ConcurrentDictionarySurrogate&lt;TKey, TValue&gt;) {#serialize-1-ref-orleans-serialization-buffers-writer-tbufferwriter-ref-orleans-s-00ee79fb}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.serialization/orleanscodegen.orleans.serialization.codecs.codec-concurrentdictionarysurrogate-2/methods/serialize-1-ref-orleans-serialization-buffers-writer-tbufferwriter-ref-orleans-s-00ee79fb/)

```csharp
public void Codec_ConcurrentDictionarySurrogate<TKey, Serialize<TBufferWriter>(ref Writer<TBufferWriter> writer, scoped ref ConcurrentDictionarySurrogate<TKey, TValue> instance)
```

Serializes the provided value.

### Parameters

- `writer` (`Writer<TBufferWriter>`): The writer.
- `instance` (`ConcurrentDictionarySurrogate<TKey, TValue>`): The value.

## WriteField(Writer&lt;TBufferWriter&gt;, uint, Type, ConcurrentDictionarySurrogate&lt;TKey, TValue&gt;) {#writefield-1-ref-orleans-serialization-buffers-writer-tbufferwriter-uint-system-69930b8a}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.serialization/orleanscodegen.orleans.serialization.codecs.codec-concurrentdictionarysurrogate-2/methods/writefield-1-ref-orleans-serialization-buffers-writer-tbufferwriter-uint-system-69930b8a/)

```csharp
public void Codec_ConcurrentDictionarySurrogate<TKey, WriteField<TBufferWriter>(ref Writer<TBufferWriter> writer, uint fieldIdDelta, Type expectedType, ConcurrentDictionarySurrogate<TKey, TValue> value)
```

Writes a field.

### Parameters

- `writer` (`Writer<TBufferWriter>`): The writer.
- `fieldIdDelta` (`uint`): The field identifier delta.
- `expectedType` (`Type`): The expected type.
- `value` (`ConcurrentDictionarySurrogate<TKey, TValue>`): The value.
