blob: f4536856af983cb60806d8fbf2d81054370f14eb (
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
|
//
// System.RuntimeFieldHandle.cs
//
// Author:
// Miguel de Icaza (miguel@ximian.com)
//
// (C) Ximian, Inc. http://www.ximian.com
//
using System.Runtime.Serialization;
using System.Globalization;
namespace System {
[MonoTODO]
[Serializable]
public struct RuntimeFieldHandle : ISerializable {
IntPtr value;
public IntPtr Value {
get {
return (IntPtr) value;
}
}
RuntimeFieldHandle (SerializationInfo info, StreamingContext context)
{
Type t;
if (info == null)
throw new ArgumentNullException ("info");
t = (Type) info.GetValue ("TypeObj", typeof (Type));
value = t.TypeHandle.Value;
if (value == (IntPtr) 0)
throw new SerializationException (Locale.GetText ("Insufficient state"));
}
public void GetObjectData (SerializationInfo info, StreamingContext context)
{
info.AddValue ("TypeObj", value, value.GetType ());
}
}
}
|