DocumentForm<object> browseForm = new DocumentForm<object> ();
if (browseForm.DoInit () != 248)
return 1;
+
+ var domain = AppDomain.CreateDomain ("foo");
+ var engine = Engine.CreateRemote (domain);
+
+ if (engine.GetDomainName<object> () != "foo")
+ return 2;
+
return 0;
}
}
num = i + 1;
}
}
+
+public class Engine : MarshalByRefObject
+{
+ public Engine ()
+ {
+ }
+
+ public string GetDomainName<T> ()
+ {
+ return AppDomain.CurrentDomain.FriendlyName;
+ }
+
+ public string GetDomainName ()
+ {
+ return AppDomain.CurrentDomain.FriendlyName;
+ }
+
+ public static Engine CreateRemote (AppDomain domain)
+ {
+ return (Engine) domain.CreateInstanceAndUnwrap (
+ typeof (Engine).Assembly.FullName,
+ typeof (Engine).FullName);
+ }
+}