//
// System.Runtime.Serialization.IFormatter
//
// Author:
// David Dawkins (david@dawkins.st)
//
// (C) David Dawkins
//
using System.IO;
namespace System.Runtime.Serialization {
///
/// Formatting for serialized objects
public interface IFormatter {
//
// Properties
//
///
/// Get or set the SerializationBinder used
/// for looking up types during deserialization
SerializationBinder Binder
{
get;
set;
}
///
/// Get or set the StreamingContext used for serialization
/// and deserialization
StreamingContext Context
{
get;
set;
}
///
/// Get or set the SurrogateSelector used by the current
/// formatter
ISurrogateSelector SurrogateSelector
{
get;
set;
}
///
/// Deserialize data from the specified stream, rebuilding
/// the object hierarchy
object Deserialize(
Stream serializationStream
);
///
/// Serialize the specified object to the specified stream.
/// Object may be the root of a graph of objects to be
/// serialized
object Serialize(
Stream serializationStream,
object graph
);
}
}