コード例 #1
0
        public async Task LongKeywordTupleServiceCalleeProxy()
        {
            WampPlayground playground = new WampPlayground();

            CallerCallee dualChannel = await playground.GetCallerCalleeDualChannel();

            IWampChannel calleeChannel = dualChannel.CalleeChannel;

            var registration =
                await calleeChannel.RealmProxy.RpcCatalog.Register(new LongValueTuplesService.KeywordTupleOperation(),
                                                                   new RegisterOptions());

            IWampChannel callerChannel = dualChannel.CallerChannel;

            ILongValueTuplesServiceProxy proxy =
                callerChannel.RealmProxy.Services.GetCalleeProxy <ILongValueTuplesServiceProxy>();

            string name = "Homer Simpson";

            var(item1, item2, item3, item4, item5, item6, item7, item8, length, item9, item10) =
                proxy.GetLongKeywordTuple(name);

            Assert.That(item1, Is.EqualTo(name + " " + 0));
            Assert.That(item10, Is.EqualTo(name + " " + 9));
            Assert.That(length, Is.EqualTo(name.Length));
        }
コード例 #2
0
        public async Task LongKeywordTupleServiceCalleeProxy()
        {
            WampPlayground playground = new WampPlayground();

            CallerCallee dualChannel = await playground.GetCallerCalleeDualChannel();

            IWampChannel calleeChannel = dualChannel.CalleeChannel;

            var registration =
                await calleeChannel.RealmProxy.RpcCatalog.Register(new LongValueTuplesService.KeywordTupleOperation(),
                                                                   new RegisterOptions());

            IWampChannel callerChannel = dualChannel.CallerChannel;

            ILongValueTuplesServiceProxy proxy =
                callerChannel.RealmProxy.Services.GetCalleeProxyPortable <ILongValueTuplesServiceProxy>();

            string name = "Homer Simpson";

            //(string item1, string item2, string item3, string item4, string item5, string item6, string item7, string item8, int count, string item9, string item10) =
            //    proxy.GetLongPositionalTuple(name);
            ValueTuple <string, string, string, string, string, string, string, ValueTuple <string, int, string, string> > expr_3E =
                proxy.GetLongKeywordTuple(name);

            string item1  = expr_3E.Item1;
            string item2  = expr_3E.Item2;
            string item3  = expr_3E.Item3;
            string item4  = expr_3E.Item4;
            string item5  = expr_3E.Item5;
            string item6  = expr_3E.Item6;
            string item7  = expr_3E.Item7;
            string item8  = expr_3E.Rest.Item1;
            int    length = expr_3E.Rest.Item2;
            string item9  = expr_3E.Rest.Item3;
            string item10 = expr_3E.Rest.Item4;

            Assert.That(item1, Is.EqualTo(name + " " + 0));
            Assert.That(item10, Is.EqualTo(name + " " + 9));
            Assert.That(length, Is.EqualTo(name.Length));
        }