TomlTableArray Class

A mutable TOML array of tables, written with [[header]] headers.

public sealed class TomlTableArray : TomlNode, ICollection<TomlTable>, IEnumerable<TomlTable>, IList<TomlTable>, IEnumerable
Inheritance
TomlNode TomlTableArray
Implements

Constructors

NameDescription
TomlTableArray()Initializes a new empty array of tables.

TomlTableArray()

TomlTableArray.cs

Initializes a new empty array of tables.

public TomlTableArray()

Properties

NameDescription
CountGets the number of tables.
System.Collections.Generic.ICollection<Meziantou.Framework.Toml.Nodes.TomlTable>.IsReadOnly

Gets the number of tables.

public int Count { get; }

Property value

int

System.Collections.Generic.ICollection<Meziantou.Framework.Toml.Nodes.TomlTable>.IsReadOnly

TomlTableArray.cs
bool ICollection<TomlTable>.IsReadOnly { get; }

Property value

bool

No documentation is available.

Indexers

NameDescription
this[int]Gets or sets the table at an index.

Gets or sets the table at an index.

public new TomlTable this[int index] { get; set; }

Parameters

index int

Property value

TomlTable

Methods

NameDescription
Add(TomlTable)Adds a table.
Clear()Removes all the tables.
Contains(TomlTable)Gets a value indicating whether the array contains a table.
CopyTo(TomlTable[], int)Copies the elements of the ICollection<T> to an Array, starting at a particular Array index.
DeepClone()Gets a copy of the node and its descendants, without a parent.
GetEnumerator()Gets an enumerator of the tables.
GetValueKind()Gets the kind of the value.
IndexOf(TomlTable)Gets the index of a table in the array, or -1.
Insert(int, TomlTable)Inserts a table.
Remove(TomlTable)Removes a table.
RemoveAt(int)Removes the table at an index.
System.Collections.Generic.IEnumerable<Meziantou.Framework.Toml.Nodes.TomlTable>.GetEnumerator()
System.Collections.IEnumerable.GetEnumerator()
WriteTo(Utf8TomlWriter)Writes the node with a writer: a table as key/value pairs and sub-tables where the writer expects a key, and as an inline table otherwise.

Add(TomlTable)

TomlTableArray.cs

Adds a table.

public void Add(TomlTable item)

Parameters

item TomlTable

Removes all the tables.

public void Clear()

Contains(TomlTable)

TomlTableArray.cs

Gets a value indicating whether the array contains a table.

public bool Contains(TomlTable item)

Parameters

item TomlTable

Returns

bool

CopyTo(TomlTable[], int)

TomlTableArray.cs

Copies the elements of the ICollection<T> to an Array, starting at a particular Array index.

public void CopyTo(TomlTable[] array, int arrayIndex)

Parameters

array TomlTable[]
The one-dimensional Array that is the destination of the elements copied from ICollection<T>. The Array must have zero-based indexing.
arrayIndex int
The zero-based index in array at which copying begins.

Exceptions

ArgumentNullException
array is null.
ArgumentOutOfRangeException
arrayIndex is less than 0.
ArgumentException
The number of elements in the source ICollection<T> is greater than the available space from arrayIndex to the end of the destination array.

Gets a copy of the node and its descendants, without a parent.

public override TomlNode DeepClone()

Returns

TomlNode

GetEnumerator()

TomlTableArray.cs

Gets an enumerator of the tables.

public List<TomlTable>.Enumerator GetEnumerator()

GetValueKind()

TomlTableArray.cs

Gets the kind of the value.

public override TomlValueKind GetValueKind()

IndexOf(TomlTable)

TomlTableArray.cs

Gets the index of a table in the array, or -1.

public int IndexOf(TomlTable item)

Parameters

item TomlTable

Returns

int

Insert(int, TomlTable)

TomlTableArray.cs

Inserts a table.

public void Insert(int index, TomlTable item)

Parameters

index int
item TomlTable

Remove(TomlTable)

TomlTableArray.cs

Removes a table.

public bool Remove(TomlTable item)

Parameters

item TomlTable

Returns

bool

RemoveAt(int)

TomlTableArray.cs

Removes the table at an index.

public void RemoveAt(int index)

Parameters

index int

System.Collections.Generic.IEnumerable<Meziantou.Framework.Toml.Nodes.TomlTable>.GetEnumerator()

TomlTableArray.cs

No documentation is available.

System.Collections.IEnumerable.GetEnumerator()

TomlTableArray.cs
IEnumerator IEnumerable.GetEnumerator()

No documentation is available.

WriteTo(Utf8TomlWriter)

TomlTableArray.cs

Writes the node with a writer: a table as key/value pairs and sub-tables where the writer expects a key, and as an inline table otherwise.

public override void WriteTo(Utf8TomlWriter writer)

Parameters

writer Utf8TomlWriter
The writer.