[Mono-bugs] [Bug 60442][Maj] Changed - PrivateBinPath bug again...
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Fri, 25 Jun 2004 06:18:19 -0400 (EDT)
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by gonzalo@ximian.com.
http://bugzilla.ximian.com/show_bug.cgi?id=60442
--- shadow/60442 2004-06-24 18:48:36.000000000 -0400
+++ shadow/60442.tmp.6947 2004-06-25 06:18:19.000000000 -0400
@@ -314,6 +314,47 @@
in <0x000e2> A:Main (string[])
8<-----------------------------------------------------
Mono doesn't search the
directory '/home/vadim/archive/tests/tests/a.b'...
+
+------- Additional Comments From gonzalo@ximian.com 2004-06-25 06:18 -------
+----------------------
+using System;
+using System.IO;
+using System.Reflection;
+using System.Runtime.Serialization.Formatters.Binary;
+
+public class A {
+ public static void Main( string[] args ) {
+ AppDomain.CurrentDomain.AppendPrivatePath(
+"/tmp/testdeserialization/a.b" );
+
+ BinaryFormatter bf = new BinaryFormatter();
+ FileStream fs = new FileStream( "a.b" + Path.DirectorySeparatorChar
++ "serializedobject.txt",
+ FileMode.Open, FileAccess.Read );
+ object o = bf.Deserialize( fs );
+ fs.Close();
+
+ Console.WriteLine( o );
+
+ Type t = o.GetType();
+ MethodInfo mi = t.GetMethod( "SayHello" );
+ mi.Invoke( o, new object[] {} );
+ }
+}
+---------------------
+
+And:
+gonzalo@lalo4:/tmp/testdeserialization$ ls -l
+total 12
+drwxr-x--- 2 gonzalo gonzalo 4096 2004-06-17 22:14 a.b
+-rw-r----- 1 gonzalo gonzalo 617 2004-06-25 12:12 testload.cs
+-rwxr-x--- 1 gonzalo gonzalo 3584 2004-06-25 12:12 testload.exe
+gonzalo@lalo4:/tmp/testdeserialization$ mono testload.exe
+10
+Hello world!
+
+Jackson, does it also work for you?
+