Skip to content

Commit 94981ce

Browse files
authored
Hyperion support (akkadotnet#247)
* Add support for Hyperion deserialization * Update ApiApprover API list, need to add an [Obsolete] attribute
1 parent 9bff257 commit 94981ce

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/Hocon.API.Tests/HoconAPISpec.ApproveCore.approved.txt

+1
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,7 @@ namespace Hocon
407407
public override Hocon.HoconType Type { get; }
408408
public System.Collections.Generic.IDictionary<string, object> Unwrapped { get; }
409409
public System.Collections.Generic.IEnumerable<Hocon.HoconElement> Values { get; }
410+
[System.ObsoleteAttribute("Only used by Hyperion deserializer", true)]
410411
public void Add(string key, Hocon.HoconElement value) { }
411412
public void Add(System.Collections.Generic.KeyValuePair<string, Hocon.HoconElement> item) { }
412413
public virtual System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string, Hocon.HoconElement>> AsEnumerable() { }

src/Hocon/HoconObject.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -301,9 +301,10 @@ public override bool Equals(HoconElement other)
301301
return true;
302302
}
303303

304+
[Obsolete("Only used by Hyperion deserializer", true)]
304305
public void Add(string key, HoconElement value)
305306
{
306-
throw new InvalidOperationException("HoconObject is a read only Dictionary.");
307+
Fields = Fields.Add(key, value);
307308
}
308309

309310
public bool Remove(string key)

0 commit comments

Comments
 (0)