# SerializationHostingExtensions.AddMessagePackSerializer(ISerializerBuilder, Func&lt;Type, bool&gt;, Func&lt;Type, bool&gt;, Action&lt;OptionsBuilder&lt;MessagePackCodecOptions&gt;&gt;)

[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/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Serialization.MessagePack/SerializationHostingExtensions.cs#L58-L91)

```csharp
public static ISerializerBuilder AddMessagePackSerializer(this ISerializerBuilder serializerBuilder, Func<Type, bool> isSerializable, Func<Type, bool> isCopyable, Action<OptionsBuilder<MessagePackCodecOptions>> configureOptions = 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.
- `configureOptions` (`Action<OptionsBuilder<MessagePackCodecOptions>>`): A delegate used to configure the options for the MessagePack codec.
