예제 #1
0
        public void TestOnlyRpcAreSynchronized()
        {
            var client = CFacade.InitBind(new PartSync(), TestLifetime, ClientProtocol);
            var proxy  = SFacade.ActivateProxy <IPartSync>(TestLifetime, ServerProtocol);

            Assertion.Assert(((RdExtReflectionBindableBase)proxy).Connected.Value, "((RdReflectionBindableBase)proxy).Connected.Value");
        }
예제 #2
0
        public void Test1()
        {
            var s = SFacade.InitBind(new RootModel(), TestLifetime, ClientProtocol);
            var c = CFacade.InitBind(new RootModel(), TestLifetime, ServerProtocol);

            s.EmptyOK.Value = new EmptyOK();
            Assert.IsNotNull(c.EmptyOK.Value);
        }
예제 #3
0
        public void TestCustomSignal()
        {
            var client = CFacade.InitBind(new ExtWithCustomSignal(), TestLifetime, ClientProtocol);
            var proxy  = SFacade.ActivateProxy <IExtWithCustomSignal>(TestLifetime, ServerProtocol);

            int val = 0;

            proxy.Signal.Advise(TestLifetime, v => val = int.Parse(v.v1));

            proxy.Signal.Fire(new Payload("123", "456"));
            Assert.AreEqual(val, 123);

            client.Signal.Fire(new Payload("12", "34"));
            Assert.AreEqual(val, 12);
        }