using System.Text.Json; using System.Text.Json.Serialization; namespace Content.Server.Administration.Logs.Converters; public interface IAdminLogConverter { void Init(IDependencyCollection dependencies); /// /// Called after all converters have been added to the . /// void Init2(JsonSerializerOptions options) { } } public abstract class AdminLogConverter : JsonConverter, IAdminLogConverter { public virtual void Init(IDependencyCollection dependencies) { } public virtual void Init2(JsonSerializerOptions options) { } public override T Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { throw new NotSupportedException(); } public abstract override void Write(Utf8JsonWriter writer, T value, JsonSerializerOptions options); }