Esempio n. 1
0
            private bool TryToUseExistingCandidate([NotNull] Requirements requirements, [NotNull, ItemNotNull] IEnumerable <SelectionCandidate> suitableCandidates, [NotNull] ImplementationSelection selection)
            {
                if (!suitableCandidates.Contains(selection))
                {
                    return(false);
                }
                if (selection.ContainsCommand(requirements.Command))
                {
                    return(true);
                }

                var command = selection.AddCommand(requirements, from: _candidateProvider.LookupOriginalImplementation(selection));

                return(TryToSolveCommand(command, requirements));
            }