public IEnumerable <WordMatch> GetMatches(string[] s) { var lowerWord = Word.ToLower(); var lowerTarget = s[0].ToLower(); var isMatch = lowerWord == lowerTarget.ToCSharpName() || lowerWord == lowerTarget; if (!isMatch) { return(WordMatch.NoMatch()); } return(new[] { new WordMatch(1, s[0]) }); }
public override IEnumerable <WordMatch> GetMatches(string[] s) { var enumValues = Enum.GetValues(ParamInfo.ParameterType); foreach (var enumValue in enumValues) { if (IsMatch(enumValue, s)) { return new[] { BuildWordMatch(enumValue.ToString(), s) } } ; } return(WordMatch.NoMatch()); }