C# Class MicroLite.Mapping.Inflection.EnglishInflectionService

A class for modifying the grammatical category of an English word.
Based upon the example here
Inheritance: IInflectionService
显示文件 Open project: TrevorPilley/MicroLite Class Usage Examples

Public Methods

Method Description
AddInvariantWord ( string word ) : void

Adds a word which is considered invariant such as equipment or species.

AddRule ( string searchPattern, string replacementPattern ) : void

Adds (or replaces) the rule.

ToPlural ( string word ) : string

Returns the plural version of the specified singular word or the specified word if there is no plural version.

Method Details

AddInvariantWord() public method

Adds a word which is considered invariant such as equipment or species.
public AddInvariantWord ( string word ) : void
word string The invariant word.
return void

AddRule() public method

Adds (or replaces) the rule.
public AddRule ( string searchPattern, string replacementPattern ) : void
searchPattern string The pattern to match upon.
replacementPattern string The replacement pattern.
return void

ToPlural() public method

Returns the plural version of the specified singular word or the specified word if there is no plural version.
public ToPlural ( string word ) : string
word string The word to be pluralized.
return string