Welcome to mirror list, hosted at ThFree Co, Russian Federation.

IFormatter.cs « System.Runtime.Serialization « corlib « class « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 214f720093ec3186eba2d57f3d52656c3b05d4f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
//
// System.Runtime.Serialization.IFormatter
//
// Author:
//   David Dawkins (david@dawkins.st)
//
// (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>
		void Serialize( 
			Stream serializationStream,
			object graph
		);
	}

}