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

Formatter.cs « System.Runtime.Serialization « corlib « class « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 7da54b1c2ecd05811e45196dd679ba2e5495c774 (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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
//
// System.Runtime.Serialization.Formatter.cs
//
// Duncan Mak  (duncan@ximian.com)
//
// (C) Ximian, Inc.
//

using System;
using System.Collections;
using System.IO;
using System.Runtime.Serialization;

[CLSCompliant (false)]
[Serializable]
public abstract class Formatter : IFormatter
{
	protected Formatter ()
	{
	}
	
	protected ObjectIDGenerator m_idGenerator;
	protected Queue m_objectQueue;

	public abstract SerializationBinder Binder {
		get;
		set;
	}

	public abstract StreamingContext Context {
		get;
		set;
	}

	public abstract ISurrogateSelector SurrogateSelector {
		get;
		set;
	}

	public abstract object Deserialize (Stream serializationStream);

	[MonoTODO]
	protected virtual object GetNext (out long objID)
	{
		throw new NotImplementedException ();
	}

	[MonoTODO]
	protected virtual long Schedule (object obj)
	{
		throw new NotImplementedException ();
	}

	public abstract void Serialize (Stream serializationStream, object graph);
	 
	protected abstract void WriteArray (object obj, string name, Type memberType);
	 
	protected abstract void WriteBoolean (bool val, string name);
	 
	protected abstract void WriteByte (byte val, string name);
	 
	protected abstract void WriteChar (char val, string name);
	 
	protected abstract void WriteDateTime (DateTime val, string name);

	protected abstract void WriteDecimal (Decimal val, string name);

	protected abstract void WriteDouble (double val, string name);

	protected abstract void WriteInt16 (short val, string name);

	protected abstract void WriteInt32 (int val, string name);

	protected abstract void WriteInt64 (long val, string name);

	[MonoTODO]
	protected virtual void WriteMember (string memberName, object data)
	{
	}

	protected abstract void WriteObjectRef (object obj, string name, Type memberType);


	protected abstract void WriteSByte (sbyte val, string name);


	protected abstract void WriteSingle (float val, string name);
	
	protected abstract void WriteTimeSpan (TimeSpan val, string name);

	protected abstract void WriteUInt16 (ushort val, string name);

	protected abstract void WriteUInt32 (uint val, string name);

	protected abstract void WriteInt64 (ulong val, string name);

	protected abstract void WriteValueType (object obj, string name, Type memberType);	
}