Пример #1
0
        public async Task <MetaDto> Handle(GetMetaCommand request, CancellationToken cancellationToken)
        {
            var metaData = await _scraperService.GetMetaData(request.Text, request.ScrapeType);

            MetaDto dto = new();

            dto.Metas         = metaData.Metas;
            dto.OccurenceList = metaData.MetaOccurences.Select((value, index) => new OccurenceDto {
                No = index + 1, Word = value.Key, Occurence = value.Value
            }).ToList();

            return(dto);
        }