Beispiel #1
0
        public PlatformInfo GetPlatformByTag(string fullTagName)
        {
            PlatformInfo result = AllRepos
                                  .SelectMany(repo => repo.AllImages)
                                  .SelectMany(image => image.AllPlatforms)
                                  .FirstOrDefault(platform => platform.Tags.Any(tag => tag.FullyQualifiedName == fullTagName));

            if (result == null)
            {
                throw new InvalidOperationException($"Unable to find platform for the tag '{fullTagName}'");
            }

            return(result);
        }
Beispiel #2
0
        private IEnumerable <TagInfo> GetAllTags()
        {
            IEnumerable <ImageInfo> images = AllRepos
                                             .SelectMany(repo => repo.AllImages)
                                             .ToArray();
            IEnumerable <TagInfo> sharedTags = images
                                               .SelectMany(image => image.SharedTags);
            IEnumerable <TagInfo> platformTags = images
                                                 .SelectMany(image => image.AllPlatforms)
                                                 .SelectMany(platform => platform.Tags);

            return(sharedTags
                   .Concat(platformTags));
        }
Beispiel #3
0
 public IEnumerable <ImageInfo> GetAllImages() => AllRepos.SelectMany(repo => repo.AllImages);