NPetrovich.Inflection.CaseInflection.InflectTo C# (CSharp) Method

InflectTo() private method

private InflectTo ( string name, Case @case, RuleSet ruleSet ) : string
name string
@case Case
ruleSet NPetrovich.Rules.Data.RuleSet
return string
        private string InflectTo(string name, Case @case, RuleSet ruleSet)
        {
            var nameChunks = WordPreparer.GetChunks(name);

            return string.Join("-", nameChunks.Select((chunk, index) =>
                {
                    bool firstWord = index == 0 && nameChunks.Count > 1;
                    return FindAndApply(chunk, @case, ruleSet, new Dictionary<string, bool> { { "first_word", firstWord } });
                }));
        }