Jelajahi Sumber

New file (IFormatter.cs)

svn path=/trunk/mcs/; revision=1875
David Dawkins 24 tahun lalu
induk
melakukan
a5724e86ed

+ 4 - 0
mcs/class/corlib/System.Runtime.Serialization/ChangeLog

@@ -1,3 +1,7 @@
+2002-01-06  David Dawkins <[email protected]>
+
+	* IFormatter.cs : New file
+
 2002-05-01  Ravi Pratap  <[email protected]>
 
 	* SerializationInfo.cs : Insert MonoTODO attribute.

+ 66 - 0
mcs/class/corlib/System.Runtime.Serialization/IFormatter.cs

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