Ejemplo n.º 1
0
        public override async Task GetShop(GetShopRequest request, IServerStreamWriter <GetShopReply> responseStream, ServerCallContext context)
        {
            var session = await context.GetSession();

            if (session == null)
            {
                await responseStream.WriteAsync(new GetShopReply()
                {
                    Code = ErrorCode.LostSession
                });

                return;
            }

            var shops = await ShopManager.GetShopLock(session);

            await responseStream.WriteAsync(new GetShopReply()
            {
                Code = ErrorCode.Success, UserShops = shops
            });
        }
Ejemplo n.º 2
0
        public static async Task <(bool, string)> GetShop(Session session, string Param1, string Param2, string Param3, string Param4)
        {
            var shops = await ShopManager.GetShopLock(session);

            return(true, string.Empty);
        }