# Codec_ReadOnlyDictionarySurrogate&lt;TKey, TValue&gt;.Serialize(Writer&lt;TBufferWriter&gt;, ReadOnlyDictionarySurrogate&lt;TKey, TValue&gt;)

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.serialization/orleanscodegen.orleans.serialization.codecs.codec-readonlydictionarysurrogate-2/) | [Methods](/orleans/docs/api/csharp/microsoft.orleans.serialization/orleanscodegen.orleans.serialization.codecs.codec-readonlydictionarysurrogate-2/methods/)

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

Serializes the provided value.

### Parameters

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