• CacheManager
  • Documentation
  • Api Docs
  • MichaCo.net
    Show / Hide Table of Contents

    Class JsonConfigurationBuilderExtensions

    Extensions for the configuration builder for the Newtonsoft.Json based ICacheSerializer.

    Configuring CacheManager to use the JSON serializer will replace the default Binary serializer.

    Usage

    Basic usage example:

    var builder = new Core.ConfigurationBuilder();
    builder.WithJsonSerializer();
    

    optionally, Newtonsoft.Json.JsonSerializerSettings can be specified for (de)serialization. See the official documentation for more details.

    builder.WithJsonSerializer(new JsonSerializerSettings(), new JsonSerializerSettings());
    
    Inheritance
    Object
    JsonConfigurationBuilderExtensions
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace:CacheManager.Core
    Assembly:CacheManager.Serialization.Json.dll
    Syntax
    public static class JsonConfigurationBuilderExtensions

    Methods

    | Improve this Doc View Source

    WithGzJsonSerializer(ConfigurationBuilderCachePart)

    Configures the cache manager to use the

    Newtonsoft.Json
    based cache serializer with compression.

    Declaration
    public static ConfigurationBuilderCachePart WithGzJsonSerializer(this ConfigurationBuilderCachePart part)
    Parameters
    Type Name Description
    ConfigurationBuilderCachePart part

    The configuration part.

    Returns
    Type Description
    ConfigurationBuilderCachePart

    The builder instance.

    | Improve this Doc View Source

    WithGzJsonSerializer(ConfigurationBuilderCachePart, JsonSerializerSettings, JsonSerializerSettings)

    Configures the cache manager to use the

    Newtonsoft.Json
    based cache serializer with compression.

    Declaration
    public static ConfigurationBuilderCachePart WithGzJsonSerializer(this ConfigurationBuilderCachePart part, JsonSerializerSettings serializationSettings, JsonSerializerSettings deserializationSettings)
    Parameters
    Type Name Description
    ConfigurationBuilderCachePart part

    The configuration part.

    Newtonsoft.Json.JsonSerializerSettings serializationSettings

    The settings to be used during serialization.

    Newtonsoft.Json.JsonSerializerSettings deserializationSettings

    The settings to be used during deserialization.

    Returns
    Type Description
    ConfigurationBuilderCachePart

    The builder instance.

    | Improve this Doc View Source

    WithJsonSerializer(ConfigurationBuilderCachePart)

    Configures the cache manager to use the

    Newtonsoft.Json
    based cache serializer.

    Declaration
    public static ConfigurationBuilderCachePart WithJsonSerializer(this ConfigurationBuilderCachePart part)
    Parameters
    Type Name Description
    ConfigurationBuilderCachePart part

    The configuration part.

    Returns
    Type Description
    ConfigurationBuilderCachePart

    The builder instance.

    | Improve this Doc View Source

    WithJsonSerializer(ConfigurationBuilderCachePart, JsonSerializerSettings, JsonSerializerSettings)

    Configures the cache manager to use the

    Newtonsoft.Json
    based cache serializer.

    Declaration
    public static ConfigurationBuilderCachePart WithJsonSerializer(this ConfigurationBuilderCachePart part, JsonSerializerSettings serializationSettings, JsonSerializerSettings deserializationSettings)
    Parameters
    Type Name Description
    ConfigurationBuilderCachePart part

    The configuration part.

    Newtonsoft.Json.JsonSerializerSettings serializationSettings

    The settings to be used during serialization.

    Newtonsoft.Json.JsonSerializerSettings deserializationSettings

    The settings to be used during deserialization.

    Returns
    Type Description
    ConfigurationBuilderCachePart

    The builder instance.

    • Improve this Doc
    • View Source
    © 2025 by Michael Conrad. All rights reserved. - MichaCo.net