// Table Array public static TomlTableArray Update <T>( this TomlTable table, string key, IEnumerable <T> items, TomlTable.TableTypes type = TomlTable.TableTypes.Default) { TomlTableArray tblArray = CreateAttached(table, items, type); table[key] = tblArray; return(tblArray); }
internal TomlTableArray TableArrayWithRoot(ITomlRoot root) { root.CheckNotNull(nameof(root)); var a = new TomlTableArray(root, this.Items.Select(t => t.TableWithRoot(root))); return(a); }
public static TomlTableArray AddTableArray(this TomlTable table, string key, TomlTableArray array) { if (array.Root != table.Root) { throw new InvalidOperationException("Cannot add TOML table array to table because it belongs to a different graph root."); } table.AddRow(new TomlKey(key), array); return(array); }
void ITomlObjectVisitor.Visit(TomlTableArray tableArray) { var arr = new Dictionary <string, object> [tableArray.Count]; for (int i = 0; i < tableArray.Count; i++) { var conv = new ConvertTomlTableToDictionaryConversionVisitor(); arr[i] = conv.Convert(tableArray[i]); } this.table[this.currentKey] = arr; }
void ITomlObjectVisitor.Visit(TomlTableArray tableArray) { var arr = new Dictionary<string, object>[tableArray.Count]; for (int i = 0; i < tableArray.Count; i++) { var conv = new ConvertTomlTableToDictionaryConversionVisitor(); arr[i] = conv.Convert(tableArray[i]); } this.table[this.currentKey] = arr; }
internal TomlTableArray TableArrayWithRoot(ITomlRoot root) { root.CheckNotNull(nameof(root)); var a = new TomlTableArray(root, this.Items.Select(t => t.TableWithRoot(root))); return a; }
public void Visit(TomlTableArray tableArray) => Debug.Assert(false);