private MatchResultItem(MatchResultType type, ProjectStepDefinitionBinding matchedStepDefinition, ParameterMatch parameterMatch, string[] errors, UndefinedStepDescriptor undefinedStep)
 {
     Type = type;
     MatchedStepDefinition = matchedStepDefinition;
     ParameterMatch        = parameterMatch;
     UndefinedStep         = undefinedStep;
     Errors = errors ?? EmptyErrors;
 }
        public static MatchResultItem CreateMatch(ProjectStepDefinitionBinding matchedStepDefinition, ParameterMatch parameterMatch)
        {
            if (matchedStepDefinition == null)
            {
                throw new ArgumentNullException(nameof(matchedStepDefinition));
            }
            if (parameterMatch == null)
            {
                throw new ArgumentNullException(nameof(parameterMatch));
            }

            string[] errors = null;
            if (parameterMatch.HasError)
            {
                errors = new[] { parameterMatch.Error }
            }
            ;

            return(new MatchResultItem(MatchResultType.Defined,
                                       matchedStepDefinition, parameterMatch, errors, null));
        }