// Another helper function private DerivedMarshalObject NewDerivedMarshalObject() { string uri = "MonoTests.System.Runtime.Remoting.RemotingServicesTest.DerivedMarshalObject" + MarshalObjectId.ToString(); DerivedMarshalObject objMarshal = new DerivedMarshalObject(MarshalObjectId, uri); MarshalObjectId++; return(objMarshal); }
public void Marshal2() { DerivedMarshalObject derivedObjMarshal = NewDerivedMarshalObject(); ObjRef objRef = RemotingServices.Marshal(derivedObjMarshal, derivedObjMarshal.Uri, typeof(MarshalObject)); // Check that the type of the marshaled object is MarshalObject Assert.IsTrue(objRef.TypeInfo.TypeName.StartsWith((typeof(MarshalObject)).ToString()), "#A05"); // TODO: uncomment when RemotingServices.Disconnect is implemented //RemotingServices.Disconnect(derivedObjMarshal); }