mirror of
https://github.com/dotnetcore/AgileConfig.git
synced 2026-10-22 23:39:55 +08:00
33 lines
661 B
C#
33 lines
661 B
C#
using Agile.Config.Protocol;
|
|
using System;
|
|
using System.Collections.Concurrent;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Agile.Config.Client
|
|
{
|
|
public class ConfigChangedArg
|
|
{
|
|
public ConfigChangedArg(string action, string key)
|
|
{
|
|
Action = action;
|
|
Key = key;
|
|
}
|
|
|
|
public string Key { get; }
|
|
|
|
public string Action { get; }
|
|
}
|
|
|
|
public interface IConfigClient
|
|
{
|
|
string this[string key] { get; }
|
|
|
|
ConcurrentDictionary<string, string> Data { get; }
|
|
|
|
Task<bool> ConnectAsync();
|
|
|
|
bool Load();
|
|
|
|
event Action<ConfigChangedArg> ConfigChanged;
|
|
}
|
|
} |