Ejemplo n.º 1
0
        private IEnumerable <BindingMatch> GetCandidatingBindings(StepInstance stepInstance, bool useParamMatching = true)
        {
            var matches = bindingRegistry.GetConsideredBindings(stepInstance.Text).Select(b => Match(b, stepInstance, useParamMatching: useParamMatching)).Where(b => b.Success);

            // we remove duplicate maches for the same method (take the highest scope matches from each)
            matches = matches.GroupBy(m => m.StepBinding.Method, (methodInfo, methodMatches) => methodMatches.OrderByDescending(m => m.ScopeMatches).First(), BindingMethodComparer.Instance);
            return(matches);
        }