Exemple #1
0
        public async Task EchoTaskGrain_Await()
        {
            IBlockingEchoTaskGrain g = GrainClient.GrainFactory.GetGrain <IBlockingEchoTaskGrain>(GetRandomGrainId());

            string received = await g.Echo(expectedEcho);

            Assert.AreEqual(expectedEcho, received, "Echo");

            received = await g.CallMethodAV_Await(expectedEcho);

            Assert.AreEqual(expectedEcho, received, "CallMethodAV_Await");

            received = await g.CallMethodTask_Await(expectedEcho);

            Assert.AreEqual(expectedEcho, received, "CallMethodTask_Await");
        }
Exemple #2
0
        public async Task EchoTaskGrain_Await()
        {
            IBlockingEchoTaskGrain g = this.GrainFactory.GetGrain <IBlockingEchoTaskGrain>(GetRandomGrainId());

            string received = await g.Echo(expectedEcho);

            Assert.Equal(expectedEcho, received); // Echo

            received = await g.CallMethodAV_Await(expectedEcho);

            Assert.Equal(expectedEcho, received); // CallMethodAV_Await

            received = await g.CallMethodTask_Await(expectedEcho);

            Assert.Equal(expectedEcho, received); // CallMethodTask_Await
        }