Exemplo n.º 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);
        }
Exemplo n.º 2
0
 public ImageInfo GetImageByPlatform(PlatformInfo platform) =>
 GetAllImages()
 .FirstOrDefault(image => image.AllPlatforms.Contains(platform));