Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Earl <slide.o.mix@gmail.com>2018-11-26 16:25:03 +0300
committerMarek Safar <marek.safar@gmail.com>2018-11-27 11:05:51 +0300
commit2c4859839ec81ca0b5d2d8abe3292f031c0b2cde (patch)
tree6ff2a9dde5fe4e51f045648aa84ad60bac4a14b4 /mcs/class/System.Runtime.Remoting
parent94d40557734b86b3dc5c27de7ef3fc19a1473cf0 (diff)
Fix #11779
This adds any base interfaces to the remoting TypeInfo to match the behavior of MS.NET
Diffstat (limited to 'mcs/class/System.Runtime.Remoting')
-rw-r--r--mcs/class/System.Runtime.Remoting/Test/RemotingServicesTest.cs33
1 files changed, 33 insertions, 0 deletions
diff --git a/mcs/class/System.Runtime.Remoting/Test/RemotingServicesTest.cs b/mcs/class/System.Runtime.Remoting/Test/RemotingServicesTest.cs
index 0dd58aa38cb..b7bad06cf95 100644
--- a/mcs/class/System.Runtime.Remoting/Test/RemotingServicesTest.cs
+++ b/mcs/class/System.Runtime.Remoting/Test/RemotingServicesTest.cs
@@ -553,6 +553,39 @@ namespace MonoTests.Remoting
}
}
+ public interface IMarshalTest
+ {
+ void DoSomething();
+ }
+
+ public interface ITest2 : IMarshalTest
+ {
+ void DoSomethingElse();
+ }
+
+ public class TestClass : MarshalByRefObject, ITest2
+ {
+ public void DoSomething()
+ {
+ }
+
+ public void DoSomethingElse()
+ {
+ }
+ }
+
+ [Test]
+ public void MarshalBaseInterfaces()
+ {
+ TestClass test = new TestClass();
+ ObjRef obj = RemotingServices.Marshal(test, "TestClass", typeof(ITest2));
+ FieldInfo interfacesImplemented = obj.TypeInfo.GetType().GetField("interfacesImplemented", BindingFlags.NonPublic | BindingFlags.Instance);
+ string[] interfaces = (string[])interfacesImplemented.GetValue(obj.TypeInfo);
+ Assert.AreEqual(2, interfaces.Length);
+ Assert.IsTrue(interfaces[0].Contains("IMarshalTest"));
+ Assert.IsTrue(interfaces[1].Contains("ITest2"));
+ }
+
[Test]
[Ignore ("We cannot test RemotingConfiguration.Configure() because it keeps channels registered. If we really need to test it, do it as a standalone case")]
public void ConnectProxyCast ()