Skip to content

SerializationHostingExtensions Methods

Extension method for ISerializerBuilder.

AddMessagePackSerializer(ISerializerBuilder, Func<Type, bool>, Func<Type, bool>, MessagePackSerializerOptions)

staticextension
View source
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

serializerBuilderISerializerBuilder
The serializer builder.
isSerializableFunc<Type, bool>
A delegate used to indicate which types should be serialized by this codec.
isCopyableFunc<Type, bool>
A delegate used to indicate which types should be copied by this codec.
messagePackSerializerOptionsMessagePackSerializerOptions
The MessagePack serializer options.

AddMessagePackSerializer(ISerializerBuilder, Func<Type, bool>, Func<Type, bool>, Action<OptionsBuilder<MessagePackCodecOptions>>)

staticextension
View source
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

serializerBuilderISerializerBuilder
The serializer builder.
isSerializableFunc<Type, bool>
A delegate used to indicate which types should be serialized by this codec.
isCopyableFunc<Type, bool>
A delegate used to indicate which types should be copied by this codec.
configureOptionsAction<OptionsBuilder<MessagePackCodecOptions>>
A delegate used to configure the options for the MessagePack codec.