|
using System;
namespace CompactFormatter.Interfaces
{
/// <summary>
/// Every class who wants to use CustomSerialization must implement
/// this interface, it is a CompactFramework version of .NET ISerializable
/// interface.
/// On CompactFramework we don't have ISerializable interface, so
/// ICSerializable is declared by CompactFormatter, obviously it's interface
/// is changed respect to ISerializable because we don't have SerializationInfo
/// and StreamingContext on the CompactFramework and plus we've a reference to
/// CompactFormatter to make, if necessary, use of standard serialization algorithms
/// during custom serialization.
///
/// </summary>
public interface ICSerializable
{
// Implied a parameterless constructor (needed by CompactFormatter).
// ISerializable();
/// <summary>
/// This function is invoked by CompactFormatter when serializing a
/// Custom Serializable object.
/// </summary>
/// <param name="parent">A reference to the CompactFormatter instance which called this method.</param>
/// <param name="stream">The Stream where object data must be written</param>
void SendObjectData(CompactFormatter parent, System.IO.Stream stream);
/// <summary>
/// This function is invoked by CompactFormatter when deserializing a
/// Custom Serializable object.
/// </summary>
/// <param name="parent">A reference to the CompactFormatter instance which called this method.</param>
/// <param name="stream">The Stream where object data must be read</param>
void ReceiveObjectData(CompactFormatter parent, System.IO.Stream stream);
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.