mirror of
https://github.com/sampletext32/ParkanPlayground.git
synced 2026-08-15 15:07:48 +04:00
28 lines
461 B
C#
28 lines
461 B
C#
namespace NResUI.Abstractions;
|
|||
|
|
|
||
|
|
public interface IConfigProvider
|
||
|
|
{
|
||
|
|
ConfigJson GetConfig();
|
||
|
|
void Set(ConfigJson config);
|
||
|
|
}
|
||
|
|
|
||
|
|
public class ConfigProvider : IConfigProvider
|
||
|
|
{
|
||
|
|
private ConfigJson _instance;
|
||
|
|
|
||
|
|
public ConfigProvider(ConfigJson instance)
|
||
|
|
{
|
||
|
|
_instance = instance;
|
||
|
|
}
|
||
|
|
|
||
|
|
public void Set(ConfigJson config)
|
||
|
|
{
|
||
|
|
_instance = config;
|
||
|
|
}
|
||
|
|
|
||
|
|
public ConfigJson GetConfig()
|
||
|
|
{
|
||
|
|
return _instance;
|
||
|
|
}
|
||
|
|
}
|