Esempio n. 1
0
        IEnumerable <string> GetAllSentinelFiles(SharedState history)
        {
            var files = new List <string>();

            if (history.TryGetStateFromAll <string[]>("sentinel_files", out var s))
            {
                foreach (var set in s)
                {
                    files.AddRange(set);
                }
            }

            return(files);
        }
Esempio n. 2
0
        IEnumerable <Manifest.DotNetSdkPack> GetAllRequiredPacks(SharedState history)
        {
            var requiredPacks = new List <Manifest.DotNetSdkPack>();

            requiredPacks.AddRange(RequiredPacks.Where(rp => rp.IsCompatible()));

            if (history.TryGetStateFromAll <WorkloadResolver.PackInfo[]>("required_packs", out var p) && p.Any())
            {
                foreach (var packset in p)
                {
                    requiredPacks.AddRange(packset
                                           .Select(pi => new Manifest.DotNetSdkPack {
                        Id = pi.Id, Version = pi.Version
                    }));
                }
            }

            return(requiredPacks
                   .GroupBy(p => p.Id + p.Version.ToString())
                   .Select(g => g.First()));
        }