public void TestDuplexChannels() { string pipeName = "Vkm.TestPipe3"; var service = new Test1(); var callback = new Test2(); var master = new IntercomDuplexChannel <Test1, Test2>(service, pipeName, true); var slave = new IntercomDuplexChannel <Test2, Test1>(callback, pipeName, false); Assert.AreEqual(0, service.MethodCallCount); var r = slave.Execute(nameof(Test1.Do), 5, 1); Assert.AreEqual(1, service.MethodCallCount); Assert.AreEqual(5, r); Assert.AreEqual(0, callback.MethodCallCount); r = master.Execute(nameof(Test2.Do)); Assert.AreEqual(1, callback.MethodCallCount); Assert.AreEqual(string.Empty, r); }
public IntercomDeviceInfo[] GetDevices() { return((IntercomDeviceInfo[])_channel.Execute(nameof(GetDevices))); }