Add Elastic-bound logging of (almost) all database update events
This commit is contained in:
@@ -10,10 +10,11 @@ using Newtonsoft.Json;
|
||||
namespace PluralKit.Core
|
||||
{
|
||||
[JsonConverter(typeof(PartialConverter))]
|
||||
public struct Partial<T>: IEnumerable<T>
|
||||
public struct Partial<T>: IEnumerable<T>, IPartial
|
||||
{
|
||||
public bool IsPresent { get; }
|
||||
public T Value { get; }
|
||||
public object? RawValue => Value;
|
||||
|
||||
private Partial(bool isPresent, T value)
|
||||
{
|
||||
@@ -34,6 +35,12 @@ namespace PluralKit.Core
|
||||
public static implicit operator Partial<T>(T val) => Present(val);
|
||||
}
|
||||
|
||||
public interface IPartial
|
||||
{
|
||||
public bool IsPresent { get; }
|
||||
public object? RawValue { get; }
|
||||
}
|
||||
|
||||
public class PartialConverter: JsonConverter
|
||||
{
|
||||
public override object? ReadJson(JsonReader reader, Type objectType, object? existingValue,
|
||||
|
Reference in New Issue
Block a user