Bladeren bron

2002-02-12 Duncan Mak <[email protected]>

	    * SerializationBinder.cs: Implemented.
	    * SerializationEntry.cs: Implemented.
	    * SerializationInfo.cs: Fixed the get portion of the AssemblyName
	    property. Implemented the FullTypename property.

svn path=/trunk/mcs/; revision=2361
Duncan Mak 24 jaren geleden
bovenliggende
commit
54829e3eed

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

@@ -1,3 +1,10 @@
+2002-02-12  Duncan Mak  <[email protected]>
+	
+	* SerializationBinder.cs: Implemented.
+	* SerializationEntry.cs: Implemented.
+	* SerializationInfo.cs: Fixed the get portion of the AssemblyName
+	property. Implemented the FullTypename property.
+	
 2002-01-06  David Dawkins <[email protected]>
 
 	* IFormatter.cs : New file

+ 22 - 0
mcs/class/corlib/System.Runtime.Serialization/SerializationBinder.cs

@@ -0,0 +1,22 @@
+//
+// System.Runtime.Serialization.SerializationBinder.cs
+//
+// Author: Duncan Mak ([email protected])
+//
+// (C) Ximian, Inc.
+//
+
+namespace System.Runtime.Serialization
+{
+	[Serializable]
+	public abstract class SerializationBinder
+	{
+		// Constructor
+		protected SerializationBinder ()
+			: base ()
+		{
+		}
+
+		public abstract Type BindToType (string assemblyName, string typeName);
+	}
+}

+ 33 - 0
mcs/class/corlib/System.Runtime.Serialization/SerializationEntry.cs

@@ -0,0 +1,33 @@
+//
+// System.Runtime.Serialization.SerializationEntry.cs
+//
+// Author: Duncan Mak ([email protected])
+//
+// (C) Ximian, Inc. http://www.ximian.com
+//
+
+namespace System.Runtime.Serialization
+{
+	public struct SerializationEntry
+	{
+		string name;
+		Type objectType;
+		object value;
+		
+		// Properties
+		public string Name
+		{
+			get { return name; }
+		}
+
+		public Type ObjectType
+		{
+			get { return objectType; }
+		}
+
+		public object Value
+		{
+			get { return value; }
+		}
+	}
+}

+ 4 - 4
mcs/class/corlib/System.Runtime.Serialization/SerializationInfo.cs

@@ -26,20 +26,20 @@ namespace System.Runtime.Serialization {
 		[MonoTODO]
 		public string AssemblyName {
 			get {
-				return "TODO: IMPLEMENT ME";
+				return type.Assembly.FullName;
 			}
 			
 			set {
 			}
 		}
-
-		[MonoTODO]
+		
 		public string FullTypeName {
 			get {
-				return "TODO: IMLEMENT ME";
+				return type.FullName;
 			}
 			
 			set {
+				type = Type.GetType (value);
 			}
 		}