+2003-11-01 Zoltan Varga <vargaz@freemail.hu>
+
+ * RemotingServices.cs (GetDomainProxy): Use the new InvokeInDomain
+ function instead of calling SetDomain.
+
2003-10-23 Lluis Sanchez Gual <lluis@ximian.com>
* RemotingServices.cs: Do not create an identity for an object if it
byte[] data = null;
Context currentContext = Thread.CurrentContext;
- AppDomain currentDomain = AppDomain.InternalSetDomain (domain);
- try
+
+ try
{
- data = domain.GetMarshalledDomainObjRef ();
+ data = (byte[])AppDomain.InvokeInDomain (domain, typeof (AppDomain).GetMethod ("GetMarshalledDomainObjRef", BindingFlags.Instance|BindingFlags.NonPublic), domain, null);
}
- finally
+ finally
{
- AppDomain.InternalSetDomain (currentDomain);
AppDomain.InternalSetContext (currentContext);
- }
+ }
MemoryStream stream = new MemoryStream (data);
ObjRef appref = (ObjRef) CADSerializer.DeserializeObject (stream);