Add core classes.

This commit is contained in:
2019-05-23 22:15:57 +01:00
parent abf6e04a3f
commit 29e34556fb
10 changed files with 650 additions and 0 deletions

View 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);
}
}
}
}