コード例 #1
0
        public async Task <IEnumerable <TrapLog> > GetAsync(ManagerUser managerUser, int rsuId)
        {
            var host = GetHost(managerUser);

            try
            {
                var result = await _httpClinet.GetStringAsync($"http://{host}:{managerUser.Manager.Port}/{controller}/{managerUser.Name}/{managerUser.Token}/{rsuId}");

                var TrapLogs = TrapLogDto.FromJsonCollection(result);


                return(TrapLogs.Select(t => TrapLog.Parse(t, managerUser.Manager)).ToList());
            }
            catch (HttpRequestException ex)
            {
                return(null);
            }
        }