Class BinaryCacheSerializer
Basic binary serialization implementation of the ICacheSerializer.
This implementation will be used in case no other serializer is configured for the cache manager
and serialization is needed (only distributed caches will have to serialize the cache value).
Binary serialization will not be available in some environments.
Inheritance
BinaryCacheSerializer
Namespace:CacheManager.Core.Internal
Assembly:CacheManager.Core.dll
Syntax
public class BinaryCacheSerializer : ICacheSerializer
Constructors
|
Improve this Doc
View Source
BinaryCacheSerializer()
Declaration
public BinaryCacheSerializer()
|
Improve this Doc
View Source
Declaration
public BinaryCacheSerializer(BinaryFormatter serializationFormatter, BinaryFormatter deserializationFormatter)
Parameters
Type |
Name |
Description |
BinaryFormatter |
serializationFormatter |
The formatter to use to do the serialization.
|
BinaryFormatter |
deserializationFormatter |
The formatter to use to do the deserialization.
|
Properties
|
Improve this Doc
View Source
Gets the formatter which should be used during deserialization.
If nothing is specified the default BinaryFormatter will be used.
Declaration
public BinaryFormatter DeserializationFormatter { get; }
Property Value
|
Improve this Doc
View Source
Gets the formatter which should be used during serialization.
If nothing is specified the default BinaryFormatter will be used.
Declaration
public BinaryFormatter SerializationFormatter { get; }
Property Value
Methods
|
Improve this Doc
View Source
Deserialize(Byte[], Type)
Declaration
public 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 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
Serialize<T>(T)
Declaration
public 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 byte[] SerializeCacheItem<T>(CacheItem<T> value)
Parameters
Returns
Type |
Description |
System.Byte[] |
|
Type Parameters
Implements