private async Task <string> GetCompoundKeyFromImageIds(IEnumerable <Guid> imageIds) { var key = ""; foreach (var id in imageIds) { key += await _imagesRepository.GetImageKeyById(id); } return(key); }
public async Task <bool> ValidateCompoundImageTagDataKey(CompoundImageTagData compoundImageTagData) { if (string.IsNullOrEmpty(compoundImageTagData.Key)) { return(false); } var keyParts = compoundImageTagData.Key.SplitInParts(32).ToList(); var imageIds = await _compoundImageMappingsRepository.GetImageIdsByCompoundImageId(compoundImageTagData.CompoundImageId); var imageKeys = new List <string>(); foreach (var imageId in imageIds) { imageKeys.Add(await _imagesRepository.GetImageKeyById(imageId)); } return(imageKeys.Count == keyParts.Count && imageKeys.All(keyParts.Contains)); }