internal TomlObject AddRow(TomlKey key, TomlObject value) { this.CheckNotFrozen(); var toAdd = this.EnsureCorrectRoot(value); this.rows.Add(key, toAdd); return toAdd; }
protected IEnumerable <TomlComment> GetComments(TomlKey k) { var tgtComments = this.target.TryGetValue(k.Value, out var tgtVal) ? tgtVal.Comments : Empty; var srcComments = this.source.TryGetValue(k.Value, out var srcVal) ? srcVal.Comments : Empty; return(this.commentsOp(new InputComments(tgtComments, srcComments))); }
protected TomlObject CloneWithComments(TomlKey key, TomlObject sourceValue, ITomlRoot root) { var comments = this.GetComments(key); var cloned = sourceValue.CloneFor(root); cloned.ClearComments(); cloned.AddComments(comments.ToList()); return(cloned); }
internal TomlObject TryGetValue(TomlKey key) => this.TryGetValue(key.Value);
internal void SetRow(TomlKey key, TomlObject value) { this.rows[key] = value; }