BililiveRecorder/BililiveRecorder.Core/Config/ConfigBase.cs
2021-07-08 19:11:44 +08:00

19 lines
554 B
C#

using JsonSubTypes;
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
namespace BililiveRecorder.Core.Config
{
[JsonConverter(typeof(JsonSubtypes), nameof(Version))]
[JsonSubtypes.KnownSubType(typeof(V1.ConfigV1Wrapper), 1)]
[JsonSubtypes.KnownSubType(typeof(V2.ConfigV2), 2)]
public abstract class ConfigBase
{
[JsonProperty("$schema", Order = -2)]
public string? DollarSignSchema { get; set; }
[JsonProperty("version")]
public virtual int Version { get; internal protected set; }
}
}