Class AkavacheBuilderExtensions
- Namespace
- Akavache.NewtonsoftJson
- Assembly
- Akavache.NewtonsoftJson.dll
Provides extension methods for configuring Akavache to use Newtonsoft.Json serialization.
public static class AkavacheBuilderExtensions
- Inheritance
-
AkavacheBuilderExtensions
Methods
WithSerializerNewtonsoftBson(IAkavacheBuilder)
Configures the builder to use Newtonsoft.Json BSON serialization with default settings.
[RequiresUnreferencedCode("Serializers require types to be preserved for serialization.")]
public static IAkavacheBuilder WithSerializerNewtonsoftBson(this IAkavacheBuilder builder)
Parameters
builderIAkavacheBuilderThe Akavache builder to configure.
Returns
- IAkavacheBuilder
The builder instance for fluent configuration.
Exceptions
- ArgumentNullException
Thrown when
builderis null.
WithSerializerNewtonsoftBson(IAkavacheBuilder, JsonSerializerSettings)
Configures the builder to use Newtonsoft.Json BSON serialization with custom settings.
[RequiresUnreferencedCode("Serializers require types to be preserved for serialization.")]
public static IAkavacheBuilder WithSerializerNewtonsoftBson(this IAkavacheBuilder builder, JsonSerializerSettings settings)
Parameters
builderIAkavacheBuilderThe Akavache builder to configure.
settingsJsonSerializerSettingsThe JSON serializer settings to use for customizing BSON serialization behavior.
Returns
- IAkavacheBuilder
The builder instance for fluent configuration.
Exceptions
- ArgumentNullException
Thrown when
builderorsettingsis null.
WithSerializerNewtonsoftBson(IAkavacheBuilder, Action<JsonSerializerSettings>)
Configures the builder to use Newtonsoft.Json BSON serialization with settings configured through a delegate.
[RequiresUnreferencedCode("Serializers require types to be preserved for serialization.")]
public static IAkavacheBuilder WithSerializerNewtonsoftBson(this IAkavacheBuilder builder, Action<JsonSerializerSettings> configure)
Parameters
builderIAkavacheBuilderThe Akavache builder to configure.
configureAction<JsonSerializerSettings>Action to configure the JSON serializer settings for BSON serialization.
Returns
- IAkavacheBuilder
The builder instance for fluent configuration.
Exceptions
- ArgumentNullException
Thrown when
builderorconfigureis null.
WithSerializerNewtonsoftJson(IAkavacheBuilder)
Configures the builder to use Newtonsoft.Json serialization with default settings.
[RequiresUnreferencedCode("Serializers require types to be preserved for serialization.")]
public static IAkavacheBuilder WithSerializerNewtonsoftJson(this IAkavacheBuilder builder)
Parameters
builderIAkavacheBuilderThe Akavache builder to configure.
Returns
- IAkavacheBuilder
The builder instance for fluent configuration.
Exceptions
- ArgumentNullException
Thrown when
builderis null.
WithSerializerNewtonsoftJson(IAkavacheBuilder, JsonSerializerSettings)
Configures the builder to use Newtonsoft.Json serialization with custom settings.
[RequiresUnreferencedCode("Serializers require types to be preserved for serialization.")]
public static IAkavacheBuilder WithSerializerNewtonsoftJson(this IAkavacheBuilder builder, JsonSerializerSettings settings)
Parameters
builderIAkavacheBuilderThe Akavache builder to configure.
settingsJsonSerializerSettingsThe JSON serializer settings to use for customizing serialization behavior.
Returns
- IAkavacheBuilder
The builder instance for fluent configuration.
Exceptions
- ArgumentNullException
Thrown when
builderorsettingsis null.
WithSerializerNewtonsoftJson(IAkavacheBuilder, Action<JsonSerializerSettings>)
Configures the builder to use Newtonsoft.Json serialization with settings configured through a delegate.
[RequiresUnreferencedCode("Serializers require types to be preserved for serialization.")]
public static IAkavacheBuilder WithSerializerNewtonsoftJson(this IAkavacheBuilder builder, Action<JsonSerializerSettings> configure)
Parameters
builderIAkavacheBuilderThe Akavache builder to configure.
configureAction<JsonSerializerSettings>Action to configure the JSON serializer settings.
Returns
- IAkavacheBuilder
The builder instance for fluent configuration.
Exceptions
- ArgumentNullException
Thrown when
builderorconfigureis null.