Class FuncBasedPluralForm
Defines plural form computation based on a Func<T, TResult>.
Implements
Inherited Members
Namespace: MGR.PortableObject
Assembly: MGR.PortableObject.dll
Syntax
public class FuncBasedPluralForm : IPluralForm
Constructors
| Edit this page View SourceFuncBasedPluralForm(int, Func<int, int>)
Creates a new instance of FuncBasedPluralForm.
Declaration
public FuncBasedPluralForm(int numberOfPluralForms, Func<int, int> pluralFormCompute)
Parameters
| Type | Name | Description |
|---|---|---|
| int | numberOfPluralForms | The number of plural forms. |
| Func<int, int> | pluralFormCompute | The Func<T, TResult> to compute the plural form. |
Properties
| Edit this page View SourceNumberOfPluralForms
Gets the number of plural forms.
Declaration
public int NumberOfPluralForms { get; }
Property Value
| Type | Description |
|---|---|
| int |
Methods
| Edit this page View SourceGetPluralFormForQuantity(int)
Get the plural form for the specified quantity.
Declaration
public int GetPluralFormForQuantity(int quantity)
Parameters
| Type | Name | Description |
|---|---|---|
| int | quantity | The quantity. |
Returns
| Type | Description |
|---|---|
| int | The plural form. |