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

    Class CacheSerializer

    Base implementation for cache serializers.

    Inheritance
    Object
    CacheSerializer
    BondSerializerBase
    JsonCacheSerializer
    ProtoBufSerializer
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace:CacheManager.Core.Internal
    Assembly:CacheManager.Core.dll
    Syntax
    public abstract class CacheSerializer : ICacheSerializer

    Methods

    | Improve this Doc View Source

    CreateNewItem<TCacheValue>(ICacheItemProperties, Object)

    Creates a new instance of the serializer specific cache item. Items should implement SerializerCacheItem<T> and the implementation should call the second constructor taking exactly these two arguments.

    Declaration
    protected abstract object CreateNewItem<TCacheValue>(ICacheItemProperties properties, object value)
    Parameters
    Type Name Description
    ICacheItemProperties properties

    The item properties to copy from.

    Object value

    The actual cache item value.

    Returns
    Type Description
    Object

    The serializer specific cache item instance.

    Type Parameters
    Name Description
    TCacheValue

    The cache value type.

    | Improve this Doc View Source

    Deserialize(Byte[], Type)

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

    DeserializeCacheItem<T>(Byte[], Type)

    Declaration
    public virtual CacheItem<T> DeserializeCacheItem<T>(byte[] value, Type valueType)
    Parameters
    Type Name Description
    System.Byte[] value
    Type valueType
    Returns
    Type Description
    CacheItem<T>
    Type Parameters
    Name Description
    T
    Implements
    ICacheSerializer.DeserializeCacheItem<T>(Byte[], Type)
    | Improve this Doc View Source

    GetOpenGeneric()

    Returns the open generic type of this class.

    Declaration
    protected abstract Type GetOpenGeneric()
    Returns
    Type Description
    Type

    The type.

    | Improve this Doc View Source

    Serialize<T>(T)

    Declaration
    public abstract byte[] Serialize<T>(T value)
    Parameters
    Type Name Description
    T value
    Returns
    Type Description
    System.Byte[]
    Type Parameters
    Name Description
    T
    Implements
    ICacheSerializer.Serialize<T>(T)
    | Improve this Doc View Source

    SerializeCacheItem<T>(CacheItem<T>)

    Declaration
    public virtual byte[] SerializeCacheItem<T>(CacheItem<T> value)
    Parameters
    Type Name Description
    CacheItem<T> value
    Returns
    Type Description
    System.Byte[]
    Type Parameters
    Name Description
    T
    Implements
    ICacheSerializer.SerializeCacheItem<T>(CacheItem<T>)
    • Improve this Doc
    • View Source
    © 2025 by Michael Conrad. All rights reserved. - MichaCo.net