C# Класс NHibernate.OData.Inflector

Contains utility methods for working with English natural language strings.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
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

Описание методов

Camelize() публичный статический Метод

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.
Результат string

Camelize() публичный статический Метод

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.
Результат string

Pluralize() публичный статический Метод

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.
Результат string

Singularize() публичный статический Метод

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.
Результат string

Underscore() публичный статический Метод

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.
Результат string