Class CacheSerializer
Base implementation for cache serializers.
Inheritance
CacheSerializer
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
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
Implements
|
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 Parameters
Implements
|
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
Implements
|
Improve this Doc
View Source
SerializeCacheItem<T>(CacheItem<T>)
Declaration
public virtual byte[] SerializeCacheItem<T>(CacheItem<T> value)
Parameters
Returns
Type |
Description |
System.Byte[] |
|
Type Parameters
Implements