# SerializationHostingExtensions.AddMessagePackSerializer(ISerializerBuilder, Func&lt;Type, bool&gt;, Func&lt;Type, bool&gt;, MessagePackSerializerOptions?)

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.serialization.messagepack/orleans.serialization.serializationhostingextensions/) | [Methods](/orleans/docs/api/csharp/microsoft.orleans.serialization.messagepack/orleans.serialization.serializationhostingextensions/methods/)

[Source](https://github.com/dotnet/orleans/blob/b7a9e3e1c9c54b3cec3a467c5734bf7744541bcf/src/Orleans.Serialization.MessagePack/SerializationHostingExtensions.cs#L31-L41)

```csharp
public static ISerializerBuilder AddMessagePackSerializer(this ISerializerBuilder serializerBuilder, Func<Type, bool>? isSerializable = null, Func<Type, bool>? isCopyable = null, MessagePackSerializerOptions? messagePackSerializerOptions = null)
```

Adds support for serializing and deserializing values using `MessagePack.MessagePackSerializer`.

### Parameters

- `serializerBuilder` (`ISerializerBuilder`): The serializer builder.
- `isSerializable` (`Func<Type, bool>`): A delegate used to indicate which types should be serialized by this codec.
- `isCopyable` (`Func<Type, bool>`): A delegate used to indicate which types should be copied by this codec.
- `messagePackSerializerOptions` (`MessagePackSerializerOptions?`): The MessagePack serializer options.
