示例#1
0
        // 获取当前的服务器
        public async Task <Server> GetCurrentClientServerByUserId(int userId)
        {
            var server = await _httpService.Get(
                new CoreUri(
                    _configuration.GetConnectionString("TrackerConnection") + "/ServerClient/CurrentServerByUserId",
                    new
            {
                userId = userId,
            }));

            var jResult = JsonConvert.DeserializeObject <Server>(server);

            return(jResult);
        }
示例#2
0
        // 获取未读消息
        public async Task <List <Message> > GetUnreadMessages(string messagerIp, int userId)
        {
            var server = await _httpService.Get(
                new CoreUri(
                    messagerIp + "/Chat/GetUnreadMessages",
                    new
            {
                userId = userId,
            }));

            var jResult = JsonConvert.DeserializeObject <List <Message> >(server);

            return(jResult);
        }