Skip to content

SerializationHostingExtensions Methods

Extension method for ISerializerBuilder.

AddNewtonsoftJsonSerializer(ISerializerBuilder, Func<Type, bool>, Func<Type, bool>, Action<OptionsBuilder<NewtonsoftJsonCodecOptions>>)

staticextension
View source
public static ISerializerBuilder AddNewtonsoftJsonSerializer(this ISerializerBuilder serializerBuilder, Func<Type, bool>? isSerializable, Func<Type, bool>? isCopyable, Action<OptionsBuilder<NewtonsoftJsonCodecOptions>>? configureOptions)
Adds support for serializing and deserializing values using Newtonsoft.Json.JsonSerializer.

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<NewtonsoftJsonCodecOptions>>
A delegate used to configure the options for the JSON serializer.

AddNewtonsoftJsonSerializer(ISerializerBuilder, Func<Type, bool>, Action<OptionsBuilder<NewtonsoftJsonCodecOptions>>)

staticextension
View source
public static ISerializerBuilder AddNewtonsoftJsonSerializer(this ISerializerBuilder serializerBuilder, Func<Type, bool>? isSupported, Action<OptionsBuilder<NewtonsoftJsonCodecOptions>>? configureOptions)
Adds support for serializing and deserializing values using Newtonsoft.Json.JsonSerializer.

Parameters

serializerBuilderISerializerBuilder
The serializer builder.
isSupportedFunc<Type, bool>
A delegate used to indicate which types should be serialized and copied by this codec.
configureOptionsAction<OptionsBuilder<NewtonsoftJsonCodecOptions>>
A delegate used to configure the options for the JSON serializer.

AddNewtonsoftJsonSerializer(ISerializerBuilder, Func<Type, bool>, JsonSerializerSettings?)

staticextension
View source
public static ISerializerBuilder AddNewtonsoftJsonSerializer(this ISerializerBuilder serializerBuilder, Func<Type, bool>? isSupported, JsonSerializerSettings? jsonSerializerSettings = null)
Adds support for serializing and deserializing values using Newtonsoft.Json.JsonSerializer.

Parameters

serializerBuilderISerializerBuilder
The serializer builder.
isSupportedFunc<Type, bool>
A delegate used to indicate which types should be serialized and copied by this codec.
jsonSerializerSettingsJsonSerializerSettings?
The JSON serializer settings.