C# Class NHibernate.OData.Inflector

Contains utility methods for working with English natural language strings.
Mostrar archivo Open project: pvginkel/NHibernate.OData Class Usage Examples

Public Methods

Method Description
Camelize ( string value ) : string

Converts an underscore style text into a camelized form.

Camelize ( string value, bool firstLetterUppercase ) : string

Converts an underscore style text into a camelized form.

Pluralize ( string value ) : string

Get the plural form of a singular text.

Singularize ( string value ) : string

Get the singular for for a plural text.

Underscore ( string value ) : string

Converts a camelized style text into an underscored form.

Private Methods

Method Description
AddIrregular ( string singular, string plural ) : void
AddPlural ( string expression, string replacement ) : void
AddPlural ( string expression, string replacement, bool caseSensitive ) : void
AddSingular ( string expression, string replacement ) : void
AddSingular ( string expression, string replacement, bool caseSensitive ) : void
Inflector ( ) : System

Method Details

Camelize() public static method

Converts an underscore style text into a camelized form.
public static Camelize ( string value ) : string
value string The underscore style text to get the /// camelized form for.
return string

Camelize() public static method

Converts an underscore style text into a camelized form.
public static Camelize ( string value, bool firstLetterUppercase ) : string
value string The underscore style text to get the /// camelized form for.
firstLetterUppercase bool true when the first /// letter of the returned value should be upper case. The default /// value for this parameter is true.
return string

Pluralize() public static method

Get the plural form of a singular text.
public static Pluralize ( string value ) : string
value string The singular text for which to get /// the plural form.
return string

Singularize() public static method

Get the singular for for a plural text.
public static Singularize ( string value ) : string
value string The plural text for which to /// get the singular form.
return string

Underscore() public static method

Converts a camelized style text into an underscored form.
public static Underscore ( string value ) : string
value string The camelized style text to get the /// underscored form for.
return string