# ReadOnlyDictionaryCodec&lt;TKey, TValue&gt; Constructors

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

## ReadOnlyDictionaryCodec&lt;TKey, TValue&gt;(IValueSerializer&lt;ReadOnlyDictionarySurrogate&lt;TKey, TValue&gt;&gt;) {#constructor-orleans-serialization-serializers-ivalueserializer-orleans-serializa-7f478ff5}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.serialization/orleans.serialization.codecs.readonlydictionarycodec-2/constructors/constructor-orleans-serialization-serializers-ivalueserializer-orleans-serializa-7f478ff5/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Serialization/Codecs/ReadOnlyDictionaryCodec.cs#L13-L15)

```csharp
public ReadOnlyDictionaryCodec<TKey, ReadOnlyDictionaryCodec(IValueSerializer<ReadOnlyDictionarySurrogate<TKey, TValue>> surrogateSerializer)
```

### Parameters

- `surrogateSerializer` (`IValueSerializer<ReadOnlyDictionarySurrogate<TKey, TValue>>`)
