Add core classes.
This commit is contained in:
40
Claunia.Localization.Core/Plural.cs
Normal file
40
Claunia.Localization.Core/Plural.cs
Normal file
@@ -0,0 +1,40 @@
|
||||
using System;
|
||||
|
||||
namespace Claunia.Localization.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// Contains the plural forms of a string
|
||||
/// </summary>
|
||||
public class Plural
|
||||
{
|
||||
int items;
|
||||
internal EventHandler Modified;
|
||||
string text;
|
||||
|
||||
/// <summary>
|
||||
/// Minimum number (inclusive) of items named to use this plural form
|
||||
/// </summary>
|
||||
public int Items
|
||||
{
|
||||
get => items;
|
||||
set
|
||||
{
|
||||
items = value;
|
||||
Modified?.Invoke(this, EventArgs.Empty);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Plural form of the string
|
||||
/// </summary>
|
||||
public string Text
|
||||
{
|
||||
get => text;
|
||||
set
|
||||
{
|
||||
text = value;
|
||||
Modified?.Invoke(this, EventArgs.Empty);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user