Esempio n. 1
0
        public async Task CheckForCompoundImageRequestFromCompoundImage(CompoundImageTagData compoundImageTagData)
        {
            if (await _tagsAnalyser.AnalyseTagConfidence(compoundImageTagData.Tags) == TagAnalysisAction.RequestCompoundImage)
            {
                var images = await _compoundImageMappingsRepository.GetImageIdsByCompoundImageId(compoundImageTagData.CompoundImageId);

                await _imagesService.CreateNewCompoundImage(compoundImageTagData.MapId, images);
            }
        }
Esempio n. 2
0
        private async Task <bool> CompoundImageAlreadyExists(Guid mapId, IList <Guid> imageIds)
        {
            var compoundImagesForMap = await _compoundImagesRepository.GetByMapId(mapId);

            foreach (var compoundImage in compoundImagesForMap)
            {
                var imagesInCompoundImage = await _compoundImageMappingsRepository.GetImageIdsByCompoundImageId(compoundImage.Id);

                if (imagesInCompoundImage.All(imageIds.Contains))
                {
                    return(true);
                }
            }

            return(false);
        }