2023-12-26 04:22:19 +00:00
|
|
|
namespace Guru
|
|
|
|
|
{
|
2023-12-27 12:25:57 +00:00
|
|
|
using System;
|
|
|
|
|
|
|
|
|
|
public abstract class RemoteConfigBase<T>: IRemoteConfig<T> where T : IRemoteConfig<T>
|
2023-12-26 04:22:19 +00:00
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 配置是否可用
|
|
|
|
|
/// </summary>
|
|
|
|
|
public bool enable { get; set; } = true;
|
2023-12-27 12:25:57 +00:00
|
|
|
public Action<T> OnValueChanged { get; set; }
|
2023-12-26 04:22:19 +00:00
|
|
|
/// <summary>
|
|
|
|
|
/// 转为Json
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns></returns>
|
2023-12-27 12:25:57 +00:00
|
|
|
public virtual string ToJson() => JsonParser.ToJson(this);
|
|
|
|
|
|
|
|
|
|
|
2023-12-26 04:22:19 +00:00
|
|
|
}
|
|
|
|
|
}
|