Class JsonCacheSerializer
Implements the ICacheSerializer
contract using Newtonsoft.Json
.
Inheritance
JsonCacheSerializer
Namespace:CacheManager.Serialization.Json
Assembly:CacheManager.Serialization.Json.dll
Syntax
public class JsonCacheSerializer : CacheSerializer, ICacheSerializer
Constructors
|
Improve this Doc
View Source
JsonCacheSerializer()
Declaration
public JsonCacheSerializer()
|
Improve this Doc
View Source
JsonCacheSerializer(JsonSerializerSettings, JsonSerializerSettings)
Initializes a new instance of the JsonCacheSerializer class.
With this overload the settings for de-/serialization can be set independently.
Declaration
public JsonCacheSerializer(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.
|
Properties
|
Improve this Doc
View Source
DeserializationSettings
Gets the settings which should be used during deserialization.
If nothing is specified the default Newtonsoft.Json.JsonSerializerSettings will be used.
Declaration
public JsonSerializerSettings DeserializationSettings { get; }
Property Value
Type |
Description |
Newtonsoft.Json.JsonSerializerSettings |
The deserialization settings.
|
|
Improve this Doc
View Source
SerializationSettings
Gets the settings which should be used during serialization.
If nothing is specified the default Newtonsoft.Json.JsonSerializerSettings will be used.
Declaration
public JsonSerializerSettings SerializationSettings { get; }
Property Value
Type |
Description |
Newtonsoft.Json.JsonSerializerSettings |
The serialization settings.
|
Methods
|
Improve this Doc
View Source
CreateNewItem<TCacheValue>(ICacheItemProperties, Object)
Declaration
protected override object CreateNewItem<TCacheValue>(ICacheItemProperties properties, object value)
Parameters
Returns
Type Parameters
Name |
Description |
TCacheValue |
|
Overrides
|
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
Overrides
|
Improve this Doc
View Source
GetOpenGeneric()
Declaration
protected override Type GetOpenGeneric()
Returns
Overrides
|
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
Overrides
CacheManager.Core.Internal.CacheSerializer.Serialize<T>(T)