diff --git a/imm/Imm.cs b/imm/Imm.cs index 30fc8f1..2653f3c 100644 --- a/imm/Imm.cs +++ b/imm/Imm.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; using System.Diagnostics; using System.Runtime.CompilerServices; +using System.Text.Json.Serialization; namespace imm; @@ -51,6 +52,7 @@ public interface Obj : Obj where T : Obj /// /// Gets the change delegate associated with this object. /// + [JsonIgnore] ChangeDelegate OnChange { get; set; } /// @@ -168,7 +170,7 @@ public record class Versioned : Obj where T : Versioned { public Metadata_Versioned Meta { get; init; } = new(); - [DebuggerBrowsable( DebuggerBrowsableState.Never )] + [DebuggerBrowsable( DebuggerBrowsableState.Never )] public ChangeDelegate OnChange { get; set; } = ( o, n ) => { }; public virtual Obj? Old => null; @@ -179,7 +181,7 @@ public record class Versioned : Obj where T : Versioned public Versioned() { } protected Versioned( Versioned original ) { - OnChange = original.OnChange; + OnChange = original.OnChange; Meta = original.Meta; }