ZeroInstall.Services.Solvers.SelectionCandidateProvider.AddFeedToDict C# (CSharp) Method

AddFeedToDict() private method

Loads a feed and adds it to a dictionary if it is not already in it. Recursivley adds Feed.Feeds references.
private AddFeedToDict ( Feed>.[ dictionary, [ feedUri, [ requirements ) : void
dictionary Feed>.[ The dictionary to add the feed to.
feedUri [ The URI to load the feed from
requirements [ Requirements to apply as a filter to references before following them.
return void
        private void AddFeedToDict([NotNull] IDictionary<FeedUri, Feed> dictionary, [CanBeNull] FeedUri feedUri, [NotNull] Requirements requirements)
        {
            if (feedUri == null || dictionary.ContainsKey(feedUri)) return;

            var feed = _feedManager[feedUri];
            if (feed.MinInjectorVersion != null && FeedElement.ZeroInstallVersion < feed.MinInjectorVersion)
            {
                Log.Warn($"The solver version is too old. The feed '{feedUri}' requires at least version {feed.MinInjectorVersion} but the installed version is {FeedElement.ZeroInstallVersion}. Try updating Zero Install.");
                return;
            }

            dictionary.Add(feedUri, feed);
            foreach (var reference in feed.Feeds)
            {
                if (reference.Architecture.IsCompatible(requirements.Architecture) &&
                    (reference.Languages.Count == 0 || reference.Languages.ContainsAny(requirements.Languages, ignoreCountry: true)))
                    AddFeedToDict(dictionary, reference.Source, requirements);
            }
        }