Pavalisoft.Caching  1.2.1
A single unified Caching Api for both MemoryCache and DistributedCache implementations including CacheManager
Pavalisoft.Caching.Interfaces.ISerializer Interface Reference

Represents interface for Cache Item Serializer More...

Inheritance diagram for Pavalisoft.Caching.Interfaces.ISerializer:
Pavalisoft.Caching.Serializers.BinaryFormatterSerializer Pavalisoft.Caching.Serializers.JsonSerializer Pavalisoft.Caching.Serializers.DefaultSerializer

Public Member Functions

byte [] Serialize< T > (T item)
 Serializes the specified Cached Object. More...
 
Task< byte[]> SerializeAsync< T > (T item)
 Serializes the specified Cached Object asynchronous. More...
 
Deserialize< T > (byte[] bytes)
 Deserializes the specified bytes to T . More...
 
Task< T > DeserializeAsync< T > (byte[] bytes)
 Deserializes the specified bytes to T asynchronously. More...
 

Detailed Description

Represents interface for Cache Item Serializer

Member Function Documentation

◆ Deserialize< T >()

T Pavalisoft.Caching.Interfaces.ISerializer.Deserialize< T > ( byte []  bytes)

Deserializes the specified bytes to T .

Template Parameters
TCached Object Type
Parameters
bytesThe serialized object.
Returns
The instance of the specified T

Implemented in Pavalisoft.Caching.Serializers.JsonSerializer, and Pavalisoft.Caching.Serializers.BinaryFormatterSerializer.

◆ DeserializeAsync< T >()

Task<T> Pavalisoft.Caching.Interfaces.ISerializer.DeserializeAsync< T > ( byte []  bytes)

Deserializes the specified bytes to T asynchronously.

Template Parameters
TCached Object Type
Parameters
bytesThe serialized object.
Returns
The instance of the specified T

Implemented in Pavalisoft.Caching.Serializers.JsonSerializer, and Pavalisoft.Caching.Serializers.BinaryFormatterSerializer.

◆ Serialize< T >()

byte [] Pavalisoft.Caching.Interfaces.ISerializer.Serialize< T > ( item)

Serializes the specified Cached Object.

Template Parameters
TCached Object Type
Parameters
itemCached Object
Returns
Returns byte array of item

Implemented in Pavalisoft.Caching.Serializers.BinaryFormatterSerializer, and Pavalisoft.Caching.Serializers.JsonSerializer.

◆ SerializeAsync< T >()

Task<byte[]> Pavalisoft.Caching.Interfaces.ISerializer.SerializeAsync< T > ( item)

Serializes the specified Cached Object asynchronous.

Template Parameters
TCached Object Type
Parameters
itemCached Object
Returns
Retruns byte array of item

Implemented in Pavalisoft.Caching.Serializers.BinaryFormatterSerializer, and Pavalisoft.Caching.Serializers.JsonSerializer.


The documentation for this interface was generated from the following file: