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

    Class GzJsonCacheSerializer

    Implements the ICacheSerializer contract using Newtonsoft.Json and the GZipStream loseless compression.

    Inheritance
    Object
    CacheSerializer
    JsonCacheSerializer
    GzJsonCacheSerializer
    Inherited Members
    JsonCacheSerializer.DeserializationSettings
    JsonCacheSerializer.SerializationSettings
    JsonCacheSerializer.GetOpenGeneric()
    JsonCacheSerializer.CreateNewItem<TCacheValue>(ICacheItemProperties, Object)
    CacheSerializer.SerializeCacheItem<T>(CacheItem<T>)
    CacheSerializer.DeserializeCacheItem<T>(Byte[], Type)
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace:CacheManager.Serialization.Json
    Assembly:CacheManager.Serialization.Json.dll
    Syntax
    public class GzJsonCacheSerializer : JsonCacheSerializer, ICacheSerializer

    Constructors

    | Improve this Doc View Source

    GzJsonCacheSerializer()

    Initializes a new instance of the GzJsonCacheSerializer class.

    Declaration
    public GzJsonCacheSerializer()
    | Improve this Doc View Source

    GzJsonCacheSerializer(JsonSerializerSettings, JsonSerializerSettings)

    Initializes a new instance of the GzJsonCacheSerializer class. With this overload the settings for de-/serialization can be set independently.

    Declaration
    public GzJsonCacheSerializer(JsonSerializerSettings serializationSettings, JsonSerializerSettings deserializationSettings)
    Parameters
    Type Name Description
    Newtonsoft.Json.JsonSerializerSettings serializationSettings

    The settings which should be used during serialization.

    Newtonsoft.Json.JsonSerializerSettings deserializationSettings

    The settings which should be used during deserialization.

    Methods

    | Improve this Doc View Source

    Compression(Byte[])

    Compress the serialized data using GZipStream.

    Declaration
    protected virtual byte[] Compression(byte[] data)
    Parameters
    Type Name Description
    System.Byte[] data

    The data which should be compressed.

    Returns
    Type Description
    System.Byte[]

    The compressed data.

    | Improve this Doc View Source

    Decompression(Byte[])

    Decompress the compressedData into the base serialized data.

    Declaration
    protected virtual byte[] Decompression(byte[] compressedData)
    Parameters
    Type Name Description
    System.Byte[] compressedData

    The data which should be decompressed.

    Returns
    Type Description
    System.Byte[]

    The uncompressed data.

    | Improve this Doc View Source

    Deserialize(Byte[], Type)

    Declaration
    public override object Deserialize(byte[] data, Type target)
    Parameters
    Type Name Description
    System.Byte[] data
    Type target
    Returns
    Type Description
    Object
    Overrides
    JsonCacheSerializer.Deserialize(Byte[], Type)
    | Improve this Doc View Source

    Serialize<T>(T)

    Declaration
    public override byte[] Serialize<T>(T value)
    Parameters
    Type Name Description
    T value
    Returns
    Type Description
    System.Byte[]
    Type Parameters
    Name Description
    T
    Overrides
    CacheManager.Serialization.Json.JsonCacheSerializer.Serialize<T>(T)
    • Improve this Doc
    • View Source
    © 2025 by Michael Conrad. All rights reserved. - MichaCo.net