Пример #1
0
        public async Task <string> CallMethodAV_Await(string data)
        {
            string name = GetType().Name + ".CallMethodAV_Await";

            logger.Info(name + " Data=" + data);
            IEchoGrain avGrain = GrainFactory.GetGrain <IEchoGrain>(this.GetPrimaryKey());
            var        result  = await avGrain.Echo(data);

            logger.Info(name + " Result=" + result);
            return(result);
        }
Пример #2
0
        public async Task <string> CallMethodAV_Await(string data)
        {
            string name = GetType().Name + ".CallMethodAV_Await";

            logger.LogInformation("{Name} Data={Data}", name, data);
            IEchoGrain avGrain = GrainFactory.GetGrain <IEchoGrain>(this.GetPrimaryKey());
            var        result  = await avGrain.Echo(data);

            logger.LogInformation("{Name} Result={Result}", name, result);
            return(result);
        }
Пример #3
0
#pragma warning restore 1998

#pragma warning disable 1998
        public async Task <string> CallMethodAV_Block(string data)
        {
            string name = GetType().Name + ".CallMethodAV_Block";

            logger.Info(name + " Data=" + data);
            IEchoGrain avGrain = GrainFactory.GetGrain <IEchoGrain>(this.GetPrimaryKey());

            // Note: We deliberately use .Result here in this test case to block current executing thread
            var result = avGrain.Echo(data).Result;

            logger.Info(name + " Result=" + result);
            return(result);
        }