Class AkavacheBuilderExtensions
- Namespace
- Akavache.Newtonsoft
Json
- Assembly
- Akavache.NewtonsoftJson.dll
Provides extension methods for configuring Akavache to use Newtonsoft.Json serialization.
- Inheritance
-
Akavache
Builder Extensions
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
builderIAkavacheBuilder The Akavache builder to configure.
Returns
- IAkavache
Builder The builder instance for fluent configuration.
Exceptions
- Argument
Null Exception 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
builderIAkavacheBuilder The Akavache builder to configure.
settingsJsonSerializer Settings The JSON serializer settings to use for customizing BSON serialization behavior.
Returns
- IAkavache
Builder The builder instance for fluent configuration.
Exceptions
- Argument
Null Exception 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
builderIAkavacheBuilder The Akavache builder to configure.
configureAction<JsonSerializer >Settings Action to configure the JSON serializer settings for BSON serialization.
Returns
- IAkavache
Builder The builder instance for fluent configuration.
Exceptions
- Argument
Null Exception 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
builderIAkavacheBuilder The Akavache builder to configure.
Returns
- IAkavache
Builder The builder instance for fluent configuration.
Exceptions
- Argument
Null Exception 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
builderIAkavacheBuilder The Akavache builder to configure.
settingsJsonSerializer Settings The JSON serializer settings to use for customizing serialization behavior.
Returns
- IAkavache
Builder The builder instance for fluent configuration.
Exceptions
- Argument
Null Exception 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
builderIAkavacheBuilder The Akavache builder to configure.
configureAction<JsonSerializer >Settings Action to configure the JSON serializer settings.
Returns
- IAkavache
Builder The builder instance for fluent configuration.
Exceptions
- Argument
Null Exception Thrown when
builderorconfigureis null.