Assembly: soss_namedcache (in soss_namedcache.dll) Version: 126.96.36.199
[SerializableAttribute] public abstract class CustomSerializer<T>
<SerializableAttribute> Public MustInherit Class CustomSerializer(Of T)
- The type of the object to be serialized.
Thetype exposes the following members.
Initializes a new instance of theclass
Deserializes an object previously serialized with Serialize(Stream, T) method from the supplied stream.
Determines whether the specified object is equal to the current object.(Inherited from Object.)
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)
Serves as the default hash function.(Inherited from Object.)
Returns a type of the object.
Returns the size of fixed size objects.
Gets the Type of the current instance.(Inherited from Object.)
Creates a shallow copy of the current Object.(Inherited from Object.)
Serializes an object into a Stream.
Returns a string that represents the current object.(Inherited from Object.)
By default NamedMapTKey, TValue uses Microsoft BinaryFormatter serializer, so it's important for the key and value types to be marked as Serializable. Using a CustomSerializer is advisable when implementing portable Java/C# objects or when you would like to get advantage of some high-performance serializers.
If serialization or deserialization of an object is not supported in its implementation, it should throw an NotSupportedException. This will trigger an attempt to fallback to standard serialization. However, it is not recommended to keep such objects in the cache when a custom serializer is defined. You can use a "magic number" in the beginning of the stream to distinguish custom serialized objects from ones using a standard serialization (based on the BinaryFormatter serializer).