# FSharpMapCodec&lt;TKey, TValue&gt;

Package: [Microsoft.Orleans.Serialization.FSharp](/orleans/docs/api/csharp/microsoft.orleans.serialization.fsharp/) 10.0.0

[NuGet package](https://www.nuget.org/packages/Microsoft.Orleans.Serialization.FSharp) | [Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Serialization.FSharp/FSharpCodecs.cs#L1022)

```csharp
public class FSharpMapCodec<TKey, TValue> : GeneralizedReferenceTypeSurrogateCodec<FSharpMap<TKey, TValue>, FSharpMapSurrogate<TKey, TValue>>
```

Surrogate serializer for `TField` and all sub-types.

## Type parameters

- `TKey`: The type which the implementation of this class supports.
- `TValue`: The surrogate type serialized in place of `TField`.

## Constructors

- [FSharpMapCodec&lt;TKey, TValue&gt;(IValueSerializer&lt;FSharpMapSurrogate&lt;TKey, TValue&gt;&gt;)](/orleans/docs/api/csharp/microsoft.orleans.serialization.fsharp/orleans.serialization.fsharpmapcodec-2/constructors/constructor-orleans-serialization-serializers-ivalueserializer-orleans-serializa-c164c553/)

## Methods

- [ConvertFromSurrogate(FSharpMapSurrogate&lt;TKey, TValue&gt;)](/orleans/docs/api/csharp/microsoft.orleans.serialization.fsharp/orleans.serialization.fsharpmapcodec-2/methods/convertfromsurrogate-ref-orleans-serialization-fsharpmapsurrogate-tkey-tvalue-ea2927e1/)
- [ConvertToSurrogate(FSharpMap&lt;TKey, TValue&gt;, FSharpMapSurrogate&lt;TKey, TValue&gt;)](/orleans/docs/api/csharp/microsoft.orleans.serialization.fsharp/orleans.serialization.fsharpmapcodec-2/methods/converttosurrogate-microsoft-fsharp-collections-fsharpmap-tkey-tvalue-ref-orlean-f0d93933/)
