using System;
namespace Claunia.Localization.Core
{
///
/// Explanation of a parameter in a software string to help the translator understand the context and for translation
/// helping software to be able to provide appropriate examples
///
public class Parameter
{
string description;
int index;
Language language;
long? maximum;
long? minimum;
internal EventHandler Modified;
string type;
///
/// Index of parameter in source message
///
public int Index
{
get => index;
set
{
index = value;
Modified?.Invoke(this, EventArgs.Empty);
}
}
///
/// Programming language for interpretation of messages
///
public Language Language
{
get => language;
set
{
language = value;
Modified?.Invoke(this, EventArgs.Empty);
}
}
///
/// Simple (single-word) description of parameter type
///
public string Type
{
get => type;
set
{
type = value;
Modified?.Invoke(this, EventArgs.Empty);
}
}
///
/// Minimum value the parameter can get
///
public long? Minimum
{
get => minimum;
set
{
minimum = value;
Modified?.Invoke(this, EventArgs.Empty);
}
}
///
/// Maximum value the parameter can get
///
public long? Maximum
{
get => maximum;
set
{
maximum = value;
Modified?.Invoke(this, EventArgs.Empty);
}
}
///
/// Description of the parameter
///
public string Description
{
get => description;
set
{
description = value;
Modified?.Invoke(this, EventArgs.Empty);
}
}
public override string ToString() => description;
}
}