예제 #1
0
        private static void Complex(IWampRealmServiceProvider serviceProvider)
        {
            IComplexResultService proxy =
                serviceProvider.GetCalleeProxy <IComplexResultService>();

            string[] splitted = proxy.SplitName("George Bush");
            Console.WriteLine("Pinged!");
        }
예제 #2
0
        public async Task ComplexServiceSplitName()
        {
            WampPlayground playground = new WampPlayground();

            var channel = await SetupService <ComplexResultService>(playground);

            IComplexResultService proxy =
                channel.RealmProxy.Services.GetCalleeProxyPortable <IComplexResultService>();

            string[] splitName = proxy.SplitName("Homer Simpson");

            Assert.That(splitName[0], Is.EqualTo("Homer"));
            Assert.That(splitName[1], Is.EqualTo("Simpson"));
        }
예제 #3
0
        public async Task ComplexNamedTupleServiceAddComplex()
        {
            WampPlayground playground = new WampPlayground();

            var channel = await SetupService <NamedTupleComplexResultService>(playground);

            IComplexResultService proxy =
                channel.RealmProxy.Services.GetCalleeProxy <IComplexResultService>();

            proxy.AddComplex(2, 3, 4, 5, out int c, out int ci);

            Assert.That(c, Is.EqualTo(6));
            Assert.That(ci, Is.EqualTo(8));
        }
예제 #4
0
        public async void ComplexServiceAddComplex()
        {
            WampPlayground playground = new WampPlayground();

            var channel = await SetupService <ComplexResultService>(playground);

            IComplexResultService proxy =
                channel.RealmProxy.Services.GetCalleeProxyPortable <IComplexResultService>();

            int c;
            int ci;

            proxy.AddComplex(2, 3, 4, 5, out c, out ci);

            Assert.That(c, Is.EqualTo(6));
            Assert.That(ci, Is.EqualTo(8));
        }