Beispiel #1
0
 internal TomlObject AddRow(TomlKey key, TomlObject value)
 {
     this.CheckNotFrozen();
     var toAdd = this.EnsureCorrectRoot(value);
     this.rows.Add(key, toAdd);
     return toAdd;
 }
Beispiel #2
0
            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)));
            }
Beispiel #3
0
            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);
            }
Beispiel #4
0
 internal TomlObject TryGetValue(TomlKey key) => this.TryGetValue(key.Value);
Beispiel #5
0
 internal void SetRow(TomlKey key, TomlObject value)
 {
     this.rows[key] = value;
 }