Interface ICustomSerializable
Implementations of ICompactSerializable can add their state directly to the output stream, enabling them to bypass costly serialization.
Namespace:
Assembly: Alachisoft.NCache.Runtime.dll
Syntax
[CLSCompliant(false)]
public interface ICustomSerializable
Remarks
This Feature is Not Available in Express
Objects that implement ICompactSerializable must have a default constructor (can be private).
As per current implementation when a ICompactSerializable is deserialized the default constructor is not invoked, therefore the object must "construct" itself in Deserialize(CompactReader).
DeserializeLocal(BinaryReader)
Load the state from the passed stream reader object.
Declaration
[CLSCompliant(false)]
void DeserializeLocal(BinaryReader reader)
Parameters
Type | Name | Description |
---|---|---|
System.IO.BinaryReader | reader | A System.IO.BinaryReader object |
Remarks
As per current implementation when a ICompactSerializable is deserialized the default constructor is not invoked, therefore the object must "construct" itself in Deserialize(CompactReader).
SerializeLocal(BinaryWriter)
Save the the state to the passed stream reader object.
Declaration
[CLSCompliant(false)]
void SerializeLocal(BinaryWriter writer)
Parameters
Type | Name | Description |
---|---|---|
System.IO.BinaryWriter | writer | A System.IO.BinaryWriter object |