mirror of
https://github.com/logos-storage/logos-storage-nim-cs-dist-tests.git
synced 2026-01-08 16:33:07 +00:00
28 lines
617 B
C#
28 lines
617 B
C#
|
|
namespace Core
|
|||
|
|
{
|
|||
|
|
public interface IPluginMetadata
|
|||
|
|
{
|
|||
|
|
Dictionary<string, string> Get();
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public interface IAddMetadata
|
|||
|
|
{
|
|||
|
|
void Add(string key, string value);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public class PluginMetadata : IPluginMetadata, IAddMetadata
|
|||
|
|
{
|
|||
|
|
private readonly Dictionary<string, string> metadata = new Dictionary<string, string>();
|
|||
|
|
|
|||
|
|
public void Add(string key, string value)
|
|||
|
|
{
|
|||
|
|
metadata.Add(key, value);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public Dictionary<string, string> Get()
|
|||
|
|
{
|
|||
|
|
return new Dictionary<string, string>(metadata);
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|