Rev. | 86e26ecde9d36b0074e6fb8a2a2b26250bb81d51 |
---|---|
Tamaño | 1,098 octetos |
Tiempo | 2022-11-30 01:06:13 |
Autor | yoshy |
Log Message | [MOD] UserDialogProxy の名前空間を UI 配下から UI.Dialog 配下に移動
|
using System.Collections.Generic;
namespace CleanAuLait48.Core.Resource
{
public abstract class AbstractMessageRepository : IMessageRepository
{
protected readonly IDictionary<string, string> map = new Dictionary<string, string>();
protected virtual void RegisterMessages(string properties)
{
string[] lines = properties.Split('\n');
foreach (string line in lines)
{
if (line.StartsWith("#") || (line.Trim().Length == 0))
{
continue;
}
string[] data = line.Split('=');
map.Add(data[0].Trim(), data[1].Trim());
}
}
public virtual string Get(string key)
{
return GetMap()[key];
}
public virtual string Get(string key, params string[] args)
{
string msg = GetMap()[key];
return string.Format(msg, args);
}
public virtual IDictionary<string, string> GetMap()
{
return map;
}
}
}